OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
Preprocess.c File Reference
#include "Preprocess.h"
#include "PreprocessP.h"
#include "HDF_Lib.h"
#include "PGS_PC.h"
#include "PGS_MET.h"
#include "PGS_Error_Codes.h"
#include "FNames.h"
#include <math.h>
#include "granule_extract_metadata.h"
Include dependency graph for Preprocess.c:

Go to the source code of this file.

Macros

#define CALC_ONE_TEMP_QA(t, tablevar, output)
 
#define CONVERT_TEMP_POLY(tdk, tdn, c, dnsat, toffset)
 
#define WRITE_DN_BG_AT_RES(r, avg, var, omask)
 
#define NUM_ENG_MEM_SDS   12
 
#define NUM_PIXEL_QUALITY_SDS   5
 
#define NUM_SCANMETA_SDS   14
 

Functions

PGSt_SMF_status Calculate_Temp_QA (int32 num_scans, Temperatures_t *temps, QA_tables_t *tables, QA_Data_t *QA)
 
PGSt_SMF_status Calculate_Planck (float32 *RSR, float32 *wl, int16 size, float32 T, float32 *planck)
 
void Prepare_dn_bb_for_PVLW_XT_cor (Overlap_OBCEng_t *Leading_OBCEng, L1A_granule_OBCEng_t *L1A_OBCEng, Overlap_OBCEng_t *Trailing_OBCEng, emiss_tables_t *tables, Moon_arrays_t *moon_arrays, float32 Xdn_bb_pvlw_xt[][NUM_PVLW_XT_BANDS][DETECTORS_PER_1KM_BAND])
 
void Compute_dn_bb_for_PVLW_XT_cor_Per_Scan (int8 moon_in_SV_KOB, int16 *BB, int16 *SV, emiss_tables_t *tables, float32 *xdnbb)
 
PGSt_SMF_status Get_Emiss_Coeff_Per_Scan (int8 moon_in_SV_KOB, int16 *BB, int16 *SV, int16 B, int16 D, int16 D_emiss, int16 MS, Emiss_Cal_Coeff_t *RVS_Coeff, emiss_tables_t *tables, float32 T_bb, float32 T_mir, float32 T_cav, float32 T_ins, float32 *Xdn_bb_31, float32 Xdn_bb_pvlw_xt[][DETECTORS_PER_1KM_BAND], float32 *Xb1, float32 *xdLbb, float32 *xdnbb, float32 *xLbb, float32 *xLcav, float32 *xdnsv, float32 *xdnsv_var, uint32 *sv_omask, float32 *SNR)
 
PGSt_SMF_status Preprocess_L1A_Data (lookup_tables_t *tables, L1A_granule_t *L1A_Gran, L1B_granule_t *L1B_Gran, QA_Data_t *QA, Preprocess_Data_t *PP)
 
PGSt_SMF_status Process_OBCEng_Emiss (L1A_granule_t *L1A_Gran, L1A_granule_OBCEng_t *L1A_OBCEng, Emiss_Cal_Coeff_t *RVS_Coeff, emiss_tables_t *tables, QA_tables_t *QA_tables, Moon_arrays_t *moon_arrays, QA_Data_t *QA, Preprocess_Emiss_t *PP, DN_OBC_Avg_t *DN_OBC_Avg)
 
PGSt_SMF_status Calculate_PP_Planck_Mir (int32 num_scans, emiss_tables_t *tables, Preprocess_Emiss_t *PP)
 
PGSt_SMF_status Get_Leading_Gran_Emiss_Coeff (Overlap_OBCEng_t *Leading_OBCEng, int16 B, int16 D, int16 D_emiss, Emiss_Cal_Coeff_t *RVS_Coeff, emiss_tables_t *tables, Moon_arrays_t *moon_arrays, float32 Xdn_bb_31[][DETECTORS_PER_1KM_BAND], float32 Xdn_bb_pvlw_xt[][NUM_PVLW_XT_BANDS][DETECTORS_PER_1KM_BAND], float32 *Xb1, int16 *XMS)
 
PGSt_SMF_status Get_Middle_Gran_Emiss_Coeff (L1A_granule_OBCEng_t *L1A_OBCEng, int16 B, int16 D, int16 D_emiss, Emiss_Cal_Coeff_t *RVS_Coeff, emiss_tables_t *tables, emiss_QA_tables_t *QA_tables, Moon_arrays_t *moon_arrays, float32 Xdn_bb_31[][DETECTORS_PER_1KM_BAND], float32 Xdn_bb_pvlw_xt[][NUM_PVLW_XT_BANDS][DETECTORS_PER_1KM_BAND], float32 *Xb1, int16 *XMS, QA_Emiss_t *QA, Preprocess_Emiss_t *PP, DN_OBC_Avg_t *DN_OBC_Avg)
 
