NAME
Lab::Moose::Stabilizer - Sensor stabilizer subroutine
VERSION
version 3.920
DESCRIPTION
Routine for sensor (temperature, magnetic field, ...) stabilization.
SUBROUTINES
stabilize
stabilize(
instrument => $OI_ITC,
setpoint => 10,
getter => sub { ...; return $number}, # or method name like 'get_T'
# will call '$instrument->$getter()'
tolerance_setpoint => 0.1, # max. allowed median
tolerance_std_dev => 0.1, # max. allowed standard deviation
measurement_interval => 2, # time (s) between calls of getter
observation_time => 20, # length of window (s) for median/std_dev
max_stabilization_time => 100, # abort stabilization after (s, optional)
on_fail => sub { ... }, # if max_stabilization_time is reached,
# run this
verbose => 1
);
Call the getter
method repeatedly. As soon as enough points have been measured, start calculating median and standard deviation and repeat until convergence. All times are given in seconds. Print status messages if verbose
is true.
COPYRIGHT AND LICENSE
This software is copyright (c) 2024 by the Lab::Measurement team; in detail:
Copyright 2018 Andreas K. Huettel, Simon Reinhardt
2019 Simon Reinhardt
2024 Andreas K. Huettel
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.