def f_detector(readout_mode, exposure_type, ng, nint=1, nf=5, GWA=None, subarray_id=None): ''' Basic function to parse the fpa configuration and multiaccum settings :param readout_mode: :param exposure_type: :param ng: number of groups :param nint: number of integrations. default for comissioning nint=1 :param nf: number of frames. default is IRS2 nf=5 :param GWA: :param subarray_id: :return: ''' if subarray_id is not None: if GWA is None: print("ERROR - In subarray mode, the GWA is necessary.") print("ERROR - {:s} ".format(subarray_id)) print("ERROR - {:s} ".format(GWA)) configfpa = c_configurationfpa.ConfigurationFPA() configfpa.m_set_mode(readout_mode, exposure_type) if subarray_id is None or subarray_id == 'FULL-FRAME': configfpa.m_set_array_parameters() else: start_i = (subdict.subarray_dict[subarray_id]["substrt1"], ) * 2 start_j = subdict.subarray_dict[subarray_id]["substrt2"][GWA] size_i = subdict.subarray_dict[subarray_id]["subsize1"] size_j = subdict.subarray_dict[subarray_id]["subsize2"] configfpa.m_set_array_parameters(start_i=start_i, start_j=start_j, size_i=size_i, size_j=size_j) configfpa.m_set_header('none', 'none', 'none') multiaccum = c_multiaccum.Multiaccum() multiaccum.m_set_configuration(configfpa) multiaccum.m_set_header('none', 'none', 'none') multiaccum.m_set(nint, ng, nf) multiaccum.m_info() return multiaccum
print("# =====================================") print("# Detector configuration:") nexp = 4 print("# Number of exposures per scene: {:d}".format(nexp)) ng = 19 nint = 2 nf = 5 #IRS2 print(" Number of groups {:d} - number of intgrations {:d}".format(ng, nint)) print("") configfpa = c_configurationfpa.ConfigurationFPA() configfpa.m_set_mode('IRS2', 'full-frame') configfpa.m_set_array_parameters() configfpa.m_set_header('none', 'none', 'none') multiaccum = c_multiaccum.Multiaccum() multiaccum.m_set_configuration(configfpa) multiaccum.m_set_header('none', 'none', 'none') multiaccum.m_set(nint, ng, nf) multiaccum.m_info() # ======================================================================= # Generating the instances of the reference files (nrspydet.references) # ======================================================================= print("# Generating the instances of the reference files (gain & IPC).") gain = fpa106_toolbox.f_generate_gain('FULL-FRAME') ctm = fpa106_toolbox.f_generate_ctm() print("# Generating the count-rate maps.") # Looping over dither pointings (all unity-maps) count = 0