Lab::Moose::Sweep::Continuous - Base class for continuous sweeps (time, temperature, magnetic field)
version 3.682
use Lab::Moose; # # 1D sweep of magnetic field # my $ips = instrument( type => 'OI_Mercury::Magnet' connection_type => ..., connection_options => {...} ); my $multimeter = instrument(...); my $sweep = sweep( type => 'Continuous::Magnet', instrument => $ips, from => -1, # Tesla to => 1, rate => 0.1, (Tesla/min, always positive) start_rate => 1, (optional) rate to approach start point interval => 0.5, # one measurement every 0.5 seconds ); # alternative: points/rates # my $sweep = sweep( # type => 'Continuous::Magnet', # instrument => $ips, # points => [-1, -0.1, 0.1, 1], # # start rate: 1 # # use slow rate 0.01 between points -0.1 and 0.1 # rates => [1, 0.1, 0.01, 0.1], # intervals => [0.5], # one measurement every 0.5 seconds # ); my $datafile = sweep_datafile(columns => ['B-field', 'current']); $datafile->add_plot(x => 'B-field', y => 'current'); my $meas = sub { my $sweep = shift; my $field = $ips->get_field(); my $current = $multimeter->get_value(); $sweep->log('B-field' => $field, current => $current); }; $sweep->start( datafiles => [$datafile], measurement => $meas, );
Continuous sweep constructure. The sweep can be configured with either
from/to
rate
interval (default: 0)
or by providing the arrayrefs
points
rates
intervals (default: [0])
If an interval is 0, do as much measurements as possible. Otherwise, warn if measurement requires more time than interval.
0
interval
Do backsweep if backsweep attribute is set to 1.
backsweep
This software is copyright (c) 2019 by the Lab::Measurement team; in detail:
Copyright 2018 Simon Reinhardt
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Lab::Measurement, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lab::Measurement
CPAN shell
perl -MCPAN -e shell install Lab::Measurement
For more information on module installation, please visit the detailed CPAN module installation guide.