PGSt_SMF_status Get_Trailing_Gran_Emiss_Coeff (int32 num_scans_middle, Overlap_OBCEng_t *Trailing_OBCEng, int16 B, int16 D, int16 D_emiss, Emiss_Cal_Coeff_t *RVS_Coeff, emiss_tables_t *tables, Moon_arrays_t *moon_arrays, float32 Xdn_bb_31[][DETECTORS_PER_1KM_BAND], float32 Xdn_bb_pvlw_xt[][NUM_PVLW_XT_BANDS][DETECTORS_PER_1KM_BAND], float32 *Xb1, int16 *XMS)
 
PGSt_SMF_status Get_All_Emiss_Coeff (L1A_granule_OBCEng_t *L1A_OBCEng, int16 B, int16 D_emiss, float32 *Xb1, int16 *Xmir, emiss_tables_t *tables, emiss_QA_tables_t *QA_tables, QA_Emiss_t *QA, Preprocess_Emiss_t *PP)
 
PGSt_SMF_status Get_DN_Avg_SDev_Rejects (int32 start_index, int32 N, int32 index_increment, int16 *DN_array, int16 DN_upper_valid_limit, int16 DN_lower_valid_limit, float32 *mean_DN, float32 *sdev_DN, int16 *rejects)
 
PGSt_SMF_status Pack_Rejects_In_Outlier_Mask (int32 N, int16 *rejects, uint32 *packed_rejects)
 
PGSt_SMF_status Process_OBCEng_Refl (int32 sd_id, int32 num_scans, float32 *T_ins, int16 *MirrorSide, refl_tables_t *refl_tables, Moon_arrays_t *moon_arrays, L1A_granule_OBCEng_t *L1A_OBCEng, DN_OBC_Avg_t *DN_OBC_Avg, QA_Refl_t *QA_refl, Preprocess_Refl_t *PP_Refl)
 
PGSt_SMF_status Cross_Granule_Sliding_Average (int32 num_overlapScans, int32 num_scans_middle, float32 *Xarray, int16 *Xmir, float32 *avg)
 
PGSt_SMF_status Granule_Average_Temperature (int32 num_values, float32 *array, float32 *avg)
 
PGSt_SMF_status Get_Temp_Avg_And_Variance (int32 N, float32 *T, float32 *avg, float32 *var)
 
PGSt_SMF_status Fill_Invalid_Temp_DNs (int32 num_scans, uint16 miss_DN, uint16 sat_DN, uint16 *DN)
 
PGSt_SMF_status Get_Electronics_index (int32 num_scans, uint16 *Electronics_pri, uint16 *Electronics_red, uint16 *Electronics_index)
 
PGSt_SMF_status Get_Electronics_index_special (int32 num_scans, uint16 *Electronics_pri, uint16 *Electronics_red, uint16 *Electronics_index)
 
PGSt_SMF_status Read_L1A_OBCEng (emiss_tables_t *emiss_tables, L1A_granule_t *L1A_Gran, L1A_granule_OBCEng_t *L1A_OBCEng)
 
PGSt_SMF_status Read_Overlap_OBCEng (L1A_granule_t *L1A_Gran, emiss_tables_t *emiss_tables, PGSt_PC_Logical lun, Overlap_OBCEng_t *Overlap_OBCEng, boolean *scan_gap)
 
PGSt_SMF_status Read_Convert_Temperatures (emiss_tables_t *tables, int32 v_id, int32 start_scan, int32 num_scans, int32 satellite_ID, Temperatures_t *temps)
 
PGSt_SMF_status Compute_BB_Temperature (emiss_tables_t *tables, int32 start_scan, int32 num_scans, uint16 *CP_index, uint16 **raw_BB_temp, int32 satellite_ID, Temperatures_t *temps)
 
PGSt_SMF_status Write_Geo_OBC_SDS (int32 obc_sd_id, int32 num_scans)
 
PGSt_SMF_status Write_L1B_OBCEng (L1A_granule_t *L1A_Gran, lookup_tables_t *tables, Moon_arrays_t *moon_arrays, DN_OBC_Avg_t *DN_OBC_Avg)
 
PGSt_SMF_status Copy_EngMemData (int32 in_sd_id, int32 out_sd_id, int32 num_scans)
 
PGSt_SMF_status Copy_PixelQualityData (int32 in_sd_id, int32 out_sd_id, int32 num_scans)
 
