Lab::Moose::Stabilizer - Sensor stabilizers role
version 3.651
Helper methods for sensor (temperature, magnetic field, ...) stabilization.
$self->stabilize( setpoint => 10, getter => sub { ...; return $number}, 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) 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.
getter
verbose
This software is copyright (c) 2018 by the Lab::Measurement team; in detail:
Copyright 2018 Andreas K. Huettel, 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.