NAME
Lab::Moose::Stabilizer - Sensor stabilizers role
VERSION
version 3.682
DESCRIPTION
Helper methods for sensor (temperature, magnetic field, ...) stabilization.
METHODS
stabilize
$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.
COPYRIGHT AND LICENSE
This software is copyright (c) 2019 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.