PGSt_SMF_status Copy_ScanMetadata (int32 in_sd_id, int32 out_sd_id, int32 num_scans)
 
PGSt_SMF_status Copy_EngVdata (int32 in_v_id, int32 out_v_id)
 
PGSt_SMF_status Check_For_Moon_in_SV_KOB (int32 num_scans, common_QA_tables_t *common_QA_tables, QA_Data_t *QA, Moon_arrays_t *moon_arrays)
 
PGSt_SMF_status Fill_250m_DN_OBC_Avg (int32 sd_id, int32 num_scans, int16 *MirrorSide, refl_tables_t *refl_tables, Moon_arrays_t *moon_arrays, boolean Ecal_On[][NUM_BANDS], DN_OBC_Avg_t *DN_OBC_Avg, QA_Refl_t *QA_refl)
 
PGSt_SMF_status Fill_500m_DN_OBC_Avg (int32 sd_id, int32 num_scans, int16 *MirrorSide, refl_tables_t *refl_tables, Moon_arrays_t *moon_arrays, boolean Ecal_On[][NUM_BANDS], DN_OBC_Avg_t *DN_OBC_Avg, QA_Refl_t *QA_refl)
 
PGSt_SMF_status Fill_1km_day_DN_OBC_Avg (int32 sd_id, int32 num_scans, int16 *MirrorSide, refl_tables_t *refl_tables, Moon_arrays_t *moon_arrays, boolean Ecal_On[][NUM_BANDS], DN_OBC_Avg_t *DN_OBC_Avg, QA_Refl_t *QA_refl)
 
PGSt_SMF_status Fill_Band_26_DN_OBC_Avg (int32 sd_id, int32 num_scans, int16 *MirrorSide, refl_tables_t *refl_tables, Moon_arrays_t *moon_arrays, boolean Ecal_On[][NUM_BANDS], DN_OBC_Avg_t *DN_OBC_Avg, QA_Refl_t *QA_refl)
 
PGSt_SMF_status Adjust_dn_star_Min (float32 *dn_star_Min, int32 L1A_v_id, int32 num_scans)
 
PGSt_SMF_status Check_For_Ecal_On (int32 lun, int32 num_scans, int32 v_id, boolean Ecal_On[][NUM_BANDS])
 
PGSt_SMF_status Check_If_Sector_Rotated (int32 lun, int32 num_scans, int32 v_id, boolean Sector_Rotated[])
 
PGSt_SMF_status sort_int16_array (int32 n, int16 *a, int32 *indx)
 
PGSt_SMF_status Get_DN_Avg_SDev_Rejects_LowN (int32 N_include, int32 start_index, int32 N, int32 index_increment, int16 *DN_array, int16 DN_upper_valid_limit, int16 DN_lower_valid_limit, float32 *mean_DN, float32 *sdev_DN, int16 *rejects)
 
PGSt_SMF_status Calculate_RVS_Correction (lookup_tables_t *tables, L1B_granule_t *L1B_Gran)
 

Variables

int32 SUBSAMPLES_AT_RES [NUM_L1A_RESOLUTIONS] = {4, 2, 1, 1}
 
int16 TARGET_1km_FRAMES [NUM_TARGETS] = { 50, 10, 50, 50, 1354 }
 
int16 PVLW_XT_BANDS [NUM_PVLW_XT_BANDS] = {BAND27,BAND28,BAND29,BAND30}
 
int16 PVLW_XT_BANDS_FRAME_REL_POS [NUM_PVLW_XT_BANDS] = {-5, -8, -11, -14}
 
char * L1A_TARGET_SDS_NAME [NUM_TARGETS][NUM_L1A_RESOLUTIONS]
 
char * L1A_BAND_DIM_NAME [NUM_L1A_RESOLUTIONS]
 
char * L1A_TRACK_DIM_NAME [NUM_L1A_RESOLUTIONS]
 
char * L1A_FRAME_DIM_NAME [NUM_TARGETS-1][NUM_L1A_RESOLUTIONS]
 
int16 RFLAG
 
int32 extract_pixel_offset
 
int32 extract_pixel_count
 
int32 extract_line_offset
 
int32 extract_line_count
 

Macro Definition Documentation

◆ CALC_ONE_TEMP_QA

#define CALC_ONE_TEMP_QA (   t,
  tablevar,
  output 
)
Value:
returnStatus = Get_Temp_Avg_And_Variance(num_scans, t, &avg, &var); \
if (returnStatus != MODIS_S_OK) \
SMF_ERROR(MODIS_F_NOK, \
"Get_Temp_Avg_And_Variance failed, Calculate_Temp_QA, Preprocess.c"); \
ratio = var / tablevar; \
CONVERT_TO_UINT8(ratio, output);

