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