NAME
Lab::Moose::Sweep::Continuous::Magnet - Continuous sweep of magnetic field
VERSION
version 3.662
SYNOPSIS
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 => 1, (Tesla/min, always positive)
interval => 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,
);
COPYRIGHT AND LICENSE
This software is copyright (c) 2018 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.