◆ CONVERT_TEMP_POLY

#define CONVERT_TEMP_POLY (   tdk,
  tdn,
  c,
  dnsat,
  toffset 
)
Value:
if (tdn > 0 && tdn < dnsat) tdk = toffset + \
c[0] + tdn * (c[1] + tdn * (c[2] + tdn * (c[3] + tdn * (c[4] + tdn * c[5]))));

◆ NUM_ENG_MEM_SDS

#define NUM_ENG_MEM_SDS   12

◆ NUM_PIXEL_QUALITY_SDS

#define NUM_PIXEL_QUALITY_SDS   5

◆ NUM_SCANMETA_SDS

#define NUM_SCANMETA_SDS   14

◆ WRITE_DN_BG_AT_RES

#define WRITE_DN_BG_AT_RES (   r,
  avg,
  var,
  omask 
)

Function Documentation

◆ Adjust_dn_star_Min()

PGSt_SMF_status Adjust_dn_star_Min ( float32 *  dn_star_Min,
int32  L1A_v_id,
int32  num_scans 
)

Definition at line 8347 of file Preprocess.c.

◆ Calculate_Planck()

PGSt_SMF_status Calculate_Planck ( float32 *  RSR,
float32 *  wl,
int16  size,
float32  T,
float32 *  planck 
)

Definition at line 314 of file Preprocess.c.

◆ Calculate_PP_Planck_Mir()

PGSt_SMF_status Calculate_PP_Planck_Mir ( int32  num_scans,
emiss_tables_t tables,
Preprocess_Emiss_t PP 
)

Definition at line 1807 of file Preprocess.c.

◆ Calculate_RVS_Correction()

PGSt_SMF_status Calculate_RVS_Correction ( lookup_tables_t tables,
L1B_granule_t L1B_Gran 
)

Definition at line 9049 of file Preprocess.c.

◆ Calculate_Temp_QA()

PGSt_SMF_status Calculate_Temp_QA ( int32  num_scans,
Temperatures_t temps,
QA_tables_t tables,
QA_Data_t QA 
)

Definition at line 74 of file Preprocess.c.

◆ Check_For_Ecal_On()

PGSt_SMF_status Check_For_Ecal_On ( int32  lun,
int32  num_scans,
int32  v_id,
boolean  Ecal_On[][NUM_BANDS] 
)

Definition at line 8452 of file Preprocess.c.

◆ Check_For_Moon_in_SV_KOB()

PGSt_SMF_status Check_For_Moon_in_SV_KOB ( int32  num_scans,
common_QA_tables_t common_QA_tables,
QA_Data_t QA,
Moon_arrays_t moon_arrays 
)

Definition at line 7041 of file Preprocess.c.

◆ Check_If_Sector_Rotated()

PGSt_SMF_status Check_If_Sector_Rotated ( int32  lun,
int32  num_scans,
int32  v_id,
boolean  Sector_Rotated[] 
)

Definition at line 8661 of file Preprocess.c.

◆ Compute_BB_Temperature()

PGSt_SMF_status Compute_BB_Temperature ( emiss_tables_t tables,
int32  start_scan,
int32  num_scans,
uint16 *  CP_index,
uint16 **  raw_BB_temp,
int32  satellite_ID,
Temperatures_t temps 
)

Definition at line 5468 of file Preprocess.c.

◆ Compute_dn_bb_for_PVLW_XT_cor_Per_Scan()

void Compute_dn_bb_for_PVLW_XT_cor_Per_Scan ( int8  moon_in_SV_KOB,
int16 *  BB,
int16 *  SV,
emiss_tables_t tables,
float32 *  xdnbb 
)

Definition at line 567 of file Preprocess.c.

◆ Copy_EngMemData()

PGSt_SMF_status Copy_EngMemData ( int32  in_sd_id,
int32  out_sd_id,
int32  num_scans 
)

Definition at line 6251 of file Preprocess.c.

◆ Copy_EngVdata()

PGSt_SMF_status Copy_EngVdata ( int32  in_v_id,
int32  out_v_id 
)

Definition at line 6774 of file Preprocess.c.

◆ Copy_PixelQualityData()

PGSt_SMF_status Copy_PixelQualityData ( int32  in_sd_id,
int32  out_sd_id,
int32  num_scans 
)

Definition at line 6440 of file Preprocess.c.

◆ Copy_ScanMetadata()

