Commit 5e9ed5d9 authored by ILBERT Olivier's avatar ILBERT Olivier
Browse files

Avoid different ratios of emission lines if EM_LINES=NO. Improve comments for zaround.

parent 5910d3f0
......@@ -705,7 +705,8 @@ void SED::fit_chi2IR(const onesource& source, const int imagm, const string fit_
/*
Find the two redshifts which encompass the considered redshift according to the grid passed in input
Find two redshifts (redp and redn) which define the redshift range associated to this point in the redshift grid (with a redshift red).
This function is used when using ZFIX YES to associate a spectroscopic redshift with a point in the grid
*/
void SED::zaround(const vector<double>& gridz){
......@@ -716,7 +717,6 @@ void SED::zaround(const vector<double>& gridz){
if(k>0){redp=(gridz[k-1]+gridz[k])/2.;}else{redp=gridz[0];}
// next redshift in the grid
if(k<int(gridz.size())-1){redn=(gridz[k]+gridz[k+1])/2.;}else{redn=gridz[k];}
return;
}
......
......@@ -329,7 +329,12 @@ GalMag::GalMag(keymap & key_analysed) : Mag(key_analysed){
throw invalid_argument("Not the right value for EM_LINES (NO, EMP_SFR, EMP_UV, PHYS)");}
// possible dispersion within the emission lines
// indicate how many step do you want
fracEm = (key_analysed["EM_DISPERSION"]).split_double("1",-1);
// Don't fill it if EM_LINES NO
if(emlines.substr(0,2).compare("NO")!=0){
fracEm = (key_analysed["EM_DISPERSION"]).split_double("1",-1);
}else{
fracEm.push_back(1.);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment