;***************************************************************************** ; NICST TOOL ; ; Readme file for RC5 Test Part 1. Treat the low gain M13 states seperately. ; Version 2: updates to portability and output. ; Version 3: updates to error analysis and gain drift correction. ; Version 4: changed dynamic range from at detector radiance to scene radiance. ; 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, 32021 ETP_SE_HAM_MIRR_T1, -- FU1 32022 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/LRV/ and place the relavant .gse files in a directory such as ../Hot_plateau/28V/GSE/. Then dump the raw dn for 200 M band samples in a directory such as ../Hot_plateau/28V/. Also, required is the general_TEB.2.sav file (or general_TEB.sav), which contains general band info, and sav files for RVS, RSR, and xxx_general_coef.sav (xxx=EDU or FU1). ;***************************************************************************** ; General procedure. ;***************************************************************************** 1) RC5_read_LRV.pro (RC5_read_LRV_2.pro for integration time test) Reads the LRV and GSE files and scan averages the temperatures (converting to K where appropriate). In addition, the slopes of the temperatures over scan and collect are recorded. The standard deviation of the OBC thermistors is also calculated. Input: an input file with a path to the raw data and a path for the output data. Output: ...temp.sav file containing ncollects, ham[scans,collects], T_xxx[collect] (svs, bcs, omm, cfpa, lwasp, and mwasp) and T_xxx[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_xxx_2[scans,HAM,collects] (ham, cav, rta, sh, and obc). ...temp.ps file containing plots of all temperatures versus time and scan*collect, as well as versus scan for each collect. In addition, there is a plot of the standard deviation of the OBC thermistors. ...temp.slope.txt file containing those temperatures with a change of 0.05 K over scans or 1 degree over collects. 2) RC5_rad.pro (backup RC5_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 BCS and OBC. 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, RSR, as well as the first sample number and number of samples (used to determine the HAM AOI). Temperature output from RC5_read_LRV_data.pro. Output: ...rad.sav file containing ncollects, p[bands], rad_BCS[collect,band,HAM,detector,subsample,rsr], rad_OBC[collect,band,HAM,detector,subsample,scan,rsr], rad_OBC_1[collect,band,HAM,detector,subsample,scan,rsr], rad_p1[band,collect,bcs=0 svs=1,rsr], rad_p2[band,HAM,collect,ham=0 rta=1 cav=2 sh=3 obc=4,rsr], rad_p3[band,HAM,collect,scan,ham=0 rta=1 cav=2 sh=3 obc=4,rsr], and rvs[band,subsample,detector,HAM,bcs=0 svs=1]. 3) RC5_dn_3.pro (RC5_dn_4.pro for binary) Reads the dumped DN files, background subtracts, scan and frame averages, determines the standard deviations, and calulates the slopes of the data as a function of frames and scans 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). 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]. ...ps files of plots of dn, DN, standard deviation, and slope vs scan or frame. 4) RC5_fit_3.pro (backup RC5_fit_3_EDU.pro for the EDU) Takes the rad_BCS and dn generated above and fits this data with POLY_FIT (linear,quadratic, and cubic calibration equations -- ifit=0-2 and linear, quadratic and cubic response equations -- ifit=3-5). Calulates the fitting residuals for all fits with and without the rsr. Generates fitting coefficients. Also, tests SVS0448 (RRCU) and SVS0595 (RRNL). 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_1[band,HAM,detector,subsample,a0 a1 a2 a3,ifit,rsr] -- radiometric gain per fit, rg_1_error[band,HAM,detector,subsample,a0 a1 a2 a3,ifit,rsr] -- error per fit coefficient, dL_fit[collect,band,HAM,detector,subsample,ifit,rsr] -- fitting residual per fit, rrcu[band,HAM,detector,subsample,ifit,rsr,sum or quadrature] -- radiometric response characterization uncertainty per fit, and rrnl[band,HAM,detector,subsample,ifit,rsr] -- radiometric response non-linearity per fit. 5) RC5_SNR_NEdT.pro (backup RC5_SNR_NEdT_EDU.pro for the EDU) Calulates the snr from the dn and std, then fits the snr to the rad_BCS radiance using a function (ifit=0) and quadratic polynomial (ifit=1). In addition, the fits are done using gaussian wieghting (1/std). Then the SNR, NEdL, and NEdT are calulated at Ttyp, SRV0053. 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,0=scan method 1=sample method 2=overall method], snr_1[band,HAM,detector,subsample,coefficients,ifit,not weighted or weighted,rsr], snr_1_error[band,HAM,detector,subsample,coefficients,ifit,not weighted or weighted,rsr], snr_fit[collect,band,HAM,detector,subsample,ifit,not weighted or weighted,rsr], NEdL[collect,b,HAM,detector,subsample,ifit,not weighted or weighted,rsr], NEdT[collect,band,HAM,detector,subsample,ifit,not weighted or weighted,rsr], SNR_typ[band,HAM,detector,subsample,ifit,not weighted or weighted,rsr], NEdL_typ[band,HAM,detector,subsample,ifit,not weighted or weighted,rsr], NEdT_typ[band,HAM,detector,subsample,ifit,not weighted or weighted,rsr]. 6) RC5_eff_rad.pro (backup RC5_eff_rad_EDU.pro for the EDU) Calculates the retreived radiance for the 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_BCS_ret[collect,band,HAM,detector,subsample,ifit] ARD[collect,band,HAM,detector,subsample,ifit], RRU[collect,band,HAM,subsample,ifit], mean_ARD[collect,band,HAM,subsample,ifit], max_ARD[collect,band,HAM,subsample,ifit] ARD_gc[collect,band,HAM,detector,subsample,ifit] -- ARD minus fitting residual, mean_ARD_gc[collect,band,HAM,subsample,ifit] -- mean ARD over detectors minus fitting residual, and RRU_det[collect,band,HAM,detector,subsample,ifit]. ...ps file of plots of ARD and RRU vs BCS temperature. 7) RC5_view.pro (backup RC5_view_EDU.pro for the EDU) Plots the coefficients as a function of detector. Plots the dn vs deltaL along with the fits. SRV0466 is shown by the whether or not the points encompass the entire dynamic range for any band. In addition, the fitting residuals are shown for each fit. Then the SNR vs deltaL is graphed along with the fits. The L_min, L_typ, and L_max values are marked on dn and SNR plots. Then the NEdT is plotted vs deltaL as well as the NEdT at Ttyp vs detector. Plots the RRCU and RRNL vs detector (SRV0448 and SRV0595 respectively). Input: an input file with a path to the raw data and a path for the output data. Output: ...ps file containing the plots mentioned. 8) RC5_int_time_plots Plots the dn vs integration time. Only for integration time test. Input: an input file with a path to the raw data and a path for the output data. Output: ...int_time.ps file containing the plots mentioned. ;************Misc********* Subroutines: read_dmpd3.pro sig_mean.pro sig_mean_no_kick.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.2.pro read_rvs.pro read_rsr.pro EDU_general_coef.pro Input file: Input.txt