PGSt_SMF_status Copy_ScanMetadata ( int32  in_sd_id,
int32  out_sd_id,
int32  num_scans 
)

Definition at line 6590 of file Preprocess.c.

◆ Cross_Granule_Sliding_Average()

PGSt_SMF_status Cross_Granule_Sliding_Average ( int32  num_overlapScans,
int32  num_scans_middle,
float32 *  Xarray,
int16 *  Xmir,
float32 *  avg 
)

Definition at line 3113 of file Preprocess.c.

◆ Fill_1km_day_DN_OBC_Avg()

PGSt_SMF_status Fill_1km_day_DN_OBC_Avg ( int32  sd_id,
int32  num_scans,
int16 *  MirrorSide,
refl_tables_t refl_tables,
Moon_arrays_t moon_arrays,
boolean  Ecal_On[][NUM_BANDS],
DN_OBC_Avg_t DN_OBC_Avg,
QA_Refl_t QA_refl 
)

Definition at line 7821 of file Preprocess.c.

◆ Fill_250m_DN_OBC_Avg()

PGSt_SMF_status Fill_250m_DN_OBC_Avg ( int32  sd_id,
int32  num_scans,
int16 *  MirrorSide,
refl_tables_t refl_tables,
Moon_arrays_t moon_arrays,
boolean  Ecal_On[][NUM_BANDS],
DN_OBC_Avg_t DN_OBC_Avg,
QA_Refl_t QA_refl 
)

Definition at line 7238 of file Preprocess.c.

◆ Fill_500m_DN_OBC_Avg()

PGSt_SMF_status Fill_500m_DN_OBC_Avg ( int32  sd_id,
int32  num_scans,
int16 *  MirrorSide,
refl_tables_t refl_tables,
Moon_arrays_t moon_arrays,
boolean  Ecal_On[][NUM_BANDS],
DN_OBC_Avg_t DN_OBC_Avg,
QA_Refl_t QA_refl 
)

Definition at line 7524 of file Preprocess.c.

◆ Fill_Band_26_DN_OBC_Avg()

PGSt_SMF_status Fill_Band_26_DN_OBC_Avg ( int32  sd_id,
int32  num_scans,
int16 *  MirrorSide,
refl_tables_t refl_tables,
Moon_arrays_t moon_arrays,
boolean  Ecal_On[][NUM_BANDS],
DN_OBC_Avg_t DN_OBC_Avg,
QA_Refl_t QA_refl 
)

Definition at line 8109 of file Preprocess.c.

◆ Fill_Invalid_Temp_DNs()

PGSt_SMF_status Fill_Invalid_Temp_DNs ( int32  num_scans,
uint16  miss_DN,
uint16  sat_DN,
uint16 *  DN 
)

Definition at line 3365 of file Preprocess.c.

◆ Get_All_Emiss_Coeff()

PGSt_SMF_status Get_All_Emiss_Coeff ( L1A_granule_OBCEng_t L1A_OBCEng,
int16  B,
int16  D_emiss,
float32 *  Xb1,
int16 *  Xmir,
emiss_tables_t tables,
emiss_QA_tables_t QA_tables,
QA_Emiss_t QA,
Preprocess_Emiss_t PP 
)

Definition at line 2552 of file Preprocess.c.

◆ Get_DN_Avg_SDev_Rejects()

PGSt_SMF_status Get_DN_Avg_SDev_Rejects ( int32  start_index,
int32  N,
int32  index_increment,
int16 *  DN_array,
int16  DN_upper_valid_limit,
int16  DN_lower_valid_limit,
float32 *  mean_DN,
float32 *  sdev_DN,
int16 *  rejects 
)

Definition at line 2726 of file Preprocess.c.

◆ Get_DN_Avg_SDev_Rejects_LowN()

PGSt_SMF_status Get_DN_Avg_SDev_Rejects_LowN ( int32  N_include,
int32  start_index,
int32  N,
int32  index_increment,
int16 *  DN_array,
int16  DN_upper_valid_limit,
int16  DN_lower_valid_limit,
float32 *  mean_DN,
float32 *  sdev_DN,
int16 *  rejects 
)

Definition at line 8876 of file Preprocess.c.

◆ Get_Electronics_index()

PGSt_SMF_status Get_Electronics_index ( int32  num_scans,
uint16 *  Electronics_pri,
uint16 *  Electronics_red,
uint16 *  Electronics_index 
)

Definition at line 3470 of file Preprocess.c.

◆ Get_Electronics_index_special()

