Syntax:
-linfit function paramlist ["modelvar" varname] ["correctlc"] ["omodel" model_outdir] Example 1.$ ./vartools -i EXAMPLES/1 \ -stats t min \ -expr t0=STATS_t_MIN_0 \ -linfit 'a*(t-t0)^2+b*(t-t0)+c' 'a,b,c' \ -oneline Name = EXAMPLES/1 STATS_t_MIN_0 = 53725.173920000001 Linfit_a_2 = 0.00025540627746042932 Linfit_erra_2 = 1.9561241332987699e-07 Linfit_b_2 = 0.0097933162509034055 Linfit_errb_2 = 5.9117874714733109e-06 Linfit_c_2 = 10.083037598482507 Linfit_errc_2 = 3.2584974556662493e-05
Fit a quadratic function in time to the light curve EXAMPLES/1 using the -linfit command. We first determine the minimum time value using the -stats command, and store it in the variable t0 with the -expr command. For the -linfit command we fit the function 'a*(t-t0)^2+b*(t-t0)+c' where we subtract the t0 to avoid round-off errors accumulating and producing a bad fit. We then give the list of free parameters as a,b,c. The output table gives the best-fit value and standard error for each free parameter.