Commit 170392cf authored by Johann Cohen-Tanugi's avatar Johann Cohen-Tanugi
Browse files

Following 4458f7d7 nbLines becomes completely useless in the FLT class

parent 4458f7d7
......@@ -60,8 +60,6 @@ void flt::read(string fltFile) {
// build the filter by adding this element
lamb_trans.push_back(litOne);
//Count lines
nbLines++;
}
}
......@@ -72,9 +70,6 @@ void flt::read(string fltFile) {
// Sort the filter, remove the low values on the edge, be sure that the extreme points are ending with 0
clean();
//Final number of lines after cleaning
nbLines=lamb_trans.size();
return;
}
......@@ -84,7 +79,7 @@ void flt::read(string fltFile) {
*/
void flt::read(ifstream& sfiltIn) {
int bid;
int bid, nbLines;
char firstChar;
// read the line with the comments
......@@ -150,7 +145,7 @@ void flt::clean() {
*/
double flt::lmin() const{
//protect against constructor that does not initialize lamb_trans
if(nbLines > 0) {
if(lamb_trans.size() > 0) {
//lamb_trans is expected to be sorted already
return lamb_trans.front().lamb;
} else {cout<<"flt::lmin called on non initialized lamb_trans vector"<<endl;exit(1);}
......@@ -161,7 +156,7 @@ double flt::lmin() const{
*/
double flt::lmax() const{
//protect against constructor that does not initialize lamb_trans
if(nbLines > 0) {
if(lamb_trans.size() > 0) {
//lamb_trans is expected to be sorted already
return lamb_trans.back().lamb;
} else {
......
......@@ -22,7 +22,7 @@ class flt
public:
vector<oneElLambda> lamb_trans;
int nbLines,id;
int id;
string name;
int transtyp,calibtyp;
double leff,lmean,dwidth,ab,tg,veg,msun,fcorr,tpeak;
......@@ -45,7 +45,6 @@ class flt
veg=-99.;
msun=-99.;
fcorr=-99.;
nbLines=0;
name=cname;
transtyp=transt;
calibtyp=calibt;
......@@ -68,7 +67,6 @@ class flt
veg=-99.;
msun=-99.;
fcorr=-99.;
nbLines=nsteps;
name="Heavy";
transtyp=0;
calibtyp=0;
......
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