PGSt_SMF_status Get_Electronics_index_special ( int32  num_scans,
uint16 *  Electronics_pri,
uint16 *  Electronics_red,
uint16 *  Electronics_index 
)

Definition at line 3572 of file Preprocess.c.

◆ Get_Emiss_Coeff_Per_Scan()

PGSt_SMF_status Get_Emiss_Coeff_Per_Scan ( int8  moon_in_SV_KOB,
int16 *  BB,
int16 *  SV,
int16  B,
int16  D,
int16  D_emiss,
int16  MS,
Emiss_Cal_Coeff_t RVS_Coeff,
emiss_tables_t tables,
float32  T_bb,
float32  T_mir,
float32  T_cav,
float32  T_ins,
float32 *  Xdn_bb_31,
float32  Xdn_bb_pvlw_xt[][DETECTORS_PER_1KM_BAND],
float32 *  Xb1,
float32 *  xdLbb,
float32 *  xdnbb,
float32 *  xLbb,
float32 *  xLcav,
float32 *  xdnsv,
float32 *  xdnsv_var,
uint32 *  sv_omask,
float32 *  SNR 
)

Definition at line 707 of file Preprocess.c.

◆ Get_Leading_Gran_Emiss_Coeff()

PGSt_SMF_status Get_Leading_Gran_Emiss_Coeff ( Overlap_OBCEng_t Leading_OBCEng,
int16  B,
int16  D,
int16  D_emiss,
Emiss_Cal_Coeff_t RVS_Coeff,
emiss_tables_t tables,
Moon_arrays_t moon_arrays,
float32  Xdn_bb_31[][DETECTORS_PER_1KM_BAND],
float32  Xdn_bb_pvlw_xt[][NUM_PVLW_XT_BANDS][DETECTORS_PER_1KM_BAND],
float32 *  Xb1,
int16 *  XMS 
)

Definition at line 1875 of file Preprocess.c.

◆ Get_Middle_Gran_Emiss_Coeff()

PGSt_SMF_status Get_Middle_Gran_Emiss_Coeff ( L1A_granule_OBCEng_t L1A_OBCEng,
int16  B,
int16  D,
int16  D_emiss,
Emiss_Cal_Coeff_t RVS_Coeff,
emiss_tables_t tables,
emiss_QA_tables_t QA_tables,
Moon_arrays_t moon_arrays,
float32  Xdn_bb_31[][DETECTORS_PER_1KM_BAND],
float32  Xdn_bb_pvlw_xt[][NUM_PVLW_XT_BANDS][DETECTORS_PER_1KM_BAND],
float32 *  Xb1,
int16 *  XMS,
QA_Emiss_t QA,
Preprocess_Emiss_t PP,
DN_OBC_Avg_t DN_OBC_Avg 
)

Definition at line 2099 of file Preprocess.c.

◆ Get_Temp_Avg_And_Variance()

PGSt_SMF_status Get_Temp_Avg_And_Variance ( int32  N,
float32 *  T,
float32 *  avg,
float32 *  var 
)

Definition at line 3284 of file Preprocess.c.

◆ Get_Trailing_Gran_Emiss_Coeff()

PGSt_SMF_status Get_Trailing_Gran_Emiss_Coeff ( int32  num_scans_middle,
Overlap_OBCEng_t Trailing_OBCEng,
int16  B,
int16  D,
int16  D_emiss,
Emiss_Cal_Coeff_t RVS_Coeff,
emiss_tables_t tables,
Moon_arrays_t moon_arrays,
float32  Xdn_bb_31[][DETECTORS_PER_1KM_BAND],
float32  Xdn_bb_pvlw_xt[][NUM_PVLW_XT_BANDS][DETECTORS_PER_1KM_BAND],
float32 *  Xb1,
int16 *  XMS 
)

Definition at line 2351 of file Preprocess.c.

◆ Granule_Average_Temperature()

PGSt_SMF_status Granule_Average_Temperature ( int32  num_values,
float32 *  array,
float32 *  avg 
)

Definition at line 3219 of file Preprocess.c.

◆ Pack_Rejects_In_Outlier_Mask()

PGSt_SMF_status Pack_Rejects_In_Outlier_Mask ( int32  N,
int16 *  rejects,
uint32 *  packed_rejects 
)

Definition at line 2887 of file Preprocess.c.

◆ Prepare_dn_bb_for_PVLW_XT_cor()

void Prepare_dn_bb_for_PVLW_XT_cor ( Overlap_OBCEng_t Leading_OBCEng,
L1A_granule_OBCEng_t L1A_OBCEng,
Overlap_OBCEng_t Trailing_OBCEng,
emiss_tables_t tables,
Moon_arrays_t moon_arrays,
float32  Xdn_bb_pvlw_xt[][NUM_PVLW_XT_BANDS][DETECTORS_PER_1KM_BAND] 
)

