Class onesource
Defined in File onesource.h
Class Documentation
-
class onesource
represents an object from a catalogue, and manages its fitting to an SED.
Public Functions
-
inline onesource()
-
inline onesource(const int posC, const vector<double> &gridz)
-
inline ~onesource()
-
inline void set_verbosity(const bool v)
Set verbosity.
- Parameters:
v – bool specifying whether output should be verbose or not.
-
inline bool get_verbosity() const
Get verbosity.
- Returns:
bool specifying whether output is verbose or not.
-
void readsource(const string &identifier, const vector<double> vals, const vector<double> err_vals, const long context, const double z_spec, const string additional_input)
-
void setPriors(const array<double, 2> magabsB, const array<double, 2> magabsF)
-
void fltUsed(const long gbcont, const long contforb, const int imagm)
-
void fltUsedIR(const long fir_cont, const long fir_scale, const int imagm, vector<flt> allFilters, const double fir_lmin)
-
void rescale_flux_errors(const vector<double> min_err, const vector<double> fac_err)
-
void fit(vector<SED*> &fulllib, const vector<vector<double>> &flux, const vector<size_t> &valid, const double &funz0, const array<int, 2> &bp)
-
void fitIR(vector<SED*> &fulllib, const vector<vector<double>> &flux, const vector<size_t> &valid, const int imagm, const string fit_frsc, cosmo lcdm)
-
double nzprior(const double luv, const double lnir, const double reds, const array<int, 2> bp)
-
void rm_discrepant(vector<SED*> &fulllib, const vector<vector<double>> &flux, const vector<size_t> &valid, const double funz0, const array<int, 2> bp, double thresholdChi2)
-
void write_out(ofstream &stout, const vector<string> &outkeywords)
Write output in the lephare ascii format
- Parameters:
stout – stream object pointing to the output file
outkeywords – list of keywords to be output
-
void write_pdz_header(vector<string> pdztype, unordered_map<string, ofstream> &stpdz, const time_t &ti1)
-
void write_pdz(vector<string> pdztype, unordered_map<string, ofstream> &stpdz)
-
void convertMag()
-
void keepOri()
-
void interp(const bool zfix, const bool zintp, const cosmo &lcdm)
Update the solution of the fit based on execution flags.
Note that zfix and zintp are not supposed to both be set. In case it happens, zintp is discarded here.
- Parameters:
zfix – bool that sets whether to set solution to a given redshift, typically a true or spectroscopic redshift
zintp – bool that sets whether to improve the determination of the minimum on the chi2 curve, by parabolic approximation
lcdm –
cosmoobject to access thedistModanddistDetfunctions
- Returns:
zmin and dmmin are reevaluated, for types GAL and QSO
-
void uncertaintiesMin()
-
void uncertaintiesBay()
-
void generatePDF(vector<SED*> &fulllib, const vector<size_t> &va, const vector<int> fltColRF, int fltREF, const bool zfix)
-
void mode()
-
void adapt_mag(vector<double> a0)
-
void absmag(const vector<vector<int>> &bestFlt, const vector<vector<double>> &maxkcolor, cosmo lcdm, const vector<double> gridz)
-
void writeSpec(vector<SED*> &fulllib, vector<SED*> &fulllibIR, cosmo lcdm, vector<opa> opaAll, const vector<flt> &allFilters, const string outspdir)
-
void writeFullChi(const vector<SED*> &fulllib)
Write out in a Id<source id>.chi file the chi2 of all the templates participating to the fit.
- Parameters:
fulllib – : the library of SED objects.
-
void computePredAbsMag(vector<SED*> &fulllib, cosmo lcdm, vector<opa> opaAll, vector<flt> allFltAdd)
-
void limits(vector<SED*> &fulllib, vector<double> &limits_zbin, int limits_ref, vector<int> &limits_sel, vector<double> &limits_cut)
Public Members
-
unordered_map<string, double> results = {{"MASS_BEST", INVALID_PHYS}, {"SFR_BEST", INVALID_PHYS}, {"SSFR_BEST", INVALID_PHYS}, {"LDUST_BEST", INVALID_PHYS}, {"LUM_TIR_BEST", INVALID_PHYS}, {"AGE_BEST", INVALID_PHYS}, {"EBV_BEST", INVALID_PHYS}, {"EXTLAW_BEST", INVALID_PHYS}, {"LUM_NUV_BEST", INVALID_PHYS}, {"LUM_R_BEST", INVALID_PHYS}, {"LUM_K_BEST", INVALID_PHYS},}
-
unordered_map<string, double> results_emission_lines
-
long cont
-
long new_cont
-
vector<double> ab
-
vector<double> sab
-
vector<double> mab
-
vector<double> msab
-
vector<double> magm
-
vector<double> magm0
-
vector<double> absmagPred
-
vector<double> magPred
-
vector<double> kap
-
vector<double> mabs
-
vector<double> emabs
-
vector<double> ab_ori
-
vector<double> mab_ori
-
vector<double> abIR
-
vector<double> sabIR
-
vector<int> busnorma
-
vector<int> busul
-
vector<int> busfir
-
vector<int> bscfir
-
vector<int> absfilt
-
string spec
-
string str_inp
-
int pos
-
int nbused
-
int nbul
-
int nbusIR
-
int indminSec
-
int indminIR
-
double zs
-
double dm
-
double consiz
-
array<double, 3> zmin
-
array<double, 3> chimin
-
array<double, 3> dmmin
-
array<int, 3> indmin
-
array<int, 3> imasmin
-
double zminIR
-
double chiminIR
-
double dmminIR
-
double imasminIR
-
array<double, 4> priorLib
-
vector<double> chibay
-
vector<double> gridzg
-
vector<double> gridLdustIR
-
vector<double> gridEbv
-
vector<double> gridLIR
-
vector<double> zgmed
-
vector<double> zgmin
-
vector<double> zgmode
-
vector<double> zqmed
-
vector<double> zqmin
-
vector<double> zqmode
-
vector<double> massmed
-
vector<double> SFRmed
-
vector<double> sSFRmed
-
vector<double> agemed
-
vector<double> Ldustmed
-
vector<double> LIRmed
-
vector<double> col1med
-
vector<double> col2med
-
vector<double> ebvmed
-
vector<double> Mrefmed
-
array<double, 65> fluxEL_SED = {0}
-
double limits_zmax = 20.
-
double limits_Mfaint = 0
-
double zsec
-
double zsecChi2
-
double zsecEbv
-
double zsecScale
-
double zsecProb
-
double zsecAge
-
int zsecMod
-
int zsecExtlaw
-
inline onesource()