void enable_sigfpe | ( | void | ) |
Enable SIGFPE delivery
Referenced by main().
std::string prepend_filename | ( | const std::string & | path, | |
const std::string & | prefix | |||
) |
prepend file at the leaf of path with prefix /path/to/file becomes /path/to/prefixfile
std::string cut_path | ( | const std::string & | path | ) |
strip off the path information of a file e.g. cut_path( "test/bla/lall.fits") -> "lall.fits"
Referenced by copy_org_models(), fit_initial_dist(), main(), and refit_models().
std::string remove_extension | ( | const string & | path, | |
const string & | ext | |||
) |
return a copy of path with the filename extension ext
(after last .) stripped off e.g. remove_extension( "lall.fits", ".fits" ) -> "lall"
Referenced by copy_org_models(), fit_initial_dist(), main(), and refit_models().
std::string remove_extension | ( | const string & | path | ) |
return a copy of path with the filename extension (after last .) stripped off
std::string mktmpfile | ( | std::ofstream & | of | ) |
return a unique file name in /tmp. calls libc mktemp().
Referenced by ImStat::gnuplot_chi2_hist(), ImStat::gnuplot_rms_hist(), ImStat::gnuplot_sig_hist(), ImStat::gnuplot_sum_hist(), main(), plot_distortion(), plot_fibermodel(), and plot_fibermodel_data().
bool readNextLineFromStream | ( | std::istream & | in, | |
std::string & | buff | |||
) |
Try to read the next available line from an input filestream. Returns false if no more lines can be read. Removes leading whitespace and all characters following a '#' indicating a comment.
References readNextLineFromStream().
Referenced by ifu::init_from_stream(), and readNextLineFromStream().
void write_cmd_line | ( | std::ostream & | os, | |
const string & | version, | |||
int | argc, | |||
char * | argv[], | |||
const bool | nodate | |||
) |
write the full command line and the program version to a stream.
Referenced by main(), mkimage_dither_files(), mkimage_single_files(), and TableHeader::write_header().
void clamp_window | ( | const int | value, | |
const int | low, | |||
const int | high, | |||
const int | delta, | |||
int * | vlow, | |||
int * | vhigh | |||
) |
Clamp a value such that it is always between low and high with a margin of delta. Used for sliding a window across a frame.
Referenced by FiberModel::flat_from_data(), Measure::measure_at_ref_w(), and Measure::measure_fiberpars().
bool comp_string_size | ( | const std::string & | str1, | |
const std::string & | str2 | |||
) |
function to compare string lengths in vectors. Used compute the width of the columns in the table header
Referenced by TableHeader::write_table_header().