Definition at line 398 of file Preprocess.c.

◆ Preprocess_L1A_Data()

PGSt_SMF_status Preprocess_L1A_Data ( lookup_tables_t tables,
L1A_granule_t L1A_Gran,
L1B_granule_t L1B_Gran,
QA_Data_t QA,
Preprocess_Data_t PP 
)

Definition at line 1163 of file Preprocess.c.

◆ Process_OBCEng_Emiss()

PGSt_SMF_status Process_OBCEng_Emiss ( L1A_granule_t L1A_Gran,
L1A_granule_OBCEng_t L1A_OBCEng,
Emiss_Cal_Coeff_t RVS_Coeff,
emiss_tables_t tables,
QA_tables_t QA_tables,
Moon_arrays_t moon_arrays,
QA_Data_t QA,
Preprocess_Emiss_t PP,
DN_OBC_Avg_t DN_OBC_Avg 
)

Definition at line 1357 of file Preprocess.c.

◆ Process_OBCEng_Refl()

PGSt_SMF_status Process_OBCEng_Refl ( int32  sd_id,
int32  num_scans,
float32 *  T_ins,
int16 *  MirrorSide,
refl_tables_t refl_tables,
Moon_arrays_t moon_arrays,
L1A_granule_OBCEng_t L1A_OBCEng,
DN_OBC_Avg_t DN_OBC_Avg,
QA_Refl_t QA_refl,
Preprocess_Refl_t PP_Refl 
)

Definition at line 2959 of file Preprocess.c.

◆ Read_Convert_Temperatures()

PGSt_SMF_status Read_Convert_Temperatures ( emiss_tables_t tables,
int32  v_id,
int32  start_scan,
int32  num_scans,
int32  satellite_ID,
Temperatures_t temps 
)

Definition at line 4855 of file Preprocess.c.

◆ Read_L1A_OBCEng()

PGSt_SMF_status Read_L1A_OBCEng ( emiss_tables_t emiss_tables,
L1A_granule_t L1A_Gran,
L1A_granule_OBCEng_t L1A_OBCEng 
)

Definition at line 3672 of file Preprocess.c.

◆ Read_Overlap_OBCEng()

PGSt_SMF_status Read_Overlap_OBCEng ( L1A_granule_t L1A_Gran,
emiss_tables_t emiss_tables,
PGSt_PC_Logical  lun,
Overlap_OBCEng_t Overlap_OBCEng,
boolean scan_gap 
)

Definition at line 3906 of file Preprocess.c.

◆ sort_int16_array()

PGSt_SMF_status sort_int16_array ( int32  n,
int16 *  a,
int32 *  indx 
)

Definition at line 8814 of file Preprocess.c.

◆ Write_Geo_OBC_SDS()

PGSt_SMF_status Write_Geo_OBC_SDS ( int32  obc_sd_id,
int32  num_scans 
)

Definition at line 5706 of file Preprocess.c.

◆ Write_L1B_OBCEng()

PGSt_SMF_status Write_L1B_OBCEng ( L1A_granule_t L1A_Gran,
lookup_tables_t tables,
Moon_arrays_t moon_arrays,
DN_OBC_Avg_t DN_OBC_Avg 
)

Definition at line 5853 of file Preprocess.c.

Variable Documentation

◆ extract_line_count

int32 extract_line_count

Definition at line 72 of file Preprocess.c.

◆ extract_line_offset

int32 extract_line_offset

Definition at line 71 of file Preprocess.c.

◆ extract_pixel_count

int32 extract_pixel_count

Definition at line 70 of file Preprocess.c.

◆ extract_pixel_offset

int32 extract_pixel_offset

Definition at line 69 of file Preprocess.c.

◆ L1A_BAND_DIM_NAME

char* L1A_BAND_DIM_NAME[NUM_L1A_RESOLUTIONS]
Initial value:
= {
"Band_250m", "Band_500m", "Band_1km_day", "Band_1km_night"
}

Definition at line 47 of file Preprocess.c.

◆ L1A_FRAME_DIM_NAME

char* L1A_FRAME_DIM_NAME[NUM_TARGETS-1][NUM_L1A_RESOLUTIONS]
Initial value:
= {
{"4*SD_frames", "2*SD_frames", "SD_frames", "SD_frames"},
{"4*SRCA_frames", "2*SRCA_frames", "SRCA_frames", "SRCA_frames"},
{"4*BB_frames", "2*BB_frames", "BB_frames", "BB_frames"},
{"4*SV_frames", "2*SV_frames", "SV_frames", "SV_frames"},
}

