Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Galaxies
LEPHARE
Commits
170392cf
Commit
170392cf
authored
Sep 30, 2021
by
Johann Cohen-Tanugi
Browse files
Following
4458f7d7
nbLines becomes completely useless in the FLT class
parent
4458f7d7
Changes
2
Hide whitespace changes
Inline
Side-by-side
source/flt.cpp
View file @
170392cf
...
...
@@ -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
{
...
...
source/flt.h
View file @
170392cf
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment