OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
L1B_Tables.h
Go to the documentation of this file.
1 #ifndef L1B_TABLES_H
2 #define L1B_TABLES_H
3 
4 #include "Granule.h" /* contain hdf.h, mfhdf.h, etc, and the definition of macros */
5 
6 /*
7 !C-INC**********************************************************************
8 !Description: Header file L1B_Tables.h to be included in files where the
9  lookup table routines are defined.
10 
11 !Revision History:
12  $Log: L1B_Tables.h,v $
13  Revision 1.59 2017-08-02 10:41:22-04 xgeng
14  Aqua V6.2.1 update for C6.1 reprcoessing
15 
16  Revision 1.58 2017-04-20 09:41:56-04 xgeng
17  PGE02 update for MODIS processing on CentOS 7 system
18 
19  Revision 1.56 2015-03-17 10:09:24-04 xgeng
20  Fix the anomaly before and after the sector rotation due to the timing mismatch between the command performed and the status updated.
21 
22  Revision 1.55 2014-10-02 13:37:51-04 xgeng
23  Added doi attributes to NRT product
24 
25  Revision 1.54 2014-01-30 14:27:02-05 xgeng
26  Migrate to SDP Toolkit 5.2.17
27 
28  Revision 1.53 2012-06-21 16:07:05-04 xgeng
29  added doi metadata
30 
31  Revision 1.52 2011-07-28 15:30:07-04 xgeng
32  Added 3 new luts for the Aqua default b1 algorithm change
33 
34  Revision 1.50 2011-04-19 13:46:52-04 ltan
35  PGE02_VERSION updated
36 
37  Revision 1.49 2011-04-07 18:04:59-04 xgeng
38  1. RSB &TEB uncertainty algorithm update; 2. The quadratic RSB RVS changed to 4th order.
39 
40  Revision 1.46 2010-11-15 11:23:22-05 xgeng
41  PGE02_VERSION updated to 6.1.9
42 
43  Revision 1.44 2009/11/27 19:18:28 xgeng
44  PGE02_VERSION updated to V6.1.7
45 
46  Revision 1.43 2009/08/31 17:40:19 xgeng
47  Change LOG to Log
48 
49  Revision 1.38 2009/07/24 15:50:46 xgeng
50  PGE Version updated to 6.1.3
51 
52  Revision 1.37 2008/12/24 15:50:46 xgeng
53  PGE Version updated to 6.1.1
54 
55  Revision 1.36, Janurary 7, 2007 Razor Issue #216
56  Added a new QA table name "DET_QUAL_FLAG2_VALS_LUT_NAME"
57  Added "Detector_Quality_Flag2_Values" and "Detector_Quality_Flag2"
58  in structure common_QA_tables_t
59  Updated PGE02_VERSION
60  Xu Geng, SAIC GSO (xu.geng@saic.com)
61 
62  Revision 1.35 2008/01/24 15:50:46 ltan
63  PGE02_VERSION updated for version 5.0.35
64 
65  Revision 1.33 2006/10/30 20:28:56 ltan
66  Changed for ANSI-C compliance. Correction for the generation of code change log. Comments updated.
67 
68  Revision 03.22, October 15, 2004 Razor Issue #201
69  Added a new dimension of Mirror Side to array "Band_21_b1".
70  Liqin Tan, SAIC GSO (ltan@saicmodis.com)
71 
72  Revision 03.21, October 15, 2004 Razor Issue #199
73  Added a new macro definition of "SWIR_CORR_SENDING_DETECTOR_LUT_NAME".
74  Added a new one-dimension array of "SWIR_corr_sending_detector" in
75  structure SWIR_correction_tables_t.
76  Liqin Tan, SAIC GSO (ltan@saicmodis.com)
77 
78  Revision 03.20, November 7, 2003
79  Increased buffer sizes for ALGORITHMPACKAGEMATURITYCODE and MISSION_PHASE
80  to 15.
81  Alice Isaacman, SAIC GSO (Alice.R.Isaacman.1@gsfc.nasa.gov)
82 
83  Revision 03.19, October 31, 2003 Razor Issue #195
84  Removed LUT ProcessingCenter from the QA LUT structure. Removed macros
85  "MAX_PROCESSINGCENTER_BUFFER" and "PROCESSING_CENTER_LUT_NAME.
86  Liqin Tan, SAIC GSO (ltan@saicmodis.com)
87 
88  Revision 03.18 October 24, 2003 Razor Issue #196 (formerly Issue #184)
89  Added LUTs roll_threshold_angle, pitch_threshold_angle, and
90  yaw_threshold_angle to QA LUT structure. Added macro
91  "NUM_ATTITUDE_ANGLES".
92  Liqin Tan, SAIC GSO (ltan@saicmodis.com)
93 
94  Revision 03.17 March 26, 2003 Razor Issue #190
95  Added LUTs "B26_B5_Corr", "B26_B5_Corr_Switch",
96  "B26_B5_Frame_Offset", previously added to Terra code
97  (Razor Issue #182)
98  Alice Isaacman, SAIC GSO (Alice.R.Isaacman.1@gsfc.nasa.gov)
99 
100  Revision 03.16 March 26, 2003 Razor Issue #191
101  Added SWIR OOB sending band LUT structure.
102  Alice Isaacman, SAIC GSO (Alice.R.Isaacman.1@gsfc.nasa.gov)
103 
104  Revision 03.15 Oct. 3, 2002 Razor Issue #187
105  Removed R_star from refl_tables_t structure.
106  Liqin Tan, SAIC GSO (ltan@saicmodis.com)
107 
108  Revision 03.14 July 2, 2002 Razor Issue #161
109  Added function prototypes for BDSM_index and Expand_BDSM_LUTs.
110  Gwyn Fireman, SAIC-GSO <Gwyn.Fireman@gsfc.nasa.gov>
111 
112  Revision 03.13 June 5, 2002 Razor Issue #183
113  Change type of dn_sat_ev to float64.
114  Alice Isaacman, SAIC GSO (Alice.R.Isaacman.1@gsfc.nasa.gov)
115 
116  Revision 03.12 March 25, 2002 Razor Issue #178
117  Remove ADC Correction and Associated LUTs
118  Alice Isaacman, SAIC GSO (Alice.R.Isaacman.1@gsfc.nasa.gov)
119 
120  Revision 03.1 March 8, 2002 Razor Issue #174
121  Removed LUTs "RVS_250m", "RVS_500m", "RVS_1km_RefSB", "RVS_1km_Emiss_SV",
122  "RVS_1km_Emiss_BB", "RVS_1km_Emiss_EV"
123  Added LUTs "RVS_RefSB", "RVS_TEB", "RVS_BB_SV_Frame_No"
124  Alice Isaacman, SAIC GSO (Alice.R.Isaacman.1@gsfc.nasa.gov)
125 
126  Revision 03.08 January 27, 2002
127  Razor Issue #175: Added new LUTs BB_T_SAT_SWITCH_AQUA, BB_T_SAT_AQUA,
128  BB_T_SAT_DEFAULT_B1_AQUA to emiss_tables_t for use with Aqua.
129  Razor Issue #179: Changed maximum number of allowable wavelengths for
130  RSR tables to 66 to accomodate Aqua
131  Alice Isaacman (Alice.R.Isaacman.1@gsfc.nasa.gov)
132 
133  Revision 03.07 November 6, 2001 Razor Issue #166
134  Added runtime_params to argument list for Read_Lookup_Tables
135  Alice Isaacman, SAIC GSO (Alice.R.Isaacman.1@gsfc.nasa.gov)
136 
137  Revision 03.06 March 26, 2001, Razor Issue 159
138  Added new LUT dn_sat_ev and removed LUT DN_sat
139  Alice Isaacman (Alice.R.Isaacman.1@gsfc.nasa.gov)
140 
141  Revision 03.05 March 5, 2001, Razor Issue 156
142  Added TDLUT_PIECEWISE_LINEAR, TDLUT_ALGORITHM_ATTR_NAME, and
143  TDLUT_PIECEWISE_LINEAR_TIMES. Added function prototype for
144  TDLUT_ReadPiecewiseLinearFunction.
145  Alice Isaacman (Alice.R.Isaacman.1@gsfc.nasa.gov)
146 
147 
148  Revision 03.04 December 19, 2000, Razor issue 148
149  Changed num_overlap_scans_b1_T_bb to num_overlap_scans_b1 and
150  deleted num_overlap_scans_temps.
151  Jim Rogers (rogers@mcst.gsfc.nasa.gov)
152 
153  Revision 03.03 December 8, 2000, Razor issue 143
154  Esun, Radiance Scales and Offsets
155  Jim Rogers (rogers@mcst.gsfc.nasa.gov)
156 
157  Revision 03.02 December 1, 2000
158  Changed for new SWIR correction algorithm, issue 145.
159  Jim Rogers (rogers@mcst.gsfc.nasa.gov)
160 
161  Revision 03.02 October 29, 2000
162  Added common QA LUT "Control options" for Razor issue 142.
163  NOTE: earlier added emissive LUT "SV_DN_moon_include_frames"
164  Jim Rogers (rogers@mcst.gsfc.nasa.gov)
165 
166  ... (gap) ...
167 
168  Revision 03.01 December 22, 1999
169  Revised the variables and structure members. The same variables which
170  define the LUTs are also used by the LUTs generation code.
171  Jim Rogers (rogers@mcst.gsfc.nasa.gov)
172 
173  Revision 03.00 November 17, 1999
174  Completely revised the organization to allow for valid range checking
175  and to enable ease of writing meaningful error messages.
176  Add new versioning strategy.
177  Jim Rogers (rogers@mcst.gsfc.nasa.gov)
178 
179  Revision 02.17 August 23, 1999
180  Removed LUT INT_correction_switch
181  Zhenying Gu (zgu@mcst.gsfc.nasa.gov)
182 
183  Revision 02.16 August 12, 1999
184  Added macros and variables for LUTs L_Max and L_Min
185  Zhenying Gu (zgu@mcst.gsfc.nasa.gov)
186 
187  Revision 02.15 April 12, 1999
188  Removed A3 lookup table.
189  Steven Gu(zgu@mcst.gsfc.nasa.gov)
190 
191  Revision 02.10 April 9, 1998
192  Changed LUT "Time_gain_factor" to
193  "Time_gain_factor_rad".
194  Added 2 new Reflective LUTs:
195  "Time_gain_factor_refl", and "L_SD".
196  David Catozzi (cato@ltpmail.gsfc.nasa.gov)
197 
198  Revision 02.10 April 1998
199  Removed the Cleanup_Emiss_Tables(), read_SIL_All_Bands(),
200  SIL_Lookup(), and SIL_Cleanup() prototypes and the SIL_t
201  type definition. (they're obsolete).
202  David Catozzi (cato@ltpmail.gsfc.nasa.gov)
203 
204  Revision 02.10 Mar. 1998
205  added the SWIR_correction_tables_t
206  structure and an instance of this new
207  type in the refl_tables_t structure.
208  updated the refl_table dimension constants.
209  updated the refl_table table names.
210  got rid of DIL_t and it's supporting functions.
211  David Catozzi (cato@ltpmail.gsfc.nasa.gov)
212 
213  Revision 02.10 Mar. 1998
214  updated the emiss_tables_t
215  added a new structure: QA_tables_t
216  updated the emiss_table dimension constants
217  updated the emiss_table table names
218  deleted constants from V2.0 of V vs L algo
219  Shi-Yue Qiu (syqiu@ltpmail.gsfc.nasa.gov)
220 
221  Revision 02.00 Dec. 1996
222  Summarized L1B_Tables.h, HDF_Tables.h, and part of Gen_Lib.h;
223  added new lookup tables for L1B_v2.
224  Zhidong Hao (hao@acrobat.gsfc.nasa.gov)
225 
226  Revision 01.00 1996/01/29 13:54:59
227  Initial development
228  John Hannon(hannon@highwire.gsfc.nasa.gov)
229  Joan Baden(baden@highwire.gsfc.nasa.gov)
230 
231 !Team-unique Header:
232  This software is developed by the MODIS Characterization Support
233  Team (MCST)for the National Aeronautics and Space Administration,
234  Goddard Space Flight Center, under contract NAS5-32373.
235 
236 !References and Credits:
237  HDF portions developed at the National Center for Supercomputing
238  Applications at the University of Illinois at Urbana-Champaign.
239 
240 !Design Notes:
241 
242  Currently, the maximum rank is 5, which covers almost all LUTs.
243 
244  Versioning Strategy
245  -------------------
246  1. The PGE version currently represents the version of the code itself.
247  When the code changes, the PGE version must also change.
248  Therefore, this is set as a macro "PGE02_VERSION". For each
249  actual Level 1B delivery, of the code, we need to agree with the
250  DAAC and SDST as to what the PGE version will be and then set this
251  macro accordingly. Note that this macro should be set prior to
252  generating any LUTs. The LUT generation software will also use this
253  macro to set the PGE version in each LUT file (see item 2 below).
254  In the code, this macro value will be checked against the value of
255  PGE02_Version retrieved from the PCF file to make sure they are
256  identical.
257  2. Each LUT file contains the PGE version as a LUT. The code will
258  check that the PGE version set in the LUT matches the code macro
259  PGE02_VERSION. This is to help prevent out-of-date LUT files
260  from being used with a release of the code (which has happened
261  numerous times outside of MCST).
262  3. Each LUT file contain the MCST version (which is set in the archive
263  metadata "AlgorithmPackageVersion"). These should all agree with
264  each other. When a LUT update is delivered to SDST, only the MCST
265  version changes -- the PGE version remains the same.
266 
267  Problems with Versioning Strategy
268  ---------------------------------
269  1. The PGE version really includes MOD_PR02QA code as well. If that
270  code has to change, then we may have to deliver another version of L1B
271  so that the PGE version is changed (???).
272  2. SDST has talked about adding a "process version" at some point.
273  This could change the strategy if they ever do.
274 
275  Writing the Versions to the product
276  -----------------------------------
277  The value in PGE02_Version retrieved from the PCF file will be written to
278  the product.
279 
280 !END********************************************************************
281 */
282 
283 /*
284  * The following macros define look up table types, e.g. constant LUT,
285  * step function time-dependent LUT, and the names of the attributes
286  * of SDS LUTs.
287  */
288 
289 #define TDLUT_INVALID -1
290 #define TDLUT_CONSTANT 0
291 #define TDLUT_STEPFUNCTION 1
292 #define TDLUT_PIECEWISE_LINEAR 2
293 #define TDLUT_ALGORITHM_ATTR_NAME "algorithm"
294 #define TDLUT_STEPFUNCTION_TIMES "times"
295 #define TDLUT_PIECEWISE_LINEAR_TIMES "times"
296 
297 /*
298  * The following structure is used to define all the information necessary
299  * to read in a LUT from an ASCII file and write it to the HDF file (for
300  * LUT generation) or read the LUT from the HDF file (L1B code).
301  * Some conventions that apply for all L1B LUTs:
302  * 1) Strings and scalars are stored as global attributes.
303  * 2) Arrays of non-character data are stored as SDSs.
304  * NOTE: the structure members "ascii_file", "revdet" and "dimnames"
305  * are not used in the L1B code. They are only used in the LUT generation
306  * software.
307  */
308 
309 typedef struct
310 {
311  char *name; /* LUT name in the HDF file */
312  char *ascii_file; /* name of the ASCII file holding the LUT. */
313  int32 kind; /* attribute or SDS), using macros in L1B_Tables.h */
314  int32 type; /* data type (DFNT ...) of the LUT */
315  int32 rank; /* matrix rank (maximum = 5) */
316  int32 dims[5]; /* number of values in each dimension */
317  char *dimnames[5]; /* dimension names of the LUTs */
318  void *data; /* generic pointer, dynamically assigned */
319  boolean revdet; /* flag denoting to reverse detector order */
320  char *a_lb; /* ASCII form of the lower bound */
321  char *a_ub; /* ASCII form of the upper bound */
322  char *a_fv; /* ASCII form of the fill value */
324 
325 /*
326  * The following variables define all LUTs in each file. The reason that
327  * these are external is because the LUTs generation
328  * code links to L1B_Tables and uses these variables.
329  */
330 
331 extern LUT_Definition_t refl_luts[];
333 extern LUT_Definition_t qa_luts[];
334 
335 
336 /*-----------------------------------------------------------------------
337  PGE VERSION MACRO
338 ------------------------------------------------------------------------*/
339 
340 #define PGE02_VERSION "6.2.1_obpg"
341 
342 /*-----------------------------------------------------------------------
343  DIMENSIONS AND INDEXING MACROS
344  (See also "Granule.h" for other dimension macros)
345 ------------------------------------------------------------------------*/
346 
347 /*---------------------------------------------
348  Common Lookup Table Dims
349 ----------------------------------------------*/
350 
351 #define MAX_SERIAL_NUMBER_BUFFER 31
352 #define MAX_PGE_VERSION_BUFFER 11
353 #define MAX_MCST_VERSION_BUFFER 21
354 #define MAX_ASSOCIATEDPLATFORMSHORTNAME_BUFFER 21
355 #define MAX_ALGORITHMPACKAGEACCEPTANCEDATE_BUFFER 11
356 #define MAX_ALGORITHMPACKAGEMATURITYCODE_BUFFER 15
357 #define MAX_MISSION_PHASE_BUFFER 15
358 #define NUM_DN_VALUES 4096 /* 2^12 = 4096 (0..4095) */
359 #define NUM_PRI_RED_SYSTEMS 2
360 #define NUM_BITS_IN_UINT8 8
361 
362 #define NUM_1ST_ORDER_COEFFS 2
363 #define NUM_2ND_ORDER_COEFFS 3
364 #define NUM_4TH_ORDER_COEFFS 5
365 /*
366  * The following is used specifically for the emissive and reflective
367  * 4th order polynomial evaluations as part of the uncertainty calculation.
368  * The arrays dimensioned "NUM_4TH_ORDER_COEFFS" are the coefficients.
369  */
370 #define EVAL_4TH_ORDER_POLYNOMIAL(p,a,x) \
371  p = a[0] + x * (a[1] + x * (a[2] + x * (a[3] + x * a[4])));
372 
373 /*
374  * The following is used specifically for the emissive and reflective
375  * 1st order polynomial evaluations as part of the RVS calculation.
376  * The arrays dimensioned "NUM_2ND_ORDER_COEFFS" are the coefficients.
377  * Input "x" is the variable and input "y" is x*x, previously computed.
378  */
379 #define EVAL_2ND_ORDER_POLYNOMIAL(p,a,x,y) \
380  p = a[0] + x * a[1] + y * a[2];
381 
382 /*---------------------------------------------
383  SWIR-band (Reflective) Table Dims
384 ----------------------------------------------*/
385 
386 #define NUM_SWIR_BANDS 4
387 #define MAX_NUM_SWIR_SUBSAMPLES 2
388 #define MAX_DETECTORS_PER_SWIR_BAND 20
389 #define MAX_SWIR_BAND_EV_FRAMES 2708
390 #define MAX_NUM_SWIR_RSR_WL 27
391 
392 /*---------------------------------------------
393  Emissive Tables Dimensions and other macros
394 
395  Use caution when changing any of these, especially
396  those related to polynomial evaluations. For
397  efficiency reasons, the code may not be general.
398 ----------------------------------------------*/
399 
400  /* Bands for MODIS/Aqua (FM1) which show dn BB saturation on BB warmup: */
401 #define NUM_AQUA_BB_SAT_BANDS 3
402 
403 #define NUM_PC_XT_BANDS 5
404 #define NUM_PC_XT_PARAMETERS 4
405 #define MAX_NUM_RSR_vs_LAMBDA 66
406 #define NUM_a0_vs_T_inst_COEFF 3 /* see caution above */
407 #define NUM_a2_vs_T_inst_COEFF 3 /* see caution above */
408 /* obsolete due to TEB UI algorithm update, 3/22/2011, Xu Geng */
409 /*
410 #define NUM_UI_PARAMETERS 8
411 #define NUM_UI_POLYNOMIAL_COEFF 2
412 #define NUM_FI_POLYNOMIAL_COEFF 5
413 */
414 #define NUM_T_MIR_THERMISTORS 2 /* number of values in LUT */
415 #define NUM_T_INS_THERMISTORS 4 /* number of values in LUT */
416 #define INDEX_TP_AO_SMIR_OBJ 0 /* LUT index */
417 #define INDEX_TP_AO_LWIR_OBJ 1 /* LUT index */
418 #define INDEX_TP_AO_SMIR_LENS 2 /* LUT index */
419 #define INDEX_TP_AO_LWIR_LENS 3 /* LUT index */
420 
421 #define NUM_T_CAV_THERMISTORS 4 /* number of values in LUT */
422 #define INDEX_TP_MF_CALBKHD_SR 0 /* LUT index */
423 #define INDEX_TP_SR_SNOUT 1 /* LUT index */
424 #define INDEX_TP_MF_Z_BKHD_BB 2 /* LUT index */
425 #define INDEX_TP_MF_CVR_OP_SR 3 /* LUT index */
426 
427 #define NUM_U2_FRAME 7 /* number of frames in uncertainty term u2 LUT */
428 #define NUM_RSB_RVS_COEFFS 5 /* number of coefficients used to calcuate RVS */
429 
430 /*--------------------------------------------
431  Dimensions for QA Tables
432 ---------------------------------------------*/
433 #define NUM_MOON_OFFSET_LIMITS 4
434 #define NUM_ATTITUDE_ANGLES 3
435 
436 /*
437  * The following macros define the meaning of the index within the
438  * "NUM_MOON_OFFSET_LIMITS" dimension of "moon_offset_limits"
439  * in the common_QA_tables_t structure.
440  */
441 #define TRK_UPPER 0 /* track upper limit index */
442 #define TRK_LOWER 1 /* track lower limit index */
443 #define SCN_UPPER 2 /* scan upper limit index */
444 #define SCN_LOWER 3 /* scan lower limit index */
445 
446 /*-----------------------------------------------------------------------
447  LUT Information Macros
448 ------------------------------------------------------------------------*/
449 
450 /*
451  * The following macros are used to determine the "kind" of LUT
452  * as it exists inside the LUT file.
453  */
454 
455 #define GLOBAL_ATTRIBUTE_LUT 0 /* Must use read_attribute */
456 #define SDS_LUT 1 /* Must use read_sds_rankn */
457 
458 /*---------------------------------------------
459  Common Lookup Table names
460 (These tables should exist in all three files)
461 ----------------------------------------------*/
462 
463 #define PGE_VERSION_LUT_NAME "PGE_Version"
464 #define MCST_VERSION_LUT_NAME "MCST_Version"
465 
466 /*---------------------------------------------
467  Reflective Lookup Table names
468 ----------------------------------------------*/
469 
470 #define REFL_SERIAL_NUMBER_LUT_NAME "Serial Number of Reflective LUT"
471 #define M0_LUT_NAME "m0"
472 #define M1_LUT_NAME "m1"
473 #define DN_STAR_MAX_LUT_NAME "dn_star_Max"
474 #define DN_STAR_MIN_LUT_NAME "dn_star_Min"
475 #define K_INST_LUT_NAME "K_inst"
476 #define K_FPA_LUT_NAME "K_FPA"
477 #define T_INST_REF_LUT_NAME "T_inst_ref"
478 #define T_FPA_REF_LUT_NAME "T_FPA_ref"
479 #define RVS_RSB_LUT_NAME "RVS_RefSB"
480 /* obsolete due to RSB UI algorithm update, 2/23/2011, Xu Geng */
481 /*
482 #define SIGMA_RVS_RSB_LUT_NAME "Sigma_RVS_RSB"
483 #define SIGMA_M1_LUT_NAME "Sigma_m1"
484 #define SIGMA_K_INST_LUT_NAME "Sigma_K_inst"
485 #define SIGMA_T_INST_LUT_NAME "Sigma_T_inst"
486 #define SIGMA_PV_RESID_ELEC_LUT_NAME "Sigma_PV_Resid_Elec"
487 #define SIGMA_R_STAR_LIN_RESID_UCOEFF_LUT_NAME "Sigma_R_Star_Lin_Resid_Ucoeff"
488 #define RSB_NEDL_LUT_NAME "RSB_NEdL"
489 #define SIGMA_RSB_ADC_LUT_NAME "Sigma_RSB_ADC"
490 */
491 #define DN_OBC_1ST_FRAME_LUT_NAME "DN_obc_avg_first_frame_to_use"
492 #define DN_OBC_NUM_FRAMES_LUT_NAME "DN_obc_avg_number_of_frames_to_use"
493 #define SWIR_CORRECTION_SWITCH_LUT_NAME "SWIR_OOB_correction_switch"
494 #define X_OOB_0_LUT_NAME "X_OOB_0"
495 #define X_OOB_1_LUT_NAME "X_OOB_1"
496 #define X_OOB_2_LUT_NAME "X_OOB_2"
497 #define RSB_SPECIFIED_UNCERTAINTY_LUT_NAME "RSB_specified_uncertainty"
498 #define RSB_UI_SCALING_FACTOR_LUT_NAME "RSB_UI_scaling_factor"
499 #define E_SUN_OVER_PI_LUT_NAME "E_sun_over_pi"
500 #define RSB_SV_DN_MOON_INCLUDE_FRAMES_LUT_NAME "RSB_SV_DN_moon_include_frames"
501 #define DN_SAT_EV_LUT_NAME "dn_sat_ev"
502 #define B26_B5_CORR_LUT_NAME "B26_B5_Corr"
503 #define B26_B5_CORR_SWITCH_LUT_NAME "B26_B5_Corr_Switch"
504 #define B26_B5_FRAME_OFFSET_LUT_NAME "B26_B5_Frame_Offset"
505 #define SWIR_CORR_SENDING_BAND_LUT_NAME "SWIR_OOB_corr_sending_band"
506 #define SWIR_CORR_SENDING_DETECTOR_LUT_NAME "SWIR_OOB_corr_sending_detector"
507 /* new luts tables due to RSB uncertainty algorithm update 2/22/2011, Xu Geng */
508 #define U1_LUT_NAME "u1"
509 #define U2_LUT_NAME "u2"
510 #define U3_LUT_NAME "u3"
511 #define U4_LUT_NAME "u4"
512 #define U2_FRAMES_LUT_NAME "u2_frames"
513 #define SWIR_UI_FACTOR_LUT_NAME "swir_ui_factor"
514 
515 /*---------------------------------------------
516  Emissive Lookup Table names
517 ----------------------------------------------*/
518 
519 #define EMISS_SERIAL_NUMBER_LUT_NAME "Serial Number of Emissive LUT"
520 #define EPSILON_BB_LUT_NAME "epsilon_bb"
521 #define EPSILON_CAV_LUT_NAME "epsilon_cav"
522 #define DELTA_T_BB_BETA_LUT_NAME "delta_T_bb_beta"
523 #define DELTA_T_BB_DELTA_LUT_NAME "delta_T_bb_delta"
524 #define PCX_TALK_LUT_NAME "PC_XT"
525 #define RVS_TEB_LUT_NAME "RVS_TEB"
526 #define RVS_BB_SV_FRAME_NO_LUT_NAME "RVS_BB_SV_Frame_No"
527 #define RSR_LUT_NAME "RSR"
528 #define WAVELENGTH_LUT_NAME "WAVELENGTH"
529 #define NUM_WL_INCREMENT_LUT_NAME "NWL"
530 #define CALIB_A0_LUT_NAME "A0"
531 #define CALIB_A2_LUT_NAME "A2"
532 /* obsolete due to TEB UI algorithm update, 3/22/2011, Xu Geng */
533 /*
534 #define UI_UCOEFF_LUT_NAME "Ucoeff"
535 #define SIGMA_TEB_PV_RESID_ELEC_LUT_NAME "Sigma_TEB_PV_resid_elec"
536 #define SIGMA_TEB_ADC_LUT_NAME "Sigma_TEB_ADC"
537 #define UCOEFF_CALIBR_RESID_LUT_NAME "Ucoeff_Calibr_resid"
538 #define BAND_21_UNCERT_LSAT_LUT_NAME "Band_21_Uncert_Lsat"
539 */
540 #define T_INS_FUNCTION_FLAG_LUT_NAME "T_ins_function_flag"
541 #define T_INS_DEFAULT_LUT_NAME "T_ins_default"
542 #define T_INS_OFFSET_LUT_NAME "T_ins_offset"
543 #define T_CAV_FUNCTION_FLAG_LUT_NAME "T_cav_function_flag"
544 #define T_CAV_DEFAULT_LUT_NAME "T_cav_default"
545 #define T_MIR_FUNCTION_FLAG_LUT_NAME "T_mir_function_flag"
546 #define T_MIR_DEFAULT_LUT_NAME "T_mir_default"
547 #define BB_WEIGHT_LUT_NAME "BB_Weight"
548 #define BB_DN_1ST_FRAME_LUT_NAME "BB_DN_first_frame_to_use"
549 #define BB_DN_NUM_FRAMES_LUT_NAME "BB_DN_number_of_frames_to_use"
550 #define SV_DN_1ST_FRAME_LUT_NAME "SV_DN_first_frame_to_use"
551 #define SV_DN_NUM_FRAMES_LUT_NAME "SV_DN_number_of_frames_to_use"
552 #define SV_DN_MOON_INCLUDE_FRAMES_LUT_NAME "SV_DN_moon_include_frames"
553 #define PCX_CORRECTION_SWITCH_LUT_NAME "PCX_correction_switch"
554 #define OVERLAP_SCANS_B1_LUT_NAME "num_overlap_scans_b1"
555 #define BAND_21_B1_LUT_NAME "Band_21_b1"
556 #define L_MIN_LUT_NAME "L_Min"
557 #define L_MAX_LUT_NAME "L_Max"
558 #define TEB_SPECIFIED_UNCERTAINTY_LUT_NAME "TEB_specified_uncertainty"
559 #define TEB_UI_SCALING_FACTOR_LUT_NAME "TEB_UI_scaling_factor"
560 #define BB_T_SAT_SWITCH_AQUA_LUT_NAME "BB_T_sat_switch_aqua"
561 #define BB_T_SAT_AQUA_LUT_NAME "BB_T_sat_aqua"
562 #define BB_T_SAT_DEFAULT_B1_BASELINE_AQUA_LUT_NAME "BB_T_sat_default_b1_baseline_aqua"
563 #define BB_T_SAT_DEFAULT_B1_C1_AQUA_LUT_NAME "BB_T_sat_default_b1_c1_aqua"
564 #define BB_T_SAT_DEFAULT_B1_TLWIR_BASELINE_AQUA_LUT_NAME "BB_T_sat_default_b1_Tlwir_baseline_aqua"
565 /* new luts tables due to TEB uncertainty algorithm update 3/22/2011, Xu Geng */
566 #define SIGMA_A0_LUT_NAME "sigma_a0"
567 #define SIGMA_A2_LUT_NAME "sigma_a2"
568 #define SIGMA_RVS_EV_LUT_NAME "sigma_RVS_EV"
569 #define SIGMA_EPSILON_BB_LUT_NAME "sigma_epsilon_BB"
570 #define SIGMA_EPSILON_CAV_LUT_NAME "sigma_epsilon_CAV"
571 #define SIGMA_L_LAMBDA_LUT_NAME "sigma_L_lambda"
572 #define SIGMA_L_TBB_LUT_NAME "sigma_L_Tbb"
573 #define SIGMA_L_TSM_LUT_NAME "sigma_L_Tsm"
574 #define SIGMA_L_TCAV_LUT_NAME "sigma_L_Tcav"
575 #define SIGMA_B1_BAND21_LUT_NAME "sigma_b1_B21"
576 #define PCX_UI_FACTOR_LUT_NAME "pcx_ui_factor"
577 
578 /*---------------------------------------------
579  QA Lookup Table information
580 ----------------------------------------------*/
581 
582 #define QA_SERIAL_NUMBER_LUT_NAME "QA serial number"
583 #define PLATFORM_SHORT_NAME_LUT_NAME "ASSOCIATEDPLATFORMSHORTNAME"
584 #define PACKAGE_ACCEPT_DATE_LUT_NAME "ALGORITHMPACKAGEACCEPTANCEDATE"
585 #define PACKAGE_MATURITY_CODE_LUT_NAME "ALGORITHMPACKAGEMATURITYCODE"
586 #define DET_QUAL_FLAG_VALS_LUT_NAME "Detector Quality Flag Values"
587 #define DET_QUAL_FLAG2_VALS_LUT_NAME "Detector Quality Flag2 Values"
588 #define MOON_OFFSET_LIMITS_LUT_NAME "Moon Offset Limits"
589 #define MISSION_PHASE_LUT_NAME "mission phase"
590 #define CONTROL_OPTIONS_LUT_NAME "Control options"
591 #define BASE_VARI_VISUAL_FPA_LUT_NAME "visual FPA base variance"
592 #define BASE_VARI_NIR_FPA_LUT_NAME "NIR FPA base variance"
593 #define BB_TEMP_VARIANCE_LUT_NAME "T_BB_Variance"
594 #define BB_AVG_TEMP_VAR_LUT_NAME "BB Average Temperature Variance"
595 #define LWIR_FPA_TEMP_VAR_LUT_NAME "LWIR FPA Temperature Variance"
596 #define MWIR_FPA_TEMP_VAR_LUT_NAME "MWIR FPA Temperature Variance"
597 #define MIR_SIDE_1_TEMP_VAR_LUT_NAME "MirrorSide 1 Temperature Variance"
598 #define MIR_SIDE_2_TEMP_VAR_LUT_NAME "MirrorSide 2 Temperature Variance"
599 #define MIR_AVG_TEMP_VAR_LUT_NAME "Mirror Average Temperature Variance"
600 #define INST_TEMP_VAR_LUT_NAME "Instrument Temperature Variance"
601 #define CAVITY_TEMP_VAR_LUT_NAME "Cavity Temperature Variance"
602 #define EMISS_NEdL_LUT_NAME "NEdL"
603 #define CALIB_A1_LUT_NAME "a1"
604 #define ROLL_THRESHOLD_LUT_NAME "Spacecraft_Roll_Threshold_Angle"
605 #define PITCH_THRESHOLD_LUT_NAME "Spacecraft_Pitch_Threshold_Angle"
606 #define YAW_THRESHOLD_LUT_NAME "Spacecraft_Yaw_Threshold_Angle"
607 
608 /*-----------------------------------------------------------------------
609  LUT Structures
610 ------------------------------------------------------------------------*/
611 
612 /*
613  * SWIR Correction Lookup Table Structure
614  */
615 
616 typedef struct
617 {
620  int16 SWIR_corr_sending_detector[DETECTORS_PER_1KM_BAND];
621  float32 X_OOB_0[NUM_SWIR_BANDS]
625 
626  float32 X_OOB_1[NUM_SWIR_BANDS]
630 
631  float32 X_OOB_2[NUM_SWIR_BANDS]
635 
637 
638 /*
639  * Reflective Lookup Table Structure
640  */
641 
642 typedef struct
643 {
644  char Serial_Number[MAX_SERIAL_NUMBER_BUFFER];
645  char PGE_Version [MAX_PGE_VERSION_BUFFER];
646  char MCST_Version [MAX_MCST_VERSION_BUFFER];
647 
649 
651 
652  float32 K_inst[NUM_REFLECTIVE_BANDS]
656 
657  float32 K_FPA[NUM_REFLECTIVE_BANDS]
661 
662  float32 m0[NUM_REFLECTIVE_BANDS]
666 
667  float32 m1[NUM_REFLECTIVE_BANDS]
671 
672  float32 dn_star_Max[NUM_REFLECTIVE_BANDS];
673 
674  float32 dn_star_Min[NUM_REFLECTIVE_BANDS];
675 
676  float32 T_inst_ref;
677 
678  float32 T_FPA_ref[NUM_FOCAL_PLANES];
679 
680  float32 RVS_RefSB[NUM_REFLECTIVE_BANDS]
684 
685  /* obsolete due to RSB uncertainty algorithm update, 2/23/2011, Xu Geng */
686  /*
687  float32 Sigma_RVS_RSB[NUM_REFLECTIVE_BANDS]
688  [NUM_MIRROR_SIDES];
689 
690  float32 Sigma_m1[NUM_REFLECTIVE_BANDS]
691  [MAX_DETECTORS_PER_BAND]
692  [MAX_SAMPLES_PER_BAND]
693  [NUM_MIRROR_SIDES];
694 
695  float32 Sigma_K_inst[NUM_REFLECTIVE_BANDS]
696  [MAX_DETECTORS_PER_BAND]
697  [MAX_SAMPLES_PER_BAND]
698  [NUM_MIRROR_SIDES];
699 
700  float32 Sigma_T_inst;
701 
702  float32 Sigma_PV_Resid_Elec[NUM_REFLECTIVE_BANDS]
703  [MAX_DETECTORS_PER_BAND]
704  [MAX_SAMPLES_PER_BAND];
705 
706  float32 Sigma_R_Star_Lin_Resid_Ucoeff[NUM_REFLECTIVE_BANDS]
707  [MAX_DETECTORS_PER_BAND]
708  [MAX_SAMPLES_PER_BAND]
709  [NUM_MIRROR_SIDES]
710  [NUM_4TH_ORDER_COEFFS];
711 
712  float32 RSB_NEdL[NUM_REFLECTIVE_BANDS]
713  [MAX_DETECTORS_PER_BAND]
714  [MAX_SAMPLES_PER_BAND]
715  [NUM_MIRROR_SIDES];
716 
717  float32 Sigma_RSB_ADC[NUM_REFLECTIVE_BANDS]
718  [MAX_DETECTORS_PER_BAND];
719  */
720 
721  float32 RSB_specified_uncertainty[NUM_REFLECTIVE_BANDS];
722 
723  float32 RSB_UI_scaling_factor[NUM_REFLECTIVE_BANDS];
724 
726  float32 E_sun_over_pi[NUM_REFLECTIVE_DETECTORS];
728 
729  float64 dn_sat_ev[NUM_REFLECTIVE_BANDS]
733 
734  float32 B26_B5_Corr[DETECTORS_PER_1KM_BAND];
736  int16 B26_B5_Frame_Offset[DETECTORS_PER_1KM_BAND];
737 
738  /* new luts tables due to RSB uncertainty algorithm update 2/22/2011, Xu Geng */
740  float32 u2_samples[NUM_REFLECTIVE_DETECTORS]
743  float32 u3[NUM_REFLECTIVE_DETECTORS]
745  float32 u4_coeffs[NUM_REFLECTIVE_BANDS]
750  int16 u2_frames[NUM_U2_FRAME];
751  float32 swir_ui_factor[NUM_SWIR_BANDS];
752 
753  } refl_tables_t;
754 
755 
756 /*
757  * Emissive Lookup Table Structure
758  * NOTE: PC_XT values in the lookup table are in percent.
759  */
760 
761 typedef struct
762 {
763  char Serial_Number [MAX_SERIAL_NUMBER_BUFFER];
764  char PGE_Version [MAX_PGE_VERSION_BUFFER];
765  char MCST_Version [MAX_MCST_VERSION_BUFFER];
766  float32 epsilon_bb [NUM_EMISSIVE_DETECTORS];
767  float32 epsilon_cav [NUM_EMISSIVE_DETECTORS];
768  float32 delta_T_bb_beta [NUM_EMISSIVE_DETECTORS];
769  float32 delta_T_bb_delta[NUM_EMISSIVE_DETECTORS];
770  float32 PC_XT [NUM_PC_XT_BANDS]
773  float32 RSR [NUM_EMISSIVE_DETECTORS]
777  float32 A0 [NUM_a0_vs_T_inst_COEFF]
780  float32 A2 [NUM_a2_vs_T_inst_COEFF]
783 
784  int16 NUM_RSR_vs_Lambda[NUM_EMISSIVE_DETECTORS];
785  float32 CW [NUM_EMISSIVE_BANDS];
786 
787  /* obsolete due to TEB uncertainty algorithm update, 3/22/2011, Xu Geng */
788  /*
789  float32 Ucoeff [NUM_EMISSIVE_DETECTORS]
790  [NUM_UI_PARAMETERS]
791  [NUM_UI_POLYNOMIAL_COEFF]
792  [NUM_FI_POLYNOMIAL_COEFF];
793  float32 Sigma_TEB_PV_resid_elec[NUM_EMISSIVE_DETECTORS];
794  float32 Sigma_TEB_ADC[NUM_EMISSIVE_DETECTORS];
795  float32 Ucoeff_Calibr_resid[NUM_EMISSIVE_DETECTORS]
796  [NUM_4TH_ORDER_COEFFS];
797  float32 Band_21_Uncert_Lsat;
798  */
806  int32 T_ins_function_flag[NUM_T_INS_THERMISTORS];
807  float32 T_ins_default;
808  float32 T_ins_offset[NUM_T_INS_THERMISTORS];
809  int32 T_cav_function_flag[NUM_T_CAV_THERMISTORS];
810  int32 T_mir_function_flag[NUM_T_MIR_THERMISTORS];
811  float32 T_cav_default;
812  float32 T_mir_default;
813  float32 BB_Weight[NUM_BB_THERMISTORS];
814 
815  float32 RVS_TEB[NUM_EMISSIVE_BANDS]
819  int16 RVS_BB_SV_Frame_No[2];
820 
822  float32 L_Max[NUM_EMISSIVE_BANDS];
823  float32 L_Min[NUM_EMISSIVE_BANDS];
824  float32 TEB_specified_uncertainty[NUM_EMISSIVE_BANDS];
825  float32 TEB_UI_scaling_factor[NUM_EMISSIVE_BANDS];
827  float32 BB_T_sat_aqua[NUM_AQUA_BB_SAT_BANDS];
828  float32 BB_T_sat_default_b1_baseline_aqua[NUM_AQUA_BB_SAT_BANDS]
831  float32 BB_T_sat_default_b1_c1_aqua[NUM_AQUA_BB_SAT_BANDS]
835 
836  /* new luts tables due to TEB uncertainty algorithm update 3/22/2011, Xu Geng */
837  float32 sigma_a0[NUM_a0_vs_T_inst_COEFF]
840  float32 sigma_a2[NUM_a2_vs_T_inst_COEFF]
843  float32 sigma_RVS_EV[NUM_EMISSIVE_BANDS]
847  float32 sigma_epsilon_BB[NUM_EMISSIVE_BANDS];
848  float32 sigma_epsilon_CAV[NUM_EMISSIVE_BANDS];
849  float32 sigma_L_lambda[NUM_EMISSIVE_BANDS]
851  float32 sigma_L_Tbb[NUM_EMISSIVE_BANDS];
852  float32 sigma_L_Tsm[NUM_EMISSIVE_BANDS];
853  float32 sigma_L_Tcav[NUM_EMISSIVE_BANDS];
854  float32 sigma_b1_B21[DETECTORS_PER_1KM_BAND][NUM_MIRROR_SIDES];
855  float32 pcx_ui_factor[NUM_PC_XT_BANDS];
856 
858 
859 /*
860  * common QA tables
861  */
862 
863 /*
864  * Control options within L1B:
865  * 1) Split scans -- control whether or not to treat as missing if a split
866  * scan is detected. There are only two values, ON or OFF.
867  * 2) Bad scan quality -- control whether or not to treat as missing if
868  * an invalid value of Scan quality array is detected.
869  * There are only two values, ON or OFF.
870  */
871 
872 typedef enum {
877 
878 typedef struct
879 {
880  char Serial_Number[MAX_SERIAL_NUMBER_BUFFER];
881  char PGE_Version[MAX_PGE_VERSION_BUFFER];
882  char MCST_Version[MAX_MCST_VERSION_BUFFER];
883  char AssociatedPlatformShortname
885  char AlgorithmPackageAcceptanceDate
887  char AlgorithmPackageMaturityCode
889  int8 dead_detector[NUM_DETECTORS];
890  int8 noisy_detector[NUM_DETECTORS];
891  int8 dead_subframe[NUM_HIGH_RESOLUTION_SUBFRAMES];
892  int8 noisy_subframe[NUM_HIGH_RESOLUTION_SUBFRAMES];
893  uint8 Detector_Quality_Flag_Values[NUM_DETECTORS]
895  uint8 Detector_Quality_Flag[NUM_DETECTORS];
896  uint8 Detector_Quality_Flag2_Values[NUM_HIGH_RESOLUTION_DETECTORS]
898  uint8 Detector_Quality_Flag2[NUM_HIGH_RESOLUTION_DETECTORS];
899  float32 moon_offset_limits[NUM_BANDS]
901  char mission_phase[MAX_MISSION_PHASE_BUFFER];
902  uint8 control_options[NUM_CONTROL_OPTIONS];
907 
908 /*
909  * refl QA tables
910  */
911 
912 typedef struct
913 {
914  float32 var_visual_FPA;
915  float32 var_NIR_FPA;
917 
918 /*
919  * emiss QA tables
920  */
921 
922 typedef struct
923 {
924  float32 var_T_bb[NUM_BB_THERMISTORS];
925  float32 var_T_bb_avg;
926  float32 var_T_lwir;
927  float32 var_T_mwir;
928  float32 var_T_mir1;
929  float32 var_T_mir2;
930  float32 var_T_mir_avg;
931  float32 var_T_ins;
932  float32 var_T_cav;
933  float32 NEdL[NUM_EMISSIVE_DETECTORS];
936 
937 /*
938  * QA Lookup table structure
939  */
940 
941 typedef struct
942 {
946 } QA_tables_t;
947 
948 /*
949  * L1B lookup tables structure
950  */
951 
952 typedef struct
953 {
958 
959 /*--------------------------------------------------------
960  Function Prototypes
961 ---------------------------------------------------------*/
962 
963 PGSt_SMF_status Read_Lookup_Tables
964  (L1A_granule_t *L1A_Gran,
966  Run_Time_Parameters_t *runtime_params);
967 
968 PGSt_SMF_status Read_Refl_Tables
969  (L1A_granule_t *,
970  refl_tables_t *);
971 
972 PGSt_SMF_status Read_QA_Tables
973  (L1A_granule_t *,
974  QA_tables_t *);
975 
976 PGSt_SMF_status Read_Emiss_Tables
977  (L1A_granule_t *,
978  emiss_tables_t *);
979 
980 PGSt_SMF_status Read_L1B_SDS_LUT
981  (int32 sd_id,
982  char *name,
983  int32 data_type,
984  int32 rank,
985  int32 *dims,
986  float64 data_collection_TAI_time,
987  void *data);
988 
989 int32 TDLUT_GetAlgorithm
990  (int32 sd_id,
991  char *name);
992 
993 PGSt_SMF_status TDLUT_ReadStepFunction
994  (int32 sd_id,
995  char *name,
996  int32 data_type,
997  int32 rank,
998  int32 *dims,
999  float64 data_collection_TAI_time,
1000  void *data);
1001 
1002 PGSt_SMF_status TDLUT_ReadPiecewiseLinearFunction
1003  (int32 sd_id,
1004  char *name,
1005  int32 data_type,
1006  int32 rank,
1007  int32 *dims,
1008  float64 data_collection_TAI_time,
1009  void *data);
1010 
1011 PGSt_SMF_status Expand_BDSM_LUT
1012  (void *data,
1013  void **data_new,
1014  int32 data_type,
1015  int32 lead_dim,
1016  int32 *n_bytes);
1017 
1018 int32 BDSM_index (char *ascii_file);
1019 
1020 #endif
1021 
1022 
integer, parameter int16
Definition: cubeio.f90:3
an array had not been initialized Several spelling and grammar corrections were which is read from the appropriate MCF the above metadata values were hard coded A problem calculating the average background DN for SWIR bands when the moon is in the space view port was corrected The new algorithm used to calculate the average background DN for all reflective bands when the moon is in the space view port is now the same as the algorithm employed by the thermal bands For non SWIR changes in the averages are typically less than Also for non SWIR the black body DNs remain a backup in case the SV DNs are not available For SWIR the changes in computed averages were larger because the old which used the black body suffered from contamination by the micron leak As a consequence of the if SV DNs are not available for the SWIR the EV pixels will not be the granule time is used to identify the appropriate tables within the set given for one LUT the first two or last two tables respectively will be used for the interpolation If there is only one LUT in the set of tables
Definition: HISTORY.txt:695
#define MAX_SAMPLES_PER_BAND
Definition: Granule.h:475
float32 var_T_mir1
Definition: L1B_Tables.h:928
#define NUM_AQUA_BB_SAT_BANDS
Definition: L1B_Tables.h:401
QA_tables_t QA
Definition: L1B_Tables.h:956
#define MAX_NUM_SWIR_SUBSAMPLES
Definition: L1B_Tables.h:387
#define NUM_T_INS_THERMISTORS
Definition: L1B_Tables.h:415
#define NUM_2ND_ORDER_COEFFS
Definition: L1B_Tables.h:363
@ SPLIT_SCAN_CONTROL
Definition: L1B_Tables.h:873
#define MAX_NUM_RSR_vs_LAMBDA
Definition: L1B_Tables.h:405
emiss_QA_tables_t emiss_QA_tables
Definition: L1B_Tables.h:945
#define MAX_ALGORITHMPACKAGEMATURITYCODE_BUFFER
Definition: L1B_Tables.h:356
int8 PCX_correction_switch
Definition: L1B_Tables.h:805
emiss_tables_t emiss
Definition: L1B_Tables.h:955
int32 TDLUT_GetAlgorithm(int32 sd_id, char *name)
Definition: L1B_Tables.c:2766
PGSt_SMF_status Expand_BDSM_LUT(void *data, void **data_new, int32 data_type, int32 lead_dim, int32 *n_bytes)
Definition: L1B_Tables.c:3656
LUT_Definition_t refl_luts[]
Definition: L1B_Tables.c:1779
refl_QA_tables_t refl_QA_tables
Definition: L1B_Tables.h:944
#define NUM_PC_XT_BANDS
Definition: L1B_Tables.h:403
int16 B26_B5_Corr_Switch
Definition: L1B_Tables.h:735
SWIR_correction_tables_t SWIR_correction_tables
Definition: L1B_Tables.h:725
LUT_Definition_t emiss_luts[]
Definition: L1B_Tables.c:2084
int16 BB_DN_number_of_frames_to_use
Definition: L1B_Tables.h:803
PARAM_TYPE_NONE Default value No parameter is buried in the product name name_prefix is case insensitive string compared to the product name PARAM_TYPE_VIS_WAVE The visible wavelength bands from the sensor are buried in the product name The product name is compared by appending wavelength
int8 BB_T_sat_switch_aqua
Definition: L1B_Tables.h:826
const int NUM_MIRROR_SIDES
PGSt_SMF_status Read_QA_Tables(L1A_granule_t *, QA_tables_t *)
Definition: L1B_Tables.c:1116
PGSt_SMF_status TDLUT_ReadPiecewiseLinearFunction(int32 sd_id, char *name, int32 data_type, int32 rank, int32 *dims, float64 data_collection_TAI_time, void *data)
Definition: L1B_Tables.c:3236
#define NUM_EMISSIVE_DETECTORS
Definition: Granule.h:428
float32 var_T_lwir
Definition: L1B_Tables.h:926
#define MAX_MISSION_PHASE_BUFFER
Definition: L1B_Tables.h:357
int16 SV_DN_first_frame_to_use
Definition: L1B_Tables.h:799
#define DETECTORS_PER_1KM_BAND
Definition: Granule.h:438
float32 var_T_mir_avg
Definition: L1B_Tables.h:930
int16 SV_DN_moon_include_frames
Definition: L1B_Tables.h:801
PGSt_SMF_status Read_L1B_SDS_LUT(int32 sd_id, char *name, int32 data_type, int32 rank, int32 *dims, float64 data_collection_TAI_time, void *data)
Definition: L1B_Tables.c:2646
PGSt_SMF_status Read_Refl_Tables(L1A_granule_t *, refl_tables_t *)
Definition: L1B_Tables.c:231
#define NUM_BITS_IN_UINT8
Definition: L1B_Tables.h:360
const int NUM_BANDS
const int NUM_DETECTORS
float32 T_mir_default
Definition: L1B_Tables.h:812
#define NUM_a2_vs_T_inst_COEFF
Definition: L1B_Tables.h:407
#define NUM_MOON_OFFSET_LIMITS
Definition: L1B_Tables.h:433
#define MAX_SERIAL_NUMBER_BUFFER
Definition: L1B_Tables.h:351
int16 SV_DN_number_of_frames_to_use
Definition: L1B_Tables.h:800
#define MAX_DETECTORS_PER_SWIR_BAND
Definition: L1B_Tables.h:388
int16 DN_obc_avg_number_of_frames_to_use
Definition: L1B_Tables.h:650
float32 var_NIR_FPA
Definition: L1B_Tables.h:915
@ NUM_CONTROL_OPTIONS
Definition: L1B_Tables.h:875
float32 yaw_threshold_angle
Definition: L1B_Tables.h:905
const int NUM_REFLECTIVE_BANDS
#define A0
Definition: decode_rs.h:69
#define NUM_SWIR_BANDS
Definition: L1B_Tables.h:386
#define NUM_1ST_ORDER_COEFFS
Definition: L1B_Tables.h:362
#define NUM_HIGH_RESOLUTION_SUBFRAMES
Definition: Granule.h:426
#define NUM_T_MIR_THERMISTORS
Definition: L1B_Tables.h:414
float32 var_T_mwir
Definition: L1B_Tables.h:927
#define NUM_U2_FRAME
Definition: L1B_Tables.h:427
refl_tables_t refl
Definition: L1B_Tables.h:954
float32 var_T_mir2
Definition: L1B_Tables.h:929
#define NUM_HIGH_RESOLUTION_DETECTORS
Definition: Granule.h:425
PGSt_SMF_status TDLUT_ReadStepFunction(int32 sd_id, char *name, int32 data_type, int32 rank, int32 *dims, float64 data_collection_TAI_time, void *data)
Definition: L1B_Tables.c:2940
int16 BB_DN_first_frame_to_use
Definition: L1B_Tables.h:802
no change in intended resolving MODur00064 Corrected handling of bad ephemeris attitude data
Definition: HISTORY.txt:356
@ BAD_SCAN_QUALITY_CONTROL
Definition: L1B_Tables.h:874
float32 roll_threshold_angle
Definition: L1B_Tables.h:903
float32 pitch_threshold_angle
Definition: L1B_Tables.h:904
LUT_Definition_t qa_luts[]
Definition: L1B_Tables.c:2475
float32 T_ins_default
Definition: L1B_Tables.h:807
int32 BDSM_index(char *ascii_file)
Definition: L1B_Tables.c:3865
PGSt_SMF_status Read_Emiss_Tables(L1A_granule_t *, emiss_tables_t *)
Definition: L1B_Tables.c:668
float32 T_inst_ref
Definition: L1B_Tables.h:676
int16 DN_obc_avg_first_frame_to_use
Definition: L1B_Tables.h:648
float32 var_visual_FPA
Definition: L1B_Tables.h:914
Extra metadata that will be written to the HDF4 file l2prod rank
#define NUM_a0_vs_T_inst_COEFF
Definition: L1B_Tables.h:406
#define MAX_MCST_VERSION_BUFFER
Definition: L1B_Tables.h:353
#define NUM_REFLECTIVE_DETECTORS
Definition: Granule.h:427
float32 var_T_bb_avg
Definition: L1B_Tables.h:925
#define NUM_T_CAV_THERMISTORS
Definition: L1B_Tables.h:421
const int NUM_FOCAL_PLANES
#define NUM_RSB_RVS_COEFFS
Definition: L1B_Tables.h:428
#define NUM_PC_XT_PARAMETERS
Definition: L1B_Tables.h:404
#define MAX_DETECTORS_PER_BAND
Definition: Granule.h:474
#define MAX_ASSOCIATEDPLATFORMSHORTNAME_BUFFER
Definition: L1B_Tables.h:354
control_options_defs_t
Definition: L1B_Tables.h:872
const int NUM_EMISSIVE_BANDS
int16 num_overlap_scans_b1
Definition: L1B_Tables.h:804
#define MAX_ALGORITHMPACKAGEACCEPTANCEDATE_BUFFER
Definition: L1B_Tables.h:355
float32 T_cav_default
Definition: L1B_Tables.h:811
const int NUM_BB_THERMISTORS
float32 BB_T_sat_default_b1_Tlwir_baseline_aqua
Definition: L1B_Tables.h:834
#define MAX_PGE_VERSION_BUFFER
Definition: L1B_Tables.h:352
PGSt_SMF_status Read_Lookup_Tables(L1A_granule_t *L1A_Gran, lookup_tables_t *tables, Run_Time_Parameters_t *runtime_params)
Definition: L1B_Tables.c:31
int16 RSB_SV_DN_moon_include_frames
Definition: L1B_Tables.h:727
common_QA_tables_t common_QA_tables
Definition: L1B_Tables.h:943