ocssw
V2022
|
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <time.h>
#include "L1B_Setup.h"
#include "L1B_Tables.h"
#include "Metadata.h"
#include "HDF_Lib.h"
#include "PGS_PC.h"
#include "PGS_TD.h"
#include "PGS_Error_Codes.h"
#include "FNames.h"
#include "L1B_SetupP.h"
Go to the source code of this file.
Macros | |
#define | L1B_EV_SDS_RANK 3 |
#define | MAX_ATTR_NAME_SIZE2 72 |
#define | SW_DEF_EV_SDS(SI_name, UI_name, str) |
#define | SW_DEF_EV_Aggr_SDS(SI_name, UI_name, SU_name, str) |
#define | CREATE_EV_SDS(sd_id, SI_name, UI_name, SI_longName, UI_longName, SI_id, UI_id) |
#define | CREATE_EV_Aggr_SDS(sd_id, SI_name, UI_name, SU_name, SI_LName, UI_LName, SU_LName, SI_id, UI_id, SU_id) |
#define | MAX_ATTR_NAME_SIZE 26 |
#define | MAX_ATTR_BUFFER_SIZE 72 |
#define | COPY_ATTR(attr_name) |
#define | NADIR_FRAME_GEO_VALS(geoname, var, scalefactor, buf) |
#define | PACK_MEMBER(member, buffer_ptr) |
#define | SCAN_INTERVAL 1.4771 |
#define | REFL_250M_START_INDEX 0 |
#define | REFL_500M_START_INDEX 2 |
#define | REFL_1000M_START_INDEX 7 |
#define | REFL_BAND26_START_INDEX 21 |
#define | SET_UI_SDS_CONV_ATTRS(sds_id, spec_uncert, scale_factor, indx, numval, lun) |
Functions | |
PGSt_SMF_status | L1B_Setup (lookup_tables_t *tables, L1A_granule_t *L1A_Gran, L1B_granule_t *L1B_Gran, L1A_Scan_t *L1A_Scan, L1B_Scan_t *L1B_Scan, QA_Data_t *QA, L1B_Scan_Metadata_t *L1B_Scan_Meta, boolean skip_night_hi_res) |
PGSt_SMF_status | Open_L1A_EV_SDS (L1A_granule_t *L1A_Gran, L1A_Scan_t *L1A_Scan) |
PGSt_SMF_status | Calculate_Earth_Sun_Distance (L1A_granule_t *L1A_Gran, float32 *Earth_Sun_Dist) |
PGSt_SMF_status | Calculate_RSB_Cal_Coeff (lookup_tables_t *tables, float32 E_S_Dist, RSB_Cal_Coeff_t *RSB_Cal_Coeff) |
PGSt_SMF_status | Init_L1B_ScaleOffset (L1B_ScaleOffset_t *SO, RSB_Cal_Coeff_t *RSB_Cal_Coeff, float E_S_Dist, lookup_tables_t *tables) |
PGSt_SMF_status | Open_W_L1B_Granule (lookup_tables_t *tables, L1B_granule_t *L1B_Gran, L1B_Scan_t *L1B_Scan, boolean skip_night_hi_res) |
PGSt_SMF_status | Create_L1B_Swath (L1B_granule_t *L1B_Gran, boolean skip_night_hi_res) |
PGSt_SMF_status | Write_Swath_Band_Number (int32 file_index, L1B_granule_t *L1B_Gran) |
PGSt_SMF_status | Open_L1B_EV_SDS (L1B_granule_t *L1B_Gran, L1B_Scan_t *L1B_Scan, boolean skip_night_hi_res) |
PGSt_SMF_status | Set_L1B_EV_SDS_Attrs (lookup_tables_t *tables, L1B_granule_t *L1B_Gran, L1B_Scan_t *L1B_Scan, boolean skip_night_hi_res) |
PGSt_SMF_status | Set_Unit_Range_Fillvalue (L1B_Scan_t *L1B_Scan, boolean skip_night_hi_res) |
PGSt_SMF_status | Get_SDS_id (int32 f, L1B_Scan_t *L1B_Scan, int16 *num_sds, int32 *sds_id) |
PGSt_SMF_status | Set_SDS_Attributes (int32 *sds_id, char **BandNames, float32 **scale, float32 **offset, char *rad_units, char *refl_units, char *counts_units, int32 num_sds) |
PGSt_SMF_status | Create_Band_Subsetting_SDS (L1B_granule_t *L1B_Gran, boolean skip_night_hi_res) |
PGSt_SMF_status | Copy_Geo_SDS (L1B_granule_t *L1B_Gran, boolean skip_night_hi_res) |
PGSt_SMF_status | Scan_Meta_Cal (lookup_tables_t *tables, L1A_granule_t *L1A_Gran, L1B_granule_t *L1B_Gran, L1B_Scan_Metadata_t *L1B_Scan_Meta, QA_Data_t *QA) |
PGSt_SMF_status | Calculate_DCR_Change (L1A_granule_t *L1A_Gran, QA_Data_t *QA, L1B_Scan_Metadata_t *L1B_Scan_Meta) |
PGSt_SMF_status | Init_QA_Parameters (L1A_granule_t *L1A_Gran, L1B_granule_t *L1B_Gran, QA_Data_t *QA) |
PGSt_SMF_status | Write_L1B_ScanMeta (L1B_Scan_Metadata_t *L1B_Scan_Meta, L1A_granule_t *L1A_Gran, QA_Data_t *QA, boolean skip_night_hi_res) |
PGSt_SMF_status | Determine_Other_Missing_Scans (lookup_tables_t *tables, L1A_granule_t *L1A_Gran) |
PGSt_SMF_status | Determine_Split_Scans (L1A_granule_t *L1A_Gran, boolean *split_scan) |
PGSt_SMF_status | Get_Split_Scan_Indexes (int32 S1, int32 num_scans, int16 mirror_side[], int32 scan_quality[][SCAN_QUALITY_ARRAY_NUM_ELEMENTS], int32 *S_split_1, int32 *S_split_2) |
PGSt_SMF_status | Set_UI_ConvertToPercent_Attrs (lookup_tables_t *tables, L1B_Scan_t *L1B_Scan, boolean skip_night_hi_res) |
PGSt_SMF_status | Calculate_B26_B5_Correction (float32 *original_correction, float32 *scaled_correction, L1B_ScaleOffset_t *ScaleOffset) |
Variables | |
char * | L1A_EV_SDS_NAME [NUM_L1A_RESOLUTIONS] |
char * | L1B_EV_SDS_NAME [NUM_L1B_EV_SDS] |
char * | L1B_EV_SDS_LONG_NAME [NUM_L1B_EV_SDS] |
char * | Band_subsetting_names [NUM_L1A_RESOLUTIONS] |
char * | L1B_EV_DIM_NAME [NUM_L1A_RESOLUTIONS][L1B_EV_SDS_RANK] |
int32 | L1B_EV_DIM_OFFSET [NUM_L1A_RESOLUTIONS][L1B_EV_SDS_RANK-1] |
float32 | L1B_EV_DIM_FRAC_OFFSET [NUM_L1A_RESOLUTIONS][L1B_EV_SDS_RANK-1] |
geolocation_sds_t | GEO_SDS [NUM_GEO_SDS] |
int16 | RFLAG |
int16 | RSCL_FLAG |
Macro Definition Documentation
◆ COPY_ATTR
#define COPY_ATTR | ( | attr_name | ) |
◆ CREATE_EV_Aggr_SDS
#define CREATE_EV_Aggr_SDS | ( | sd_id, | |
SI_name, | |||
UI_name, | |||
SU_name, | |||
SI_LName, | |||
UI_LName, | |||
SU_LName, | |||
SI_id, | |||
UI_id, | |||
SU_id | |||
) |
◆ CREATE_EV_SDS
#define CREATE_EV_SDS | ( | sd_id, | |
SI_name, | |||
UI_name, | |||
SI_longName, | |||
UI_longName, | |||
SI_id, | |||
UI_id | |||
) |
◆ L1B_EV_SDS_RANK
#define L1B_EV_SDS_RANK 3 |
Definition at line 166 of file L1B_Setup.c.
◆ MAX_ATTR_BUFFER_SIZE
#define MAX_ATTR_BUFFER_SIZE 72 |
◆ MAX_ATTR_NAME_SIZE
#define MAX_ATTR_NAME_SIZE 26 |
◆ MAX_ATTR_NAME_SIZE2
#define MAX_ATTR_NAME_SIZE2 72 |
◆ NADIR_FRAME_GEO_VALS
#define NADIR_FRAME_GEO_VALS | ( | geoname, | |
var, | |||
scalefactor, | |||
buf | |||
) |
◆ PACK_MEMBER
#define PACK_MEMBER | ( | member, | |
buffer_ptr | |||
) |
◆ REFL_1000M_START_INDEX
#define REFL_1000M_START_INDEX 7 |
◆ REFL_250M_START_INDEX
#define REFL_250M_START_INDEX 0 |
◆ REFL_500M_START_INDEX
#define REFL_500M_START_INDEX 2 |
◆ REFL_BAND26_START_INDEX
#define REFL_BAND26_START_INDEX 21 |
◆ SCAN_INTERVAL
#define SCAN_INTERVAL 1.4771 |
◆ SET_UI_SDS_CONV_ATTRS
#define SET_UI_SDS_CONV_ATTRS | ( | sds_id, | |
spec_uncert, | |||
scale_factor, | |||
indx, | |||
numval, | |||
lun | |||
) |
◆ SW_DEF_EV_Aggr_SDS
#define SW_DEF_EV_Aggr_SDS | ( | SI_name, | |
UI_name, | |||
SU_name, | |||
str | |||
) |
◆ SW_DEF_EV_SDS
#define SW_DEF_EV_SDS | ( | SI_name, | |
UI_name, | |||
str | |||
) |
Enumeration Type Documentation
◆ L1B_EV_SDS_index_t
enum L1B_EV_SDS_index_t |
Definition at line 98 of file L1B_Setup.c.
Function Documentation
◆ Calculate_B26_B5_Correction()
PGSt_SMF_status Calculate_B26_B5_Correction | ( | float32 * | original_correction, |
float32 * | scaled_correction, | ||
L1B_ScaleOffset_t * | ScaleOffset | ||
) |
Definition at line 5821 of file L1B_Setup.c.
◆ Calculate_DCR_Change()
PGSt_SMF_status Calculate_DCR_Change | ( | L1A_granule_t * | L1A_Gran, |
QA_Data_t * | QA, | ||
L1B_Scan_Metadata_t * | L1B_Scan_Meta | ||
) |
Definition at line 4330 of file L1B_Setup.c.
◆ Calculate_Earth_Sun_Distance()
PGSt_SMF_status Calculate_Earth_Sun_Distance | ( | L1A_granule_t * | L1A_Gran, |
float32 * | Earth_Sun_Dist | ||
) |
Definition at line 509 of file L1B_Setup.c.
◆ Calculate_RSB_Cal_Coeff()
PGSt_SMF_status Calculate_RSB_Cal_Coeff | ( | lookup_tables_t * | tables, |
float32 | E_S_Dist, | ||
RSB_Cal_Coeff_t * | RSB_Cal_Coeff | ||
) |
Definition at line 607 of file L1B_Setup.c.
◆ Copy_Geo_SDS()
PGSt_SMF_status Copy_Geo_SDS | ( | L1B_granule_t * | L1B_Gran, |
boolean | skip_night_hi_res | ||
) |
Definition at line 3234 of file L1B_Setup.c.
◆ Create_Band_Subsetting_SDS()
PGSt_SMF_status Create_Band_Subsetting_SDS | ( | L1B_granule_t * | L1B_Gran, |
boolean | skip_night_hi_res | ||
) |
Definition at line 3046 of file L1B_Setup.c.
◆ Create_L1B_Swath()
PGSt_SMF_status Create_L1B_Swath | ( | L1B_granule_t * | L1B_Gran, |
boolean | skip_night_hi_res | ||
) |
Definition at line 1051 of file L1B_Setup.c.
◆ Determine_Other_Missing_Scans()
PGSt_SMF_status Determine_Other_Missing_Scans | ( | lookup_tables_t * | tables, |
L1A_granule_t * | L1A_Gran | ||
) |
Definition at line 5234 of file L1B_Setup.c.
◆ Determine_Split_Scans()
PGSt_SMF_status Determine_Split_Scans | ( | L1A_granule_t * | L1A_Gran, |
boolean * | split_scan | ||
) |
Definition at line 5353 of file L1B_Setup.c.
◆ Get_SDS_id()
PGSt_SMF_status Get_SDS_id | ( | int32 | f, |
L1B_Scan_t * | L1B_Scan, | ||
int16 * | num_sds, | ||
int32 * | sds_id | ||
) |
Definition at line 2778 of file L1B_Setup.c.
◆ Get_Split_Scan_Indexes()
PGSt_SMF_status Get_Split_Scan_Indexes | ( | int32 | S1, |
int32 | num_scans, | ||
int16 | mirror_side[], | ||
int32 | scan_quality[][SCAN_QUALITY_ARRAY_NUM_ELEMENTS], | ||
int32 * | S_split_1, | ||
int32 * | S_split_2 | ||
) |
Definition at line 5507 of file L1B_Setup.c.
◆ Init_L1B_ScaleOffset()
PGSt_SMF_status Init_L1B_ScaleOffset | ( | L1B_ScaleOffset_t * | SO, |
RSB_Cal_Coeff_t * | RSB_Cal_Coeff, | ||
float | E_S_Dist, | ||
lookup_tables_t * | tables | ||
) |
Definition at line 728 of file L1B_Setup.c.
◆ Init_QA_Parameters()
PGSt_SMF_status Init_QA_Parameters | ( | L1A_granule_t * | L1A_Gran, |
L1B_granule_t * | L1B_Gran, | ||
QA_Data_t * | QA | ||
) |
Definition at line 4608 of file L1B_Setup.c.
◆ L1B_Setup()
PGSt_SMF_status L1B_Setup | ( | lookup_tables_t * | tables, |
L1A_granule_t * | L1A_Gran, | ||
L1B_granule_t * | L1B_Gran, | ||
L1A_Scan_t * | L1A_Scan, | ||
L1B_Scan_t * | L1B_Scan, | ||
QA_Data_t * | QA, | ||
L1B_Scan_Metadata_t * | L1B_Scan_Meta, | ||
boolean | skip_night_hi_res | ||
) |
Definition at line 223 of file L1B_Setup.c.
◆ Open_L1A_EV_SDS()
PGSt_SMF_status Open_L1A_EV_SDS | ( | L1A_granule_t * | L1A_Gran, |
L1A_Scan_t * | L1A_Scan | ||
) |
Definition at line 424 of file L1B_Setup.c.
◆ Open_L1B_EV_SDS()
PGSt_SMF_status Open_L1B_EV_SDS | ( | L1B_granule_t * | L1B_Gran, |
L1B_Scan_t * | L1B_Scan, | ||
boolean | skip_night_hi_res | ||
) |
Definition at line 1717 of file L1B_Setup.c.
◆ Open_W_L1B_Granule()
PGSt_SMF_status Open_W_L1B_Granule | ( | lookup_tables_t * | tables, |
L1B_granule_t * | L1B_Gran, | ||
L1B_Scan_t * | L1B_Scan, | ||
boolean | skip_night_hi_res | ||
) |
Definition at line 886 of file L1B_Setup.c.
◆ Scan_Meta_Cal()
PGSt_SMF_status Scan_Meta_Cal | ( | lookup_tables_t * | tables, |
L1A_granule_t * | L1A_Gran, | ||
L1B_granule_t * | L1B_Gran, | ||
L1B_Scan_Metadata_t * | L1B_Scan_Meta, | ||
QA_Data_t * | QA | ||
) |
Definition at line 3757 of file L1B_Setup.c.
◆ Set_L1B_EV_SDS_Attrs()
PGSt_SMF_status Set_L1B_EV_SDS_Attrs | ( | lookup_tables_t * | tables, |
L1B_granule_t * | L1B_Gran, | ||
L1B_Scan_t * | L1B_Scan, | ||
boolean | skip_night_hi_res | ||
) |
Definition at line 2046 of file L1B_Setup.c.
◆ Set_SDS_Attributes()
PGSt_SMF_status Set_SDS_Attributes | ( | int32 * | sds_id, |
char ** | BandNames, | ||
float32 ** | scale, | ||
float32 ** | offset, | ||
char * | rad_units, | ||
char * | refl_units, | ||
char * | counts_units, | ||
int32 | num_sds | ||
) |
Definition at line 2862 of file L1B_Setup.c.
◆ Set_UI_ConvertToPercent_Attrs()
PGSt_SMF_status Set_UI_ConvertToPercent_Attrs | ( | lookup_tables_t * | tables, |
L1B_Scan_t * | L1B_Scan, | ||
boolean | skip_night_hi_res | ||
) |
Definition at line 5658 of file L1B_Setup.c.
◆ Set_Unit_Range_Fillvalue()
PGSt_SMF_status Set_Unit_Range_Fillvalue | ( | L1B_Scan_t * | L1B_Scan, |
boolean | skip_night_hi_res | ||
) |
Definition at line 2430 of file L1B_Setup.c.
◆ Write_L1B_ScanMeta()
PGSt_SMF_status Write_L1B_ScanMeta | ( | L1B_Scan_Metadata_t * | L1B_Scan_Meta, |
L1A_granule_t * | L1A_Gran, | ||
QA_Data_t * | QA, | ||
boolean | skip_night_hi_res | ||
) |
Definition at line 4801 of file L1B_Setup.c.
◆ Write_Swath_Band_Number()
PGSt_SMF_status Write_Swath_Band_Number | ( | int32 | file_index, |
L1B_granule_t * | L1B_Gran | ||
) |
Definition at line 1572 of file L1B_Setup.c.
Variable Documentation
◆ Band_subsetting_names
char* Band_subsetting_names[NUM_L1A_RESOLUTIONS] |
Definition at line 159 of file L1B_Setup.c.
◆ GEO_SDS
Definition at line 195 of file L1B_Setup.c.
◆ L1A_EV_SDS_NAME
char* L1A_EV_SDS_NAME[NUM_L1A_RESOLUTIONS] |
Definition at line 85 of file L1B_Setup.c.
◆ L1B_EV_DIM_FRAC_OFFSET
float32 L1B_EV_DIM_FRAC_OFFSET[NUM_L1A_RESOLUTIONS][L1B_EV_SDS_RANK-1] |
Definition at line 183 of file L1B_Setup.c.
◆ L1B_EV_DIM_NAME
char* L1B_EV_DIM_NAME[NUM_L1A_RESOLUTIONS][L1B_EV_SDS_RANK] |
Definition at line 168 of file L1B_Setup.c.
◆ L1B_EV_DIM_OFFSET
int32 L1B_EV_DIM_OFFSET[NUM_L1A_RESOLUTIONS][L1B_EV_SDS_RANK-1] |
Definition at line 177 of file L1B_Setup.c.
◆ L1B_EV_SDS_LONG_NAME
char* L1B_EV_SDS_LONG_NAME[NUM_L1B_EV_SDS] |
Definition at line 124 of file L1B_Setup.c.
◆ L1B_EV_SDS_NAME
char* L1B_EV_SDS_NAME[NUM_L1B_EV_SDS] |
Definition at line 110 of file L1B_Setup.c.