;***************************************************************************** ; NICST TOOL ; ; Readme file for RC5 Test Part 2. ; version 2: updates to portability and output. ; version 3: updated ARD, SNR fitting routines, cross calibration. ; Version 5: added truncation of SV and OBC DN to 12 bit and divided delta radiance by rho_rta ;***************************************************************************** Extract using the LRV the following files: 27007 ETA_FT_LW_CFPA_HI_RSL, 27009 ETA_FT_SM_CFPA_HI_RSL, 29024 ETP_MF_STOPASSY_BAFF_NZ, 29005 ETP_MF_AO_BLKHD_NX_PZ, 21028 ETP_AP_LW_CCA, 21029 ETP_AP_SM_CCA, 29017 ETP_MF_SCAN_CVTY_BAF_NZ, 29016 ETP_MF_SCAN_CVTY_BAF_PZ, 29014 ETP_MF_SCAN_CAVITY_NX_P, 29011 ETP_MF_TEL_BLKHD_PY, 2006 ETP_BB_6, 22005 ETP_BB_5, 2004 ETP_BB_4, 2003 ETP_BB_3, 22002 ETP_BB_2, 2001 ETP_BB_1, 12021 ETP_SE_HAM_MIRR_T1, -- FU1 12022 ETP_SE_HAM_MIRR_T2. -- FU1 12021 ETP_SE_HAM_MIRR_T1, -- EDU 12022 ETP_SE_HAM_MIRR_T2. -- EDU First place the LRV files in a directory such as ../Hot_plateau/28V/OBC/LRV/ and place the relavant .gse files in a directory such as ../Hot_plateau/28V/OBC/GSE/. Then dump the raw dn for the OBC, EV, and SV only in a directory such as ../Hot_plateau/28V/OBC/. Also, required is the general_TEB.sav file, which contains general band info and sav files for RVS, RSR, and xxx_general_coef.sav (xxx=EDU or FU1). Also required is a sav file containing the BCS coefficients from part 1. ;***************************************************************************** ; General procedure. ;***************************************************************************** 1) RC5_OBC_read_LRV.pro Reads the LRV files and scan averages the temperatures (converting to K where appropriate). In addition, the slopes of the temperatures over scan and collect are recorded. Use Slope_temp_1 and Slope_temp_3 for SRV0654, std_obc_temp1 and std_obc_temp2 for SRV0095, and T_obc and T_obc_2 for SRV0598. Input: an input file with a path to the raw data and a path for the output data. Output: ...temp..sav file containing ham[scan,collect], ncollect, T_xxx[collect] (svs, bcs, omm, cfpa, lwasp, and mwasp) and T_xxx[ham,collect] (ham, cav, rta, sh, and obc), T_xxx_2[scans,collect] (svs, bcs, omm, cfpa, lwasp, and mwasp) and T_xxx_2[scans,ham,collect] (ham, cav, rta, sh, and obc), slope_temp_1[ham=0 cav=1 rta=2 sh=3 obc=4,ham,collect,a0=1 a1=1], slope_temp_2[cfpa=0 omm=1 lwasp=2 mwasp=3,collect,a0=1 a1=1], slope_temp_3[ham=0 cav=1 rta=2 sh=3 obc=4,ham,a0=1 a1=1], slope_temp_4[cfpa=0 omm=1 lwasp=2 mwasp=3,a0=1 a1=1],slope_temp_5[bcs=0 svs=1,collect,a0=1 a1=1], slope_temp_6[bcs=0 svs=1,collect,a0=1 a1=1], std_obc_temp1[HAM,collect], std_obc_temp1[HAM]), and T_obc_1[6,scans,ham,collect]. 2) RC5_OBC_rad.pro (backup RC5_OBC_rad_EDU.pro for the EDU) Reads the temperatures and calculates the radiances based on Planck's radiation law. It then incorporates both the RVS and RSR data to determine the delta radiance for the OBC on a scan by scan basis. Input: an input file with a path to the raw data and a path for the output data. The input file also contains the paths to sav files for the RVS, EDU instrument coefficients, and RSR. Temperature output from RC5_OBC_read_LRV_data.pro. Output: ...rad.sav file containing ncollects, p[bannds], rad_BCS[collect,band,HAM,detector,subsample,0=RSR 1=no RSR], rad_BCS_scan[collect,band,HAM,detector,subsample,scan,0=RSR 1=no RSR], rad_OBC_1_scan[collect,band,HAM,detector,subsample,scan,0=RSR 1=no RSR], rad_OBC_scan[collect,band,HAM,detector,subsample,scan,0=RSR 1=no RSR], rad_p1[band,collect,0=BCS 1=SVS,0=RSR 1=no RSR], rad_p2[band,HAM,collect,0=RSR 1=no RSR] -- 0 for HAM, 1 for RTA, 2 for CAV, 3 for SH, and 4 for OBC, rad_p3[collects,band,HAM,detector,scans,5] -- 0 for HAM, 1 for RTA, 2 for CAV, 3 for SH, and 4 for OBC, and rvs[band,subsample,detector,HAM,0=BCS 1=SVS]. 3) RC5_OBC_dn_3.pro (RC5_OBC_dn_4.pro for binary) Reads the dumped DN files, background subtracts, frame averages, determines the standard deviations, and calulates the slopes of the data as a function of frames for both EV and OBC DN. The dn and std are calculated three ways: scan and then frame averaged, frame and then scan averaged, and scan + frame averaged (uses a 3 sigma kick out at each step). The difference between the two versions is that the first labels the first subsample as 1 and the second labels the higher subsample as 1. Input: an input file with a path to the raw data and a path for the output data. Output: ...dn.sav file containing dn(collect,band,HAM,detector,subsample,gain,F->S S->F S+F], std(collect,band,HAM,detector,subsample,gain,F->S S->F S+F], dn_obc(collect,band,HAM,detector,subsample,gain,F->S S->F S+F], std_obc(collect,band,HAM,detector,subsample,gain,F->S S->F S+F], dn_col(collect,band,HAM,detector,subsample,gain,scan,EV SV OBC], std_col(collect,band,HAM,detector,subsample,gain,scan,EV SV OBC], dn_col_2(collect,band,HAM,detector,subsample,gain,frames,EV OBC], std_col_2(collect,band,HAM,detector,subsample,gain,frames,EV OBC]. Output: ...DN.slope.sav file containing DN_EV(collects,bands,HAM,detector,subframe,gain,scans) DN_OB(collects,bands,HAM,detector,subframe,gain,scans), std_EV(collects,bands,HAM,detector,subframe,gain,scans), std_OB(collects,bands,HAM,detector,subframe,gain,scans),slope1(collect,band,HAM,detector,subsample,gain,scan,a0=1 a1=1], slope2(collect,band,HAM,detector,subsample,gain,a0=1 a1=1], slope3(collect,band,HAM,detector,subsample,gain,a0=1 a1=1], slope_obc1(collect,band,HAM,detector,subsample,gain,scan,a0=1 a1=1], slope_obc2(collect,band,HAM,detector,subsample,gain,a0=1 a1=1], slope_obc3(collect,band,HAM,detector,subsample,gain,a0=1 a1=1], slope2_sv2(collect,band,HAM,detector,subsample,gain,a0=1 a1=1]. 4) RC5_OBC_fit_3.pro (backup RC5_OBC_fit_3_EDU.pro for the EDU) Takes the rad_OBC and dn_obc and fits this data with POLY_FIT (linear, quadratic, and cubic polynomials). Fits both dn vs deltaL and deltaL vs dn for both warm-up and cool-down cycles. Generates fitting coefficients. Input: an input file with a path to the raw data and a path for the output data. Output: ...rg.sav file containing ncollects, rg[band,HAM,detector,subsample,a0 a1 a2 a3,fit,rsr], rg_1[band,HAM,detector,subsample,scans,a0 a1 a2 a3,fit,rsr] --cross calibrated, rg_2[band,HAM,detector,subsample,scans,a0 a1 a2 a3,fit,rsr] -- not cross calibrated, rg_1_error[band,HAM,detector,subsample,scans,a0 a1 a2 a3,fit,rsr], dL_fit[collects,band,HAM,detector,subsample,scans,fit,rsr], rrcu[band,HAM,detector,subsample,rsr,0=warm-up 1=cool-down], rrnl[band,HAM,detector,subsample,rsr,0=warm-up 1=cool-down], F_1[bands,HAM,detector,subsamples,fit,rsr] -- cross calibration factor, F_2[collects,bands,HAM,detector,subsamples,scans/2,fit,rsr] -- cross caibration factor, dn_x[collects,bands,HAM,detector,subsamples,scans/2], and rad_OBC_scan_x[collects,bands,HAM,detector,subsamples,scans/2,rsr]. Output files containing gains:...rg.txt, ...rg.scan_avg.txt, and ...rg.det_avg.txt. 5) RC5_OBC_eff_rad.pro (backup RC5_OBC_eff_rad_EDU.pro for the EDU) Calculates the retreived radiance for BCS, the Absolute Radiance Difference (ARD), and the Radiametric Response Uniformity (RRU). SVR0545 uses ARD for M bands, SRV0546 uses ARD for I bands, and SRV0613 uses RRU. Input: an input file with a path to the raw data and a path for the output data. Output: ...eff_rad.sav file containing rad_OBC_ret[collect,bands,HAM,detectors,subsets,fits,rsr], mean_ARD_obc[collect,bands,HAM,subsets,fits,rsr], max_ARD_obc[collect,bands,HAM,subsets,fits,rsr], ARD_obc[collect,bands,HAM,detectors,subsets,fits,rsr], RRU_OBC_det[collect,bands,HAM,detectors,subsets,fits,rsr], RRU_OBC[collect,bands,HAM,subsets,fits,rsr], rad_BCS_ret[collect,bands,HAM,detectors,subsets,fits,rsr], mean_ARD[collect,bands,HAM,subsets,fits,rsr], max_ARD[collect,bands,HAM,subsets,fits,rsr], ARD[collect,bands,HAM,detectors,subsets,fits,rsr], RRU_BCS_det[collect,bands,HAM,detectors,subsets,fits,rsr], and RRU_BCS[collect,bands,HAM,subsets,fits,rsr]. Output files containing ARD and RRU:...ard.txt and ...rru.txt. 6a) RC5_OBC_SNR_NEdT_2.pro (backup RC5_OBC_SNR_NEdT_EDU_2.pro for the EDU) Calulates the snr from the dn and std, then fits the snr to the rad_OBC radiance using a function for both warm up (ifit=0) and cool down (ifit=1). In addition, the fits are redone using gaussian wieghting (1/std). Then the NEdL and NEdT are calulated. This analysis was done on a scan by scan basis. Input: an input file with a path to the raw data and a path for the output data. Output: ...snr.sav file containing SNR[collect,band,HAM,detector,subsample], SNR_1[collect,band,HAM,detector,subsample,scan], snr_coeff_warm[band,HAM,detector,subsample,coefficients,not weighted or weighted,rsr], snr_coeff_warm_error[band,HAM,detector,subsample,coefficients,not weighted or weighted,rsr], snr_fit_warm[collect,band,HAM,detector,subsample,scan,not weighted or weighted,rsr], NEdL_warm[collect,b,HAM,detector,subsample,scan,not weighted or weighted,rsr], NEdT_warm[collect,band,HAM,detector,subsample,scan,not weighted or weighted,rsr], SNR_typ_warm[band,HAM,detector,subsample,scan,not weighted or weighted,rsr], NEdL_typ_warm[band,HAM,detector,subsample,scan,not weighted or weighted,rsr], NEdT_typ_warm[band,HAM,detector,subsample,scan,not weighted or weighted,rsr], snr_coeff_cool[band,HAM,detector,subsample,coefficients,not weighted or weighted,rsr], snr_coeff_cool_error[band,HAM,detector,subsample,coefficients,not weighted or weighted,rsr], snr_fit_cool[collect,band,HAM,detector,subsample,scan,not weighted or weighted,rsr], NEdL_cool[collect,b,HAM,detector,subsample,scan,not weighted or weighted,rsr], NEdT_cool[collect,band,HAM,detector,subsample,scan,not weighted or weighted,rsr], SNR_typ_cool[band,HAM,detector,subsample,scan,not weighted or weighted,rsr], NEdL_typ_cool[band,HAM,detector,subsample,scan,not weighted or weighted,rsr], and NEdT_typ_cool[band,HAM,detector,subsample,scan,not weighted or weighted,rsr]. Output files containing SNR and NEdT at T_typ:...snr_typ.txt and ...NEdT_typ.txt. 6b) RC5_OBC_SNR_NEdT_2.pro (backup RC5_OBC_SNR_NEdT_EDU_2.pro for the EDU) Calulates the snr from the dn and std, then fits the snr to the rad_OBC radiance using a function for both warm up (ifit=0) and cool down (ifit=1). In addition, the fits are redone using gaussian wieghting (1/std). Then the NEdL and NEdT are calulated. This analysis was done on a scan averaged basis. Input: an input file with a path to the raw data and a path for the output data. Output: ...snr.sav file containing SNR[collect,band,HAM,detector,subsample], SNR_1[collect,band,HAM,detector,subsample,scan], snr_coeff_warm[band,HAM,detector,subsample,coefficients,not weighted or weighted,rsr], snr_coeff_warm_error[band,HAM,detector,subsample,coefficients,not weighted or weighted,rsr], snr_fit_warm[collect,band,HAM,detector,subsample,not weighted or weighted,rsr], NEdL_warm[collect,b,HAM,detector,subsample,not weighted or weighted,rsr], NEdT_warm[collect,band,HAM,detector,subsample,not weighted or weighted,rsr], SNR_typ_warm[band,HAM,detector,subsample,not weighted or weighted,rsr], NEdL_typ_warm[band,HAM,detector,subsample,not weighted or weighted,rsr], NEdT_typ_warm[band,HAM,detector,subsample,not weighted or weighted,rsr], snr_coeff_cool[band,HAM,detector,subsample,coefficients,not weighted or weighted,rsr], snr_coeff_cool_error[band,HAM,detector,subsample,coefficients,not weighted or weighted,rsr], snr_fit_cool[collect,band,HAM,detector,subsample,not weighted or weighted,rsr], NEdL_cool[collect,b,HAM,detector,subsample,not weighted or weighted,rsr], NEdT_cool[collect,band,HAM,detector,subsample,not weighted or weighted,rsr], SNR_typ_cool[band,HAM,detector,subsample,not weighted or weighted,rsr], NEdL_typ_cool[band,HAM,detector,subsample,not weighted or weighted,rsr], and NEdT_typ_cool[band,HAM,detector,subsample,not weighted or weighted,rsr]. 7) RC5_view.pro Plots the dn vs deltaL along with the fits. In addition, the fitting residuals are shown for each fit. The L_min, L_typ, and L_max values are marked. Coefficients are plotted vs detector. Also, the RRNL and RRCU are plotted. Input: an input file with a path to the raw data and a path for the output data. Output: ...ps files containing the plots mentioned. ;************Misc********* Subroutines: read_dmpd3.pro sig_mean.pro Planck.pro Planck_deriv.pro legend.pro set_legend.pro set_multicolor.pro get_avg_2.pro Files that produce .sav files used here: general_data.pro read_rvs.pro read_rsr.pro EDU_general_coef.pro Input file: Input.txt