| 1 | package Lab::Moose::Sweep::Step::Temperature; | ||
| 2 | 1 | $Lab::Moose::Sweep::Step::Temperature::VERSION = '3.881'; | |
| 3 | #ABSTRACT: Step/list sweep of temperature | ||
| 4 | |||
| 5 | 1 | ▶ | use v5.20; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | |||
| 8 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 1 | extends 'Lab::Moose::Sweep::Step'; | |
| 11 | |||
| 12 | 1 | ▶ | use Lab::Moose::Stabilizer; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | |||
| 14 | 1 | has instrument => | |
| 15 | ( is => 'ro', isa => 'Lab::Moose::Instrument', required => 1 ); | ||
| 16 | |||
| 17 | 1 | has filename_extension => ( is => 'ro', isa => 'Str', default => 'T=' ); | |
| 18 | |||
| 19 | 1 | has setter => ( is => 'ro', isa => 'CodeRef', builder => '_build_setter' ); | |
| 20 | 1 | has tolerance_setpoint => ( is => 'ro', isa => 'Num', default => 0.2 ); | |
| 21 | 1 | has tolerance_std_dev => ( is => 'ro', isa => 'Num', default => 0.15 ); | |
| 22 | 1 | has observation_time => ( is => 'ro', isa => 'Num', default => 3 * 60 ); | |
| 23 | 1 | has measurement_interval => ( is => 'ro', isa => 'Num', default => 1 ); | |
| 24 | 1 | has max_stabilization_time => ( is => 'ro', isa => 'Maybe[Num]' ); | |
| 25 | |||
| 26 | sub _build_setter { | ||
| 27 | 0 | ▶ | return \&_temp_setter; |
|
Subroutine
_build_setter: not called CC=1 SCAR=6.9
| |||
| 28 | } | ||
| 29 | |||
| 30 | sub _temp_setter { | ||
| 31 | 0 | ▶ | my $self = shift; |
|
Subroutine
_temp_setter: not called CC=1 SCAR=6.9
| |||
| 32 | 0 | my $value = shift; | |
| 33 | 0 | $self->instrument->set_T( value => $value ); | |
| 34 | 0 | stabilize( | |
| 35 | instrument => $self->instrument, | ||
| 36 | setpoint => $value, | ||
| 37 | getter => 'get_T', | ||
| 38 | tolerance_setpoint => $self->tolerance_setpoint, | ||
| 39 | tolerance_std_dev => $self->tolerance_std_dev, | ||
| 40 | measurement_interval => $self->measurement_interval, | ||
| 41 | observation_time => $self->observation_time, | ||
| 42 | max_stabilization_time => $self->max_stabilization_time, | ||
| 43 | verbose => 1, | ||
| 44 | ); | ||
| 45 | |||
| 46 | } | ||
| 47 | |||
| 48 | 1 | __PACKAGE__->meta->make_immutable(); | |
| 49 | 1 | 1; | |
| 50 | |||
| 51 | __END__ | ||
| 52 | |||
| 53 | =pod | ||
| 54 | |||
| 55 | =encoding UTF-8 | ||
| 56 | |||
| 57 | =head1 NAME | ||
| 58 | |||
| 59 | Lab::Moose::Sweep::Step::Temperature - Step/list sweep of temperature | ||
| 60 | |||
| 61 | =head1 VERSION | ||
| 62 | |||
| 63 | version 3.881 | ||
| 64 | |||
| 65 | =head1 SYNOPSIS | ||
| 66 | |||
| 67 | my $sweep = sweep( | ||
| 68 | type => 'Step::Temperature', | ||
| 69 | instrument => $oi_triton, | ||
| 70 | from => 0.010, # K | ||
| 71 | to => 0.5, | ||
| 72 | step => 0.05, # K | ||
| 73 | |||
| 74 | # stabilizer options (details in Lab::Moose::Stabilizer) | ||
| 75 | tolerance_setpoint => 0.01, | ||
| 76 | tolerance_std_dev => 0.01, | ||
| 77 | measurement_interval => 1, | ||
| 78 | observation_time => 10, | ||
| 79 | ... | ||
| 80 | ); | ||
| 81 | |||
| 82 | =head1 Description | ||
| 83 | |||
| 84 | Step sweep of temperature. | ||
| 85 | |||
| 86 | Set the temperature with instrument's C<set_T> method; use | ||
| 87 | L<Lab::Moose::Stabilizer> to wait until temperature has converged to the | ||
| 88 | setpoint. | ||
| 89 | |||
| 90 | =head1 COPYRIGHT AND LICENSE | ||
| 91 | |||
| 92 | This software is copyright (c) 2023 by the Lab::Measurement team; in detail: | ||
| 93 | |||
| 94 | Copyright 2018 Andreas K. Huettel, Simon Reinhardt | ||
| 95 | 2019 Simon Reinhardt | ||
| 96 | 2020 Andreas K. Huettel | ||
| 97 | |||
| 98 | |||
| 99 | This is free software; you can redistribute it and/or modify it under | ||
| 100 | the same terms as the Perl 5 programming language system itself. | ||
| 101 | |||
| 102 | =cut | ||