Polycal
Methods for determining, verifying and using polynomial calibration curves. The methods used conform as closely as possible to ISO/TS 28038.
Usage
To use the crate we first build a Problem, using known calibration data. We then then solve for the best fit solution:
use Array1;
use ProblemBuilder;
a = 1.;
b = 2.;
stimulus: = range;
num_data_points = stimulus.len;
response: = stimulus
.iter
.map
.collect;
let dependent_uncertainty: = response
.iter
.map
.collect;
let problem = new
.unwrap
.with_dependent_variance
.unwrap
.build;
let maximum_degree = 5;
let best_fit = problem.solve.unwrap;
for in response.into_iter.zip.skip.take
We can either reconstruct unknown response from known stimulus values:
use ;
let known_stimulus = new;
let estimated_response = best_fit.response;
or calculate unknown stimulus from a known response
use ;
let known_stimulus = new;
let initial_guess = None;
let max_iter = Some;
let estimated_stimulus = best_fit.stimulus;
let estimated_stimulus = best_fit.stimulus;