@@ -81,26 +81,27 @@ double average_over_wl_range(std::vector<float> rad, std::vector<float> wl,
81
81
vector<Messung_Limb> make_messung_limb_vector (string Dateiname,
82
82
std::vector<Limb_Datensatz> &Limbdaten, std::vector<float > &Wellenlaengen,
83
83
int no_of_alt, int no_of_pix, int Datum[6 ], float cent_lat_lon[10 ],
84
- float orbit_phase, int no_of_heights, int offset, int direction)
84
+ float orbit_phase, int no_of_heights, int offset, int direction,
85
+ double dark_sig)
85
86
{
86
87
bool has_straylight = false ;
87
88
// dark signal and error
88
89
// constant dark signal (default and fall-back)
89
90
// dark_sig = 2.731e9;
90
- double dark_sig = 3.9e9 ;
91
+ // double dark_sig = 3.9e9;
92
+ // double dark_sig = 0.0;
91
93
double dark_err = 0.0 ;
92
- /*
94
+
95
+ if (dark_sig == -1 .) {
93
96
// normal average or median for the dark signal correction
94
97
dark_sig = average_over_wl_range (Limbdaten[no_of_alt - 1 ].m_radiance ,
95
98
Wellenlaengen, 238.0 , 282.0 , true );
96
99
dark_err = average_over_wl_range (Limbdaten[no_of_alt - 1 ].m_error ,
97
100
Wellenlaengen, 238.0 , 282.0 , true );
98
- // */
99
101
100
- /*
101
102
if (dark_sig > 6 .e9 )
102
103
has_straylight = true ;
103
- // */
104
+ }
104
105
std::cerr << " dark signal: " << dark_sig << std::endl;
105
106
106
107
// 4. Erstellung des Übergabevektors
@@ -170,7 +171,7 @@ vector<Messung_Limb> make_messung_limb_vector(string Dateiname,
170
171
// //////////////////////////////////////////////////////////////////////////////
171
172
vector<Messung_Limb> ReadL1C_Limb_mpl_binary (string Dateiname,
172
173
Messung_Limb &Troposphaerische_Saeule, Messung_Limb &mean_10_20,
173
- int Anzahl_Hoehen)
174
+ int Anzahl_Hoehen, double dark_bg )
174
175
{
175
176
// binärdateien sind nicht gepackt(das wär einfach nicht effizient)...
176
177
// ansonsten hier packen und später entpacken
@@ -216,7 +217,7 @@ vector<Messung_Limb> ReadL1C_Limb_mpl_binary(string Dateiname,
216
217
Ergebnisvektor
217
218
= make_messung_limb_vector (Dateiname, Limbdaten, Wellenlaengen,
218
219
no_of_alt, no_of_pix, Datum, Center_Lat_Lon, orbit_phase,
219
- Anzahl_Hoehen, no_of_alt - Anzahl_Hoehen - 1 , 1 );
220
+ Anzahl_Hoehen, no_of_alt - Anzahl_Hoehen - 1 , 1 , dark_bg );
220
221
221
222
// Teile von Schritt 4 nochmal für die Troposhärische Säule
222
223
// Eigentlich reichen Intensitäten
@@ -274,7 +275,8 @@ vector<Messung_Limb> ReadL1C_Limb_meso_thermo_mpl_binary(string Dateiname,
274
275
// //////////////////////////////////////////////////////////////////////////////
275
276
vector<Messung_Limb>
276
277
ReadL1C_Limb_meso_thermo_mpl_binary_reduziert (string Dateiname,
277
- Messung_Limb &niedrigste_Hoehe, Messung_Limb &space, int Anzahl_Hoehen)
278
+ Messung_Limb &niedrigste_Hoehe, Messung_Limb &space, int Anzahl_Hoehen,
279
+ double dark_bg)
278
280
{
279
281
// Hier wieder nur Höhen von 70 bis 90 km....(einziger unterschied liegt in
280
282
// der for schleife die nur bis 7 geht)
@@ -328,7 +330,7 @@ ReadL1C_Limb_meso_thermo_mpl_binary_reduziert(string Dateiname,
328
330
Ergebnisvektor
329
331
= make_messung_limb_vector (Dateiname, Limbdaten, Wellenlaengen,
330
332
no_of_alt, no_of_pix, Datum, Center_Lat_Lon, orbit_phase,
331
- Anzahl_Hoehen, Anzahl_Hoehen - 1 , -1 );
333
+ Anzahl_Hoehen, Anzahl_Hoehen - 1 , -1 , dark_bg );
332
334
333
335
// Teile von Schritt 4 nochmal für die niedrigste Höhe
334
336
// Eigentlich reichen Intensitäten
@@ -339,7 +341,7 @@ ReadL1C_Limb_meso_thermo_mpl_binary_reduziert(string Dateiname,
339
341
// It then returns the only element as the "space" limb scan as requested.
340
342
space = make_messung_limb_vector (Dateiname, Limbdaten, Wellenlaengen,
341
343
no_of_alt, no_of_pix, Datum, Center_Lat_Lon, orbit_phase,
342
- 1 , Anzahl_Hoehen, +1 ).front ();
344
+ 1 , Anzahl_Hoehen, +1 , dark_bg ).front ();
343
345
344
346
return Ergebnisvektor;
345
347
}
0 commit comments