;***************************************************************************** ; NICST TOOL ; ; Readme file for RC5 Test Part 1, gain swithcing and dynamic range requirements. ;***************************************************************************** First dump the raw dn for the EV and SV only in a directory such as ../Hot_plateau/28V/Gain/Fixed_High/ and ../Hot_plateau/28V/Gain/Auto_Low/. Also, required is the general_TEB.sav file, which contains general band info. Run the temperature, radiance, and dn calculations with the same codes for both the dynamic range and gain switching. Use the fixed high for the dynamic range and the auto gain for the gain switching. ;***************************************************************************** ; General procedure. ;***************************************************************************** 1) RC5_Gain_read_LRV_data.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. Input: an input file with a path to the raw data and a path for the output data. Output: ...temp..sav file containing 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_Gain_rad_1.pro (backup RC5_Gain_rad_1_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. 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_Gain_read_LRV_data.pro. Output: ...rad.sav file containing ncollects, p[bannds], rad_BCS[collect,band,HAM,detector,subsample,scans], rad_p1[band,collect,bcs=0 svs=1], rad_p3[band,HAM,collect,scans,ham=0 rta=1 cav=2 sh=3 obc=4], and rvs[band,subsample,detector,HAM,bcs=0 svs=1 obc=2]. 3) RC5_Gain_dn_3.pro Reads the dumped DN files for the fixed high and auto low gain collects in the high temperature range, background subtracts, frame averages, determines the standard deviations, and calulates the slopes of the data as a function of frames for both EV. 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.dynamic-range.sav file containing dn(collect,band,HAM,detector,subsample,3], std(collect,band,HAM,detector,subsample,3], dn_col(collect,band,HAM,detector,subsample,scan,3], std_col(collect,band,HAM,detector,subsample,scan,3],dn_col_2(collect,band,HAM,detector,subsample,frames], std_col_2(collect,band,HAM,detector,subsample,frames]. 4) RC5_Gain_dynamic_range.pro (backup RC5_Gain_dynamic_range_EDU.pro for the EDU) Calculates a quadratic fit for the fixed high collects within the dynamic range and a straight line fit for those above the dynamic range. It then calculates the intersection point and determines the dn, L, and temp. Then it finds the average over detectors, HAM sides, and subsets, for each band. Makes plots. Input: an input file with a path to the raw data and a path for the output data. Output: ...dyn.sav file containing saturation_dn[band,HAM,detector,subsample], saturation_L[band,HAM,detector,subsample], saturation_temp[band,HAM,detector,subsample], saturation_dn_band[band], saturation_L_band[band], saturation_temp_band[band] Output: ...dynamic_range.ps file containing the plots mentioned. 5) RC5_Gain_switch.pro Plots the dn vs radiance for the auto gain collects for band M13. Input: an input file with a path to the raw data and a path for the output data. Output: ...gain_switching.ps file containing the plots mentioned. ;************Misc********* Subroutines: read_dmpd.pro sig_mean.pro n_collect.pro initial_ham_side.pro Planck.pro legend.pro set_legend.pro set_multicolor.pro get_avg_l.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