class to fit basic image parameters sum, rms, chi squared and sigma of a given image. After construction the respective fit range must be set.
Example: ImStat stat(file, "e." + file, dist, g.boxsize, g.nbins );
stat.set_sum_range(g.sum_h_range);
cout << "plot " << stat.gnuplot_sum_hist(file) << ", " << stat.gnuplot_sum(*fi);
ImStat::ImStat | ( | const string & | testframe, | |
const string & | errorframe, | |||
const string & | distfile, | |||
const int | boxsize = 8 , |
|||
const int | nbins = 1001 | |||
) |
References D_, I_, Ie_, and Distortion::init_from_file().
ImStat::ImStat | ( | MArray< float, 2 > & | I_n, | |
MArray< float, 2 > & | Ie_n, | |||
Distortion & | D, | |||
const int | boxsize = 8 , |
|||
const int | nbins = 1001 | |||
) |
void ImStat::set_nbins | ( | const int | nbins | ) |
References chi2_fitted_, have_chi2_hist_, have_rms_hist_, have_sig_hist_, have_sum_hist_, nbins_, rms_fitted_, sig_fitted_, and sum_fitted_.
void ImStat::set_boxsize | ( | const int | boxsize | ) |
References boxsize_, chi2_fitted_, have_chi2_hist_, have_rms_hist_, have_sig_hist_, have_sum_hist_, rms_fitted_, sig_fitted_, and sum_fitted_.
void ImStat::set_sum_range | ( | float * | range | ) | [inline] |
References have_sum_hist_, sum_fitted_, and sum_range_.
Referenced by main().
void ImStat::set_rms_range | ( | float * | range | ) | [inline] |
References have_rms_hist_, rms_fitted_, and rms_range_.
Referenced by main().
void ImStat::set_chi2_range | ( | float * | range | ) | [inline] |
References chi2_fitted_, chi2_range_, and have_chi2_hist_.
Referenced by main().
void ImStat::set_sig_range | ( | float * | range | ) | [inline] |
References have_sig_hist_, sig_fitted_, and sig_range_.
Referenced by main().
float ImStat::fit_sum | ( | ) |
References make_sum_hist(), sum_chi2_, sum_errors_, sum_fitted_, sum_max_, sum_params_, and sum_range_.
Referenced by get_sum_errors(), get_sum_max(), get_sum_params(), and gnuplot_sum().
string ImStat::gnuplot_sum | ( | const string & | title = "" |
) |
References fit_sum(), sum_chi2_, sum_fitted_, and sum_params_.
Referenced by main().
string ImStat::gnuplot_sum_hist | ( | const string & | title = "" , |
|
const bool | steps = false | |||
) |
References mktmpfile(), and write_sum_hist().
Referenced by main().
void ImStat::write_sum_hist | ( | ofstream & | of | ) |
References make_sum_hist(), sum_range_, and write_hist().
Referenced by gnuplot_sum_hist().
float ImStat::get_sum_max | ( | ) | [inline] |
References fit_sum(), sum_fitted_, and sum_max_.
Referenced by main().
ltl::FVector<float,4> ImStat::get_sum_params | ( | ) | [inline] |
References fit_sum(), sum_fitted_, and sum_params_.
Referenced by main().
ltl::FVector<float,4> ImStat::get_sum_errors | ( | ) | [inline] |
References fit_sum(), sum_errors_, and sum_fitted_.
float ImStat::fit_rms | ( | ) |
References make_rms_hist(), rms_chi2_, rms_errors_, rms_fitted_, rms_max_, rms_params_, and rms_range_.
Referenced by get_rms_errors(), get_rms_max(), get_rms_params(), and gnuplot_rms().
string ImStat::gnuplot_rms | ( | const string & | title = "" |
) |
References fit_rms(), rms_chi2_, rms_fitted_, and rms_params_.
Referenced by main().
string ImStat::gnuplot_rms_hist | ( | const string & | title = "" , |
|
const bool | steps = false | |||
) |
References mktmpfile(), and write_rms_hist().
Referenced by main().
void ImStat::write_rms_hist | ( | ofstream & | of | ) |
References make_rms_hist(), rms_range_, and write_hist().
Referenced by gnuplot_rms_hist().
float ImStat::get_rms_max | ( | ) | [inline] |
References fit_rms(), rms_fitted_, and rms_max_.
Referenced by main().
ltl::FVector<float,6> ImStat::get_rms_params | ( | ) | [inline] |
References fit_rms(), rms_fitted_, and rms_params_.
Referenced by main().
ltl::FVector<float,6> ImStat::get_rms_errors | ( | ) | [inline] |
References fit_rms(), rms_errors_, and rms_fitted_.
float ImStat::fit_chi2 | ( | ) |
References boxsize_, chi2_chi2_, chi2_errors_, chi2_fitted_, chi2_max_, chi2_params_, chi2_range_, and make_chi2_hist().
Referenced by get_chi2_errors(), get_chi2_max(), get_chi2_params(), and gnuplot_chi2().
string ImStat::gnuplot_chi2 | ( | const string & | title = "" |
) |
References boxsize_, chi2_chi2_, chi2_fitted_, chi2_params_, and fit_chi2().
Referenced by main().
string ImStat::gnuplot_chi2_hist | ( | const string & | title = "" , |
|
const bool | steps = false | |||
) |
References mktmpfile(), and write_chi2_hist().
Referenced by main().
void ImStat::write_chi2_hist | ( | ofstream & | of | ) |
References chi2_range_, make_chi2_hist(), and write_hist().
Referenced by gnuplot_chi2_hist().
float ImStat::get_chi2_max | ( | ) | [inline] |
References chi2_fitted_, chi2_max_, and fit_chi2().
Referenced by main().
ltl::FVector<float,2> ImStat::get_chi2_params | ( | ) | [inline] |
References chi2_fitted_, chi2_params_, and fit_chi2().
Referenced by main().
ltl::FVector<float,2> ImStat::get_chi2_errors | ( | ) | [inline] |
References chi2_errors_, chi2_fitted_, and fit_chi2().
float ImStat::fit_sig | ( | ) |
References make_sig_hist(), sig_chi2_, sig_errors_, sig_fitted_, sig_max_, sig_params_, and sig_range_.
Referenced by get_sig_errors(), get_sig_max(), get_sig_params(), and gnuplot_sig().
string ImStat::gnuplot_sig | ( | const string & | title = "" |
) |
References fit_sig(), sig_chi2_, sig_fitted_, and sig_params_.
Referenced by main().
string ImStat::gnuplot_sig_hist | ( | const string & | title = "" , |
|
const bool | steps = false | |||
) |
References mktmpfile(), and write_sig_hist().
Referenced by main().
void ImStat::write_sig_hist | ( | ofstream & | of | ) |
References make_sig_hist(), sig_range_, and write_hist().
Referenced by gnuplot_sig_hist().
float ImStat::get_sig_max | ( | ) | [inline] |
References fit_sig(), sig_fitted_, and sig_max_.
Referenced by main().
ltl::FVector<float,4> ImStat::get_sig_params | ( | ) | [inline] |
References fit_sig(), sig_fitted_, and sig_params_.
Referenced by main().
ltl::FVector<float,4> ImStat::get_sig_errors | ( | ) | [inline] |
References fit_sig(), sig_errors_, and sig_fitted_.
MArray< float, 1 > ImStat::make_rms_hist | ( | ) | [protected] |
References have_rms_hist_, make_hist(), rms_(), rms_hist_, rms_max_, and rms_range_.
Referenced by fit_rms(), and write_rms_hist().
MArray< float, 1 > ImStat::make_sum_hist | ( | ) | [protected] |
References have_sum_hist_, make_hist(), sum_(), sum_hist_, sum_max_, and sum_range_.
Referenced by fit_sum(), and write_sum_hist().
MArray< float, 1 > ImStat::make_chi2_hist | ( | ) | [protected] |
References chi2_(), chi2_hist_, chi2_max_, chi2_range_, have_chi2_hist_, and make_hist().
Referenced by fit_chi2(), and write_chi2_hist().
MArray< float, 1 > ImStat::make_sig_hist | ( | ) | [protected] |
References have_sig_hist_, make_hist(), sig_(), sig_hist_, sig_max_, and sig_range_.
Referenced by fit_sig(), and write_sig_hist().
void ImStat::write_hist | ( | ofstream & | out, | |
MArray< float, 1 > | hist, | |||
const float * | range | |||
) | [protected] |
References nbins_.
Referenced by write_chi2_hist(), write_rms_hist(), write_sig_hist(), and write_sum_hist().
MArray<float, 1> ImStat::make_hist | ( | Fct | f, | |
const float * | range, | |||
float & | maxh | |||
) | [inline, protected] |
References b, boxsize_, D_, Distortion::get_reference_f(), I_, Ie_, Distortion::map_xf_y(), and nbins_.
Referenced by make_chi2_hist(), make_rms_hist(), make_sig_hist(), and make_sum_hist().
float ImStat::fit_ | ( | const Fct & | func, | |
float * | range, | |||
const MArray< float, 1 > | Y, | |||
ltl::FVector< float, NPar > & | params, | |||
ltl::FVector< float, NPar > & | errors, | |||
const ltl::FVector< bool, NPar > & | ignore | |||
) | [inline, protected] |
References nbins_.
string ImStat::version [static] |
bool ImStat::sum_fitted_ [protected] |
Referenced by fit_sum(), get_sum_errors(), get_sum_max(), get_sum_params(), gnuplot_sum(), set_boxsize(), set_nbins(), and set_sum_range().
bool ImStat::have_sum_hist_ [protected] |
Referenced by make_sum_hist(), set_boxsize(), set_nbins(), and set_sum_range().
float ImStat::sum_range_[2] [protected] |
Referenced by fit_sum(), make_sum_hist(), set_sum_range(), and write_sum_hist().
float ImStat::sum_max_ [protected] |
Referenced by fit_sum(), get_sum_max(), and make_sum_hist().
MArray<float,1> ImStat::sum_hist_ [protected] |
Referenced by make_sum_hist().
ltl::FVector<float,4> ImStat::sum_params_ [protected] |
Referenced by fit_sum(), get_sum_params(), and gnuplot_sum().
ltl::FVector<float,4> ImStat::sum_errors_ [protected] |
Referenced by fit_sum(), and get_sum_errors().
float ImStat::sum_chi2_ [protected] |
Referenced by fit_sum(), and gnuplot_sum().
bool ImStat::rms_fitted_ [protected] |
Referenced by fit_rms(), get_rms_errors(), get_rms_max(), get_rms_params(), gnuplot_rms(), set_boxsize(), set_nbins(), and set_rms_range().
bool ImStat::have_rms_hist_ [protected] |
Referenced by make_rms_hist(), set_boxsize(), set_nbins(), and set_rms_range().
float ImStat::rms_range_[2] [protected] |
Referenced by fit_rms(), make_rms_hist(), set_rms_range(), and write_rms_hist().
float ImStat::rms_max_ [protected] |
Referenced by fit_rms(), get_rms_max(), and make_rms_hist().
MArray<float,1> ImStat::rms_hist_ [protected] |
Referenced by make_rms_hist().
ltl::FVector<float,6> ImStat::rms_params_ [protected] |
Referenced by fit_rms(), get_rms_params(), and gnuplot_rms().
ltl::FVector<float,6> ImStat::rms_errors_ [protected] |
Referenced by fit_rms(), and get_rms_errors().
float ImStat::rms_chi2_ [protected] |
Referenced by fit_rms(), and gnuplot_rms().
bool ImStat::chi2_fitted_ [protected] |
Referenced by fit_chi2(), get_chi2_errors(), get_chi2_max(), get_chi2_params(), gnuplot_chi2(), set_boxsize(), set_chi2_range(), and set_nbins().
bool ImStat::have_chi2_hist_ [protected] |
Referenced by make_chi2_hist(), set_boxsize(), set_chi2_range(), and set_nbins().
float ImStat::chi2_range_[2] [protected] |
Referenced by fit_chi2(), make_chi2_hist(), set_chi2_range(), and write_chi2_hist().
float ImStat::chi2_max_ [protected] |
Referenced by fit_chi2(), get_chi2_max(), and make_chi2_hist().
MArray<float,1> ImStat::chi2_hist_ [protected] |
Referenced by make_chi2_hist().
ltl::FVector<float,2> ImStat::chi2_params_ [protected] |
Referenced by fit_chi2(), get_chi2_params(), and gnuplot_chi2().
ltl::FVector<float,2> ImStat::chi2_errors_ [protected] |
Referenced by fit_chi2(), and get_chi2_errors().
float ImStat::chi2_chi2_ [protected] |
Referenced by fit_chi2(), and gnuplot_chi2().
bool ImStat::sig_fitted_ [protected] |
Referenced by fit_sig(), get_sig_errors(), get_sig_max(), get_sig_params(), gnuplot_sig(), set_boxsize(), set_nbins(), and set_sig_range().
bool ImStat::have_sig_hist_ [protected] |
Referenced by make_sig_hist(), set_boxsize(), set_nbins(), and set_sig_range().
float ImStat::sig_range_[2] [protected] |
Referenced by fit_sig(), make_sig_hist(), set_sig_range(), and write_sig_hist().
float ImStat::sig_max_ [protected] |
Referenced by fit_sig(), get_sig_max(), and make_sig_hist().
MArray<float,1> ImStat::sig_hist_ [protected] |
Referenced by make_sig_hist().
ltl::FVector<float,4> ImStat::sig_params_ [protected] |
Referenced by fit_sig(), get_sig_params(), and gnuplot_sig().
ltl::FVector<float,4> ImStat::sig_errors_ [protected] |
Referenced by fit_sig(), and get_sig_errors().
float ImStat::sig_chi2_ [protected] |
Referenced by fit_sig(), and gnuplot_sig().
MArray<float,2> ImStat::I_ [protected] |
Referenced by ImStat(), and make_hist().
MArray<float,2> ImStat::Ie_ [protected] |
Referenced by ImStat(), and make_hist().
Distortion ImStat::D_ [protected] |
Referenced by ImStat(), and make_hist().
int ImStat::boxsize_ [protected] |
Referenced by fit_chi2(), gnuplot_chi2(), make_hist(), and set_boxsize().
int ImStat::nbins_ [protected] |
Referenced by fit_(), make_hist(), set_nbins(), and write_hist().