Definition at line 55 of file Preprocess.c.

◆ L1A_TARGET_SDS_NAME

char* L1A_TARGET_SDS_NAME[NUM_TARGETS][NUM_L1A_RESOLUTIONS]
Initial value:
= {
{"SD_250m", "SD_500m", "SD_1km_day", "SD_1km_night"},
{"SRCA_250m", "SRCA_500m", "SRCA_1km_day", "SRCA_1km_night"},
{"BB_250m", "BB_500m", "BB_1km_day", "BB_1km_night"},
{"SV_250m", "SV_500m", "SV_1km_day", "SV_1km_night"},
{"EV_250m", "EV_500m", "EV_1km_day", "EV_1km_night"}
}

Definition at line 33 of file Preprocess.c.

◆ L1A_TRACK_DIM_NAME

char* L1A_TRACK_DIM_NAME[NUM_L1A_RESOLUTIONS]
Initial value:
= {
"40*nscans", "20*nscans", "10*nscans", "10*nscans"
}

Definition at line 51 of file Preprocess.c.

◆ PVLW_XT_BANDS

int16 PVLW_XT_BANDS[NUM_PVLW_XT_BANDS] = {BAND27,BAND28,BAND29,BAND30}

Definition at line 26 of file Preprocess.c.

◆ PVLW_XT_BANDS_FRAME_REL_POS

int16 PVLW_XT_BANDS_FRAME_REL_POS[NUM_PVLW_XT_BANDS] = {-5, -8, -11, -14}

Definition at line 29 of file Preprocess.c.

◆ RFLAG

int16 RFLAG

Definition at line 75 of file Granule.c.

◆ SUBSAMPLES_AT_RES

int32 SUBSAMPLES_AT_RES[NUM_L1A_RESOLUTIONS] = {4, 2, 1, 1}

Definition at line 21 of file Preprocess.c.

◆ TARGET_1km_FRAMES

int16 TARGET_1km_FRAMES[NUM_TARGETS] = { 50, 10, 50, 50, 1354 }

Definition at line 23 of file Preprocess.c.

#define MODIS_S_OK
data_t t[NROOTS+1]
Definition: decode_rs.h:77
u5 which has been done in the LOCALGRANULEID metadata should have an extension NRT It is requested to identify the NRT production Changes from v6 which may affect scientific output
Definition: HISTORY.txt:186
PGSt_SMF_status Get_Temp_Avg_And_Variance(int32 N, float32 *T, float32 *avg, float32 *var)
Definition: Preprocess.c:3038
#define MODIS_F_NOK
no change in intended resolving MODur00064 Corrected handling of bad ephemeris attitude resolving resolving GSFcd00179 Corrected handling of fill values for[Sensor|Solar][Zenith|Azimuth] resolving MODxl01751 Changed to validate LUT version against a value retrieved from the resolving MODxl02056 Changed to calculate Solar Diffuser angles without adjustment for estimated post launch changes in the MODIS orientation relative to incidentally resolving defects MODxl01766 Also resolves MODxl01947 Changed to ignore fill values in SCI_ABNORM and SCI_STATE rather than treating them as resolving MODxl01780 Changed to use spacecraft ancillary data to recognise when the mirror encoder data is being set by side A or side B and to change calculations accordingly This removes the need for seperate LUTs for Side A and Side B data it makes the new LUTs incompatible with older versions of the and vice versa Also resolves MODxl01685 A more robust GRing algorithm is being which will create a non default GRing anytime there s even a single geolocated pixel in a granule Removed obsolete messages from seed as required for compatibility with version of the SDP toolkit Corrected test output file names to end in per delivery and then split off a new MYD_PR03 pcf file for Aqua Added AssociatedPlatformInstrumentSensor to the inventory metadata in MOD01 mcf and MOD03 mcf Created new versions named MYD01 mcf and MYD03 where AssociatedPlatformShortName is rather than Terra The program itself has been changed to read the Satellite Instrument validate it against the input L1A and LUT and to use it determine the correct files to retrieve the ephemeris and attitude data from Changed to produce a LocalGranuleID starting with MYD03 if run on Aqua data Added the Scan Type file attribute to the Geolocation copied from the L1A and attitude_angels to radians rather than degrees The accumulation of Cumulated gflags was moved from GEO_validate_earth_location c to GEO_locate_one_scan c
Definition: HISTORY.txt:464