def default_pypeit_par(): """ Set default parameters for Shane Kast reductions. """ par = pypeitpar.PypeItPar() # Frame numbers par['calibrations']['standardframe']['number'] = 1 par['calibrations']['biasframe']['number'] = 5 par['calibrations']['pixelflatframe']['number'] = 5 par['calibrations']['traceframe']['number'] = 5 par['calibrations']['arcframe']['number'] = 1 # Scienceimage default parameters par['scienceimage'] = pypeitpar.ScienceImagePar() # Always flux calibrate, starting with default parameters par['fluxcalib'] = pypeitpar.FluxCalibrationPar() # Always correct for flexure, starting with default parameters par['flexure'] = pypeitpar.FlexurePar() # Set the default exposure time ranges for the frame typing par['calibrations']['biasframe']['exprng'] = [None, 1] par['calibrations']['darkframe']['exprng'] = [999999, None] # No dark frames par['calibrations']['pinholeframe']['exprng'] = [999999, None ] # No pinhole frames par['calibrations']['pixelflatframe']['exprng'] = [0, None] par['calibrations']['traceframe']['exprng'] = [0, None] par['calibrations']['arcframe']['exprng'] = [None, 60] par['calibrations']['standardframe']['exprng'] = [1, 200] par['scienceframe']['exprng'] = [200, None] return par
def test_exclude_source_objects(monkeypatch): monkeypatch.setattr(specobjs.SpecObjs, "from_fitsfile", mock_specobjs) file_list = ['spec1d_file1', 'spec1d_file2'] uncollated_list = SourceObject.build_source_objects(file_list, 'ra/dec') par = pypeitpar.PypeItPar() par['collate1d']['exclude_serendip'] = True par['collate1d']['wv_rms_thresh'] = 0.1 filtered_list, excluded_msgs = exclude_source_objects( uncollated_list, {'3003': 'Test Exclude`'}, par) assert [so.spec_obj_list[0].NAME for so in filtered_list ] == ['SPAT1234_SLIT1234_DET01', 'SPAT5334_SLIT4934_DET02'] assert [so.spec1d_file_list[0] for so in filtered_list] == ['spec1d_file1', 'spec1d_file1'] par['collate1d']['exclude_serendip'] = False par['coadd1d']['ex_value'] = 'BOX' par['collate1d']['wv_rms_thresh'] = None filtered_list, excluded_msgs = exclude_source_objects( uncollated_list, dict(), par) assert [so.spec_obj_list[0].NAME for so in filtered_list] == [ 'SPAT1234_SLIT1234_DET01', 'SPAT1233_SLIT1235_DET07', 'SPAT6250_SLIT6235_DET03', 'SPAT6256_SLIT6245_DET05', 'SPAT6934_SLIT6245_DET05' ] assert [so.spec1d_file_list[0] for so in filtered_list] == [ 'spec1d_file1', 'spec1d_file1', 'spec1d_file2', 'spec1d_file2', 'spec1d_file2' ]
def default_pypeit_par(): """ Set default parameters for Keck LRISr reductions. """ par = pypeitpar.PypeItPar() # Set wave tilts order par['calibrations']['slits']['sigdetect'] = 30. # 1D wavelengths par['calibrations']['wavelengths']['rms_threshold'] = 0.20 # Might be grism dependent # Always sky subtract, starting with default parameters par['scienceimage'] = pypeitpar.ScienceImagePar() # Always flux calibrate, starting with default parameters par['fluxcalib'] = pypeitpar.FluxCalibrationPar() # Always correct for flexure, starting with default parameters par['flexure']['method'] = 'boxcar' # Set the default exposure time ranges for the frame typing par['calibrations']['biasframe']['exprng'] = [None, 1] par['calibrations']['darkframe']['exprng'] = [999999, None] # No dark frames par['calibrations']['pinholeframe']['exprng'] = [999999, None] # No pinhole frames par['calibrations']['pixelflatframe']['exprng'] = [None, 30] # This may be too low for LRISb par['calibrations']['traceframe']['exprng'] = [None, 30] par['scienceframe']['exprng'] = [29, None] return par
def default_pypeit_par(): """ Set default parameters for FORS Reductions """ par = pypeitpar.PypeItPar() # Always correct for flexure, starting with default parameters par['flexure']['method'] = 'boxcar' # Adjustments to slit and tilts for NIR par['calibrations']['slits']['sigdetect'] = 50. par['calibrations']['slits']['trace_npoly'] = 3 par['calibrations']['slits']['maxshift'] = 0.5 # Tilt parameters par['calibrations']['tilts']['tracethresh'] = 25.0 par['calibrations']['tilts']['spat_order'] = 3 par['calibrations']['tilts']['spec_order'] = 4 # 1D wavelength solution par['calibrations']['wavelengths']['lamps'] = ['HeI', 'ArI' ] # Grating dependent par['calibrations']['wavelengths']['rms_threshold'] = 0.25 par['calibrations']['wavelengths']['sigdetect'] = 10.0 par['calibrations']['wavelengths']['fwhm'] = 4.0 # Good for 2x binning par['calibrations']['wavelengths']['n_final'] = 4 # Flats par['calibrations']['flatfield']['illumflatten'] = False par['calibrations']['flatfield']['tweak_slits_thresh'] = 0.90 par['calibrations']['flatfield']['tweak_slits_maxfrac'] = 0.10 return par
def default_pypeit_par(): """ Set default parameters for Keck LRISb reductions. """ par = pypeitpar.PypeItPar() par['rdx']['spectrograph'] = 'wht_isis_blue' # Set pixel flat combination method par['calibrations']['pixelflatframe']['process']['combine'] = 'median' par['calibrations']['pixelflatframe']['process']['sig_lohi'] = [10.,10.] # Change the wavelength calibration method par['calibrations']['wavelengths']['method'] = 'simple' # Scienceimage default parameters par['scienceimage'] = pypeitpar.ScienceImagePar() # Do not flux calibrate par['fluxcalib'] = None # Always correct for flexure, starting with default parameters par['flexure'] = pypeitpar.FlexurePar() # Set the default exposure time ranges for the frame typing par['calibrations']['biasframe']['exprng'] = [None, 1] par['calibrations']['darkframe']['exprng'] = [999999, None] # No dark frames par['calibrations']['pinholeframe']['exprng'] = [999999, None] # No pinhole frames par['calibrations']['arcframe']['exprng'] = [None, 120] par['calibrations']['standardframe']['exprng'] = [None, 120] par['scienceframe']['exprng'] = [90, None] return par
def default_pypeit_par(self): """ Set default parameters for reductions. """ par = pypeitpar.PypeItPar() par['rdx']['spectrograph'] = 'mdm_osmos_mdm4k' # Ignore PCA par['calibrations']['slitedges']['sync_predict'] = 'nearest' # Set pixel flat combination method par['calibrations']['pixelflatframe']['process']['combine'] = 'median' par['calibrations']['pixelflatframe']['process']['sig_lohi'] = [10.,10.] # Wavelength calibration methods par['calibrations']['wavelengths']['method'] = 'full_template' par['calibrations']['wavelengths']['lamps'] = ['ArI', 'XeI'] par['calibrations']['wavelengths']['reid_arxiv'] = 'mdm_osmos_mdm4k.fits' par['calibrations']['wavelengths']['sigdetect'] = 10.0 # Set the default exposure time ranges for the frame typing par['calibrations']['biasframe']['exprng'] = [None, 1] par['calibrations']['darkframe']['exprng'] = [999999, None] # No dark frames par['calibrations']['pinholeframe']['exprng'] = [999999, None] # No pinhole frames par['calibrations']['arcframe']['exprng'] = [None, None] # Long arc exposures on this telescope par['calibrations']['standardframe']['exprng'] = [None, 120] par['scienceframe']['exprng'] = [90, None] return par
def default_pypeit_par(): """ Set default parameters for LBT/LUCI reductions. OLD CODE from LBT MODS """ par = pypeitpar.PypeItPar() # Processing steps turn_off = dict(use_illumflat=False, use_biasimage=False, use_overscan=False, use_darkimage=False) par.reset_all_processimages_par(**turn_off) par['calibrations']['biasframe']['exprng'] = [None, 1] par['calibrations']['darkframe']['exprng'] = [999999, None] # No dark frames par['calibrations']['pinholeframe']['exprng'] = [999999, None ] # No pinhole frames par['calibrations']['pixelflatframe']['exprng'] = [0, None] par['calibrations']['traceframe']['exprng'] = [0, None] par['calibrations']['arcframe']['exprng'] = [None, 60] par['calibrations']['standardframe']['exprng'] = [1, 200] par['scienceframe']['exprng'] = [200, None] return par
def test_instantiate(fitstbl): par = pypeitpar.PypeItPar() spectrograph = load_kast_blue_masters(get_spectrograph=True)[0] caliBrate = calibrations.MultiSlitCalibrations(fitstbl, par['calibrations'], spectrograph) print(caliBrate)
def default_pypeit_par(): """ Set default parameters for Keck LRISr reductions. """ par = pypeitpar.PypeItPar() # Set wave tilts order par['calibrations']['slitedges']['edge_thresh'] = 15. par['calibrations']['slitedges']['fit_order'] = 3 par['calibrations']['slitedges']['sync_center'] = 'gap' # TODO: I had to increase this from 1. to 2. to deal with # Keck_LRIS_red/multi_1200_9000_d680_1x2/ . May need a # different solution given that this is binned data and most of # the data in the dev suite is unbinned. # JXP -- Increased to 6 arcsec. I don't know how 2 (or 1!) could have worked. par['calibrations']['slitedges']['minimum_slit_length'] = 6 # 1D wavelengths par['calibrations']['wavelengths']['rms_threshold'] = 0.20 # Might be grism dependent # Always flux calibrate, starting with default parameters par['fluxcalib'] = pypeitpar.FluxCalibrationPar() # Always correct for flexure, starting with default parameters par['flexure']['method'] = 'boxcar' # Set the default exposure time ranges for the frame typing par['calibrations']['biasframe']['exprng'] = [None, 1] par['calibrations']['darkframe']['exprng'] = [999999, None] # No dark frames par['calibrations']['pinholeframe']['exprng'] = [999999, None] # No pinhole frames par['calibrations']['pixelflatframe']['exprng'] = [None, 30] # This may be too low for LRISb par['calibrations']['traceframe']['exprng'] = [None, 30] par['scienceframe']['exprng'] = [29, None] return par
def default_pypeit_par(self): """ Set default parameters for magellan MagE reduction. """ par = pypeitpar.PypeItPar() par['rdx']['spectrograph'] = 'magellan_mage' # Frame numbers par['calibrations']['standardframe']['number'] = 1 par['calibrations']['biasframe']['number'] = 0 par['calibrations']['pixelflatframe']['number'] = 3 par['calibrations']['traceframe']['number'] = 3 par['calibrations']['arcframe']['number'] = 1 # Bias par['calibrations']['biasframe']['useframe'] = 'overscan' # Wavelengths # 1D wavelength solution par['calibrations']['wavelengths'][ 'rms_threshold'] = 0.20 # Might be grating dependent.. par['calibrations']['wavelengths']['sigdetect'] = 5.0 par['calibrations']['wavelengths']['lamps'] = ['ThAr'] par['calibrations']['wavelengths']['nonlinear_counts'] = self.detector[ 0]['nonlinear'] * self.detector[0]['saturation'] #par['calibrations']['wavelengths']['method'] = 'reidentify' # Reidentification parameters #par['calibrations']['wavelengths']['reid_arxiv'] = 'magellan_thar.json' par['calibrations']['wavelengths']['ech_fix_format'] = True # Echelle parameters par['calibrations']['wavelengths']['echelle'] = True par['calibrations']['wavelengths']['ech_nspec_coeff'] = 4 par['calibrations']['wavelengths']['ech_norder_coeff'] = 4 par['calibrations']['wavelengths']['ech_sigrej'] = 3.0 # Always correct for flexure, starting with default parameters par['flexure'] = pypeitpar.FlexurePar() par['scienceframe']['process']['sigclip'] = 20.0 par['scienceframe']['process']['satpix'] = 'nothing' # Set slits and tilts parameters # par['calibrations']['tilts']['order'] = 2 par['calibrations']['tilts']['tracethresh'] = [ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 ] par['calibrations']['slits']['trace_npoly'] = 5 par['calibrations']['slits']['maxshift'] = 3. par['calibrations']['slits']['pcatype'] = 'order' # Scienceimage default parameters par['scienceimage'] = pypeitpar.ScienceImagePar() # Always flux calibrate, starting with default parameters par['fluxcalib'] = pypeitpar.FluxCalibrationPar() # Do not correct for flexure par['flexure'] = pypeitpar.FlexurePar() par['flexure']['method'] = 'skip' # Set the default exposure time ranges for the frame typing par['calibrations']['standardframe']['exprng'] = [None, 20] par['calibrations']['arcframe']['exprng'] = [20, None] par['calibrations']['darkframe']['exprng'] = [20, None] par['scienceframe']['exprng'] = [20, None] return par
def default_pypeit_par(self): """ Set default parameters for Shane Kast Blue reductions. """ par = pypeitpar.PypeItPar() par['rdx']['spectrograph'] = 'keck_nires' # Frame numbers par['calibrations']['standardframe']['number'] = 1 par['calibrations']['biasframe']['number'] = 0 par['calibrations']['pixelflatframe']['number'] = 5 par['calibrations']['traceframe']['number'] = 5 par['calibrations']['arcframe']['number'] = 1 # Wavelengths # 1D wavelength solution par['calibrations']['wavelengths'][ 'rms_threshold'] = 0.20 #0.20 # Might be grating dependent.. par['calibrations']['wavelengths']['sigdetect'] = 5.0 par['calibrations']['wavelengths']['fwhm'] = 5.0 par['calibrations']['wavelengths']['n_final'] = [3, 4, 4, 4, 4] par['calibrations']['wavelengths']['lamps'] = ['OH_NIRES'] par['calibrations']['wavelengths']['nonlinear_counts'] = self.detector[ 0]['nonlinear'] * self.detector[0]['saturation'] par['calibrations']['wavelengths']['method'] = 'reidentify' # Reidentification parameters par['calibrations']['wavelengths']['reid_arxiv'] = 'keck_nires.fits' par['calibrations']['wavelengths']['ech_fix_format'] = True # Echelle parameters par['calibrations']['wavelengths']['echelle'] = True par['calibrations']['wavelengths']['ech_nspec_coeff'] = 4 par['calibrations']['wavelengths']['ech_norder_coeff'] = 6 par['calibrations']['wavelengths']['ech_sigrej'] = 3.0 # Tilt parameters par['calibrations']['tilts']['tracethresh'] = 10.0 #par['calibrations']['tilts']['spat_order'] = 3 #par['calibrations']['tilts']['spec_order'] = 3 # Flats par['calibrations']['flatfield']['illumflatten'] = False # Extraction par['scienceimage']['bspline_spacing'] = 0.8 par['scienceimage']['sn_gauss'] = 4.0 # Flexure par['flexure']['method'] = 'skip' par['scienceframe']['process']['sigclip'] = 20.0 par['scienceframe']['process']['satpix'] = 'nothing' # Overscan but not bias # This seems like a kludge of sorts par['calibrations']['biasframe']['useframe'] = 'none' # Set the default exposure time ranges for the frame typing par['calibrations']['standardframe']['exprng'] = [None, 20] par['calibrations']['arcframe']['exprng'] = [20, None] par['calibrations']['darkframe']['exprng'] = [20, None] par['scienceframe']['exprng'] = [20, None] return par
def default_pypeit_par(self): """ Set default parameters for the reductions. """ par = pypeitpar.PypeItPar() par['rdx']['spectrograph'] = 'gemini_flamingos2' # Image processing steps turn_off = dict(use_illumflat=False, use_biasimage=False, use_overscan=False, use_darkimage=False) par.reset_all_processimages_par(**turn_off) # Wavelengths # 1D wavelength solution with arc lines par['calibrations']['wavelengths']['rms_threshold'] = 0.5 par['calibrations']['wavelengths']['sigdetect'] = 5 par['calibrations']['wavelengths']['fwhm'] = 5 par['calibrations']['wavelengths']['n_first'] = 2 par['calibrations']['wavelengths']['n_final'] = 4 par['calibrations']['wavelengths']['lamps'] = ['OH_NIRES'] #par['calibrations']['wavelengths']['nonlinear_counts'] = self.detector[0]['nonlinear'] * self.detector[0]['saturation'] #par['calibrations']['wavelengths']['method'] = 'reidentify' #par['calibrations']['wavelengths']['method'] = 'full_template' #par['calibrations']['wavelengths']['reid_arxiv'] = 'magellan_fire_long.fits' par['calibrations']['wavelengths']['match_toler'] = 5.0 # Set slits and tilts parameters par['calibrations']['tilts']['tracethresh'] = 5 par['calibrations']['tilts']['spat_order'] = 4 par['calibrations']['slitedges']['trace_thresh'] = 10. par['calibrations']['slitedges']['edge_thresh'] = 200. #par['calibrations']['slitedges']['det_min_spec_length'] = 0.3 par['calibrations']['slitedges']['fit_min_spec_length'] = 0.4 par['calibrations']['slitedges']['sync_predict'] = 'nearest' # Set the default exposure time ranges for the frame typing par['calibrations']['standardframe']['exprng'] = [None, 30] par['calibrations']['tiltframe']['exprng'] = [50, None] par['calibrations']['arcframe']['exprng'] = [50, None] par['calibrations']['darkframe']['exprng'] = [20, None] par['scienceframe']['exprng'] = [20, None] # Scienceimage parameters par['reduce']['findobj']['sig_thresh'] = 5.0 par['reduce']['skysub']['sky_sigrej'] = 5.0 par['reduce']['findobj']['find_trim_edge'] = [10, 10] # Do not correct for flexure par['flexure']['spec_method'] = 'skip' # Sensitivity function parameters par['sensfunc']['algorithm'] = 'IR' par['sensfunc']['polyorder'] = 8 # ToDo: replace the telluric grid file for Gemini-S site. par['sensfunc']['IR']['telgridfile'] = resource_filename( 'pypeit', '/data/telluric/TelFit_LasCampanas_3100_26100_R20000.fits') return par
def default_pypeit_par(): """ Set default parameters for Keck LRISb reductions. """ par = pypeitpar.PypeItPar() # Set wave tilts order par['calibrations']['slits']['sigdetect'] = 20. par['calibrations']['slits']['trace_npoly'] = 3 # TODO: No longer a parameter # par['calibrations']['slits']['fracignore'] = 0.02 # par['calibrations']['slits']['pcapar'] = [3,2,1,0] # 1D wavelength solution par['calibrations']['wavelengths']['rms_threshold'] = 0.40 # Might be grating dependent.. par['calibrations']['wavelengths']['sigdetect'] = 5. # Doesn't work for reddest chip par['calibrations']['wavelengths']['lamps'] = ['CuI', 'ArI', 'ArII'] # Overscan subtract the images #par['calibrations']['biasframe']['useframe'] = 'overscan' # Alter the method used to combine pixel flats par['calibrations']['pixelflatframe']['process']['combine'] = 'median' par['calibrations']['pixelflatframe']['process']['sig_lohi'] = [10.,10.] # Scienceimage default parameters par['scienceimage'] = pypeitpar.ScienceImagePar() # Always flux calibrate, starting with default parameters par['fluxcalib'] = pypeitpar.FluxCalibrationPar() # Always correct for flexure, starting with default parameters par['flexure'] = pypeitpar.FlexurePar() # Set the default exposure time ranges for the frame typing #par['scienceframe']['exprng'] = [30, None] return par
def default_pypeit_par(): """ Set default parameters for Shane Kast reductions. """ par = pypeitpar.PypeItPar() # Ignore PCA par['calibrations']['slitedges']['sync_predict'] = 'nearest' # Flux calibration parset par['fluxcalib'] = pypeitpar.FluxCalibrationPar() # Always correct for flexure, starting with default parameters par['flexure']['method'] = 'boxcar' # Set the default exposure time ranges for the frame typing par['calibrations']['biasframe']['exprng'] = [None, 1] par['calibrations']['darkframe']['exprng'] = [999999, None] # No dark frames par['calibrations']['pinholeframe']['exprng'] = [999999, None ] # No pinhole frames par['calibrations']['pixelflatframe']['exprng'] = [0, None] par['calibrations']['traceframe']['exprng'] = [0, None] par['calibrations']['arcframe']['exprng'] = [None, 61] par['calibrations']['standardframe']['exprng'] = [1, 61] par['scienceframe']['exprng'] = [61, None] return par
def test_instantiate(fitstbl): par = pypeitpar.PypeItPar() spectrograph = load_spectrograph('shane_kast_blue') caliBrate = calibrations.MultiSlitCalibrations(fitstbl, par['calibrations'], spectrograph, data_path('Masters'))
def default_pypeit_par(): """ Set default parameters for LBT/LUCI reductions. OLD CODE from LBT MODS """ par = pypeitpar.PypeItPar() # Scienceimage default parameters par['reduce'] = pypeitpar.ReducePar() # Always flux calibrate, starting with default parameters par['fluxcalib'] = pypeitpar.FluxCalibratePar() # Always correct for flexure, starting with default parameters par['flexure'] = pypeitpar.FlexurePar() # Set the default exposure time ranges for the frame typing par['calibrations']['biasframe']['exprng'] = [None, 1] par['calibrations']['darkframe']['exprng'] = [999999, None] # No dark frames par['calibrations']['pinholeframe']['exprng'] = [999999, None ] # No pinhole frames par['calibrations']['pixelflatframe']['exprng'] = [0, None] par['calibrations']['traceframe']['exprng'] = [0, None] par['calibrations']['arcframe']['exprng'] = [None, 60] par['calibrations']['standardframe']['exprng'] = [1, 200] par['scienceframe']['exprng'] = [200, None] return par
def default_pypeit_par(self): """ Set default parameters for the reductions. """ par = pypeitpar.PypeItPar() par['rdx']['spectrograph'] = 'gemini_flamingos2' # No overscan for key in par['calibrations'].keys(): if 'frame' in key: par['calibrations'][key]['process']['overscan'] = 'none' # Wavelengths # 1D wavelength solution with arc lines par['calibrations']['wavelengths']['rms_threshold'] = 0.5 par['calibrations']['wavelengths']['sigdetect']=5 par['calibrations']['wavelengths']['fwhm'] = 5 par['calibrations']['wavelengths']['n_first']=2 par['calibrations']['wavelengths']['n_final']=4 par['calibrations']['wavelengths']['lamps'] = ['OH_NIRES'] par['calibrations']['wavelengths']['nonlinear_counts'] = self.detector[0]['nonlinear'] * self.detector[0]['saturation'] #par['calibrations']['wavelengths']['method'] = 'reidentify' #par['calibrations']['wavelengths']['method'] = 'full_template' #par['calibrations']['wavelengths']['reid_arxiv'] = 'magellan_fire_long.fits' par['calibrations']['wavelengths']['match_toler']=5.0 # Set slits and tilts parameters par['calibrations']['tilts']['tracethresh'] = 5 par['calibrations']['tilts']['spat_order'] = 4 par['calibrations']['slitedges']['trace_thresh'] = 10. par['calibrations']['slitedges']['edge_thresh'] = 200. #par['calibrations']['slitedges']['det_min_spec_length'] = 0.3 par['calibrations']['slitedges']['fit_min_spec_length'] = 0.4 par['calibrations']['slitedges']['sync_predict'] = 'nearest' # Overscan but not bias # This seems like a kludge of sorts par['calibrations']['biasframe']['useframe'] = 'none' # No overscan par['scienceframe']['process']['overscan'] ='none' for key in par['calibrations'].keys(): if 'frame' in key: par['calibrations'][key]['process']['overscan'] = 'none' # Set the default exposure time ranges for the frame typing par['calibrations']['standardframe']['exprng'] = [None, 30] par['calibrations']['tiltframe']['exprng'] = [50, None] par['calibrations']['arcframe']['exprng'] = [50, None] par['calibrations']['darkframe']['exprng'] = [20, None] par['scienceframe']['exprng'] = [20, None] # Scienceimage parameters #par['reduce']['sig_thresh'] = 5 #par['reduce']['maxnumber'] = 2 par['reduce']['skysub']['sky_sigrej'] = 5.0 par['reduce']['findobj']['find_trim_edge'] = [10,10] # Always flux calibrate, starting with default parameters par['fluxcalib'] = pypeitpar.FluxCalibratePar() # Do not correct for flexure par['flexure'] = None return par
def default_pypeit_par(self): """ Set default parameters for Keck/MOSFIRE """ par = pypeitpar.PypeItPar() par['rdx']['spectrograph'] = 'keck_mosfire' # Wavelengths # 1D wavelength solution par['calibrations']['wavelengths'][ 'rms_threshold'] = 0.20 #0.20 # Might be grating dependent.. par['calibrations']['wavelengths']['sigdetect'] = 5.0 par['calibrations']['wavelengths']['fwhm'] = 5.0 par['calibrations']['wavelengths']['n_final'] = 4 par['calibrations']['wavelengths']['lamps'] = ['OH_NIRES'] par['calibrations']['wavelengths']['nonlinear_counts'] = self.detector[ 0]['nonlinear'] * self.detector[0]['saturation'] par['calibrations']['wavelengths']['method'] = 'holy-grail' # Reidentification parameters #par['calibrations']['wavelengths']['reid_arxiv'] = 'keck_nires.fits' par['calibrations']['slitedges']['edge_thresh'] = 50. par['calibrations']['slitedges']['sync_predict'] = 'nearest' # Flats # Do not illumination correct. We should also not be flat fielding given the bars. # TODO Implement imaging flats for MOSFIRE. Do test with/without illumination flats. par['calibrations']['flatfield']['illumflatten'] = False # Extraction par['reduce']['skysub']['bspline_spacing'] = 0.8 par['reduce']['extraction']['sn_gauss'] = 4.0 # Flexure par['flexure']['method'] = 'skip' par['scienceframe']['process']['sigclip'] = 20.0 par['scienceframe']['process']['satpix'] = 'nothing' # Overscan but not bias # This seems like a kludge of sorts par['calibrations']['biasframe']['useframe'] = 'none' # No overscan par['scienceframe']['process']['overscan'] = 'none' for key in par['calibrations'].keys(): if 'frame' in key: par['calibrations'][key]['process']['overscan'] = 'none' # Set the default exposure time ranges for the frame typing par['calibrations']['standardframe']['exprng'] = [None, 20] par['calibrations']['arcframe']['exprng'] = [20, None] par['calibrations']['darkframe']['exprng'] = [20, None] par['scienceframe']['exprng'] = [20, None] # Sensitivity function parameters par['sensfunc']['algorithm'] = 'IR' par['sensfunc']['polyorder'] = 8 par['sensfunc']['IR']['telgridfile'] = resource_filename( 'pypeit', '/data/telluric/TelFit_MaunaKea_3100_26100_R20000.fits') return par
def default_pypeit_par(self): """ Set default parameters for magellan MagE reduction. """ par = pypeitpar.PypeItPar() par['rdx']['spectrograph'] = 'magellan_mage' # Bias #par['calibrations']['biasframe']['useframe'] = 'overscan' # Wavelengths # 1D wavelength solution par['calibrations']['wavelengths'][ 'rms_threshold'] = 0.20 # Might be grating dependent.. par['calibrations']['wavelengths']['sigdetect'] = 5.0 par['calibrations']['wavelengths']['lamps'] = ['ThAr_MagE'] par['calibrations']['wavelengths']['nonlinear_counts'] = self.detector[ 0]['nonlinear'] * self.detector[0]['saturation'] par['calibrations']['wavelengths']['method'] = 'reidentify' par['calibrations']['wavelengths']['cc_thresh'] = 0.50 par['calibrations']['wavelengths']['cc_local_thresh'] = 0.50 # Reidentification parameters par['calibrations']['wavelengths']['reid_arxiv'] = 'magellan_mage.fits' par['calibrations']['wavelengths']['ech_fix_format'] = True # Echelle parameters par['calibrations']['wavelengths']['echelle'] = True par['calibrations']['wavelengths']['ech_nspec_coeff'] = 4 par['calibrations']['wavelengths']['ech_norder_coeff'] = 4 par['calibrations']['wavelengths']['ech_sigrej'] = 3.0 # Always correct for flexure, starting with default parameters par['flexure'] = pypeitpar.FlexurePar() par['scienceframe']['process']['sigclip'] = 20.0 par['scienceframe']['process']['satpix'] = 'nothing' # Set slits and tilts parameters par['calibrations']['tilts']['tracethresh'] = [10] * self.norders par['calibrations']['slitedges']['fit_order'] = 5 par['calibrations']['slitedges']['max_shift_adj'] = 3. par['calibrations']['slitedges'][ 'edge_thresh'] = 10. # Tough to get the bluest orders par['calibrations']['slitedges']['left_right_pca'] = True par['calibrations']['slitedges'][ 'fit_min_spec_length'] = 0.3 # Allow for a short detected blue order # Find object parameters par['scienceimage']['findobj']['find_trim_edge'] = [ 4, 4 ] # Slit is too short to trim 5,5 especially with 2x binning # Always flux calibrate, starting with default parameters par['fluxcalib'] = pypeitpar.FluxCalibrationPar() # Do not correct for flexure par['flexure'] = pypeitpar.FlexurePar() par['flexure']['method'] = 'skip' # Set the default exposure time ranges for the frame typing par['calibrations']['standardframe']['exprng'] = [None, 20] par['calibrations']['arcframe']['exprng'] = [20, None] par['calibrations']['darkframe']['exprng'] = [20, None] par['scienceframe']['exprng'] = [20, None] return par
def default_pypeit_par(): """ Set default parameters for KECK HIRES reductions. """ par = pypeitpar.PypeItPar() # Correct for flexure using the default approach par['flexure'] = pypeitpar.FlexurePar() return par
def test_sync(): p = pypeitpar.PypeItPar() proc = pypeitpar.ProcessImagesPar() proc['combine'] = 'median' # proc['cr_sigrej'] = 20.5 p.sync_processing(proc) assert p['scienceframe']['process']['combine'] == 'median' assert p['calibrations']['biasframe']['process']['combine'] == 'median'
def default_pypeit_par(): """ Set default parameters for VLT XSHOOTER reductions. """ par = pypeitpar.PypeItPar() # Correct for flexure using the default approach # par['flexure'] = pypeitpar.FlexurePar() # Right now turn off flexure compensation return par
def default_pypeit_par(cls): """ Return the default parameters to use for this instrument. Returns: :class:`~pypeit.par.pypeitpar.PypeItPar`: Parameters required by all of ``PypeIt`` methods. """ par = pypeitpar.PypeItPar() par['rdx']['spectrograph'] = cls.name return par
def default_pypeit_par(): """ Set default parameters for TNG Dolores reductions. """ par = pypeitpar.PypeItPar() # Set the default exposure time ranges for the frame typing par['calibrations']['biasframe']['exprng'] = [None, 0.1] par['calibrations']['darkframe']['exprng'] = [999999, None] # No dark frames par['calibrations']['pinholeframe']['exprng'] = [999999, None] # No pinhole frames par['scienceframe']['exprng'] = [1, None] return par
def test_sync(): p = pypeitpar.PypeItPar() proc = pypeitpar.ProcessImagesPar() proc['combine'] = 'mean' proc['sigrej'] = 20.5 p.sync_processing(proc) assert p['scienceframe']['process']['combine'] == 'mean' assert p['calibrations']['biasframe']['process']['combine'] == 'mean' # Sigma rejection of cosmic rays for arc frames is already turned # off by default assert p['calibrations']['arcframe']['process']['sigrej'] < 0 assert p['calibrations']['traceframe']['process']['sigrej'] == 20.5
def default_pypeit_par(self): """ Set default parameters for Keck LRISb reductions. """ par = pypeitpar.PypeItPar() par['rdx']['spectrograph'] = 'wht_isis_blue' # Ignore PCA par['calibrations']['slitedges']['sync_predict'] = 'nearest' # JFH Is this correct? # Processing steps turn_off = dict(use_overscan=False) par.reset_all_processimages_par(**turn_off) # Turn off the overscan #for ftype in par['calibrations'].keys(): # try: # par['calibrations'][ftype]['process']['overscan'] = 'none' # except (TypeError, KeyError): # pass par['scienceframe']['process']['use_overscan'] = False # Make a bad pixel mask par['calibrations']['bpm_usebias'] = True # Set pixel flat combination method par['calibrations']['pixelflatframe']['process']['combine'] = 'median' par['calibrations']['pixelflatframe']['process']['sig_lohi'] = [ 10., 10. ] # Change the wavelength calibration method par['calibrations']['wavelengths']['method'] = 'full_template' par['calibrations']['wavelengths']['lamps'] = [ 'NeI', 'ArI', 'ArII', 'CuI' ] #par['calibrations']['wavelengths']['nonlinear_counts'] = self.detector[0]['nonlinear'] * self.detector[0]['saturation'] par['calibrations']['wavelengths']['n_first'] = 3 par['calibrations']['wavelengths']['n_final'] = 5 par['calibrations']['wavelengths']['sigdetect'] = 10.0 par['calibrations']['wavelengths']['wv_cen'] = 4859.0 par['calibrations']['wavelengths']['disp'] = 0.2 # Do not flux calibrate par['fluxcalib'] = None # Set the default exposure time ranges for the frame typing par['calibrations']['biasframe']['exprng'] = [None, 1] par['calibrations']['darkframe']['exprng'] = [999999, None] # No dark frames par['calibrations']['pinholeframe']['exprng'] = [999999, None ] # No pinhole frames par['calibrations']['arcframe']['exprng'] = [None, 120] par['calibrations']['standardframe']['exprng'] = [None, 120] par['scienceframe']['exprng'] = [90, None] return par
def default_pypeit_par(self): """ Set default parameters for MMT/BINOSPEC reductions. """ par = pypeitpar.PypeItPar() par['rdx']['spectrograph'] = 'mmt_binospec' # Frame numbers par['calibrations']['standardframe']['number'] = 0 par['calibrations']['biasframe']['number'] = 0 par['calibrations']['pixelflatframe']['number'] = 5 par['calibrations']['traceframe']['number'] = 5 par['calibrations']['arcframe']['number'] = 5 par['calibrations']['arcframe']['process']['overscan'] = 'median' # Wavelengths # 1D wavelength solution par['calibrations']['wavelengths']['rms_threshold'] = 0.5 par['calibrations']['wavelengths']['sigdetect'] = 20. par['calibrations']['wavelengths']['fwhm'] = 5.0 par['calibrations']['wavelengths']['lamps'] = ['ArI', 'ArII'] par['calibrations']['wavelengths']['nonlinear_counts'] = self.detector[ 0]['nonlinear'] * self.detector[0]['saturation'] par['calibrations']['wavelengths']['method'] = 'holy-grail' # Tilt and slit parameters par['calibrations']['tilts']['tracethresh'] = 10.0 par['calibrations']['tilts']['spat_order'] = 6 par['calibrations']['tilts']['spec_order'] = 6 par['calibrations']['slitedges']['sync_predict'] = 'nearest' # Flats par['calibrations']['flatfield']['illumflatten'] = True # Extraction par['reduce']['skysub']['bspline_spacing'] = 0.8 par['reduce']['extraction']['sn_gauss'] = 4.0 ## Do not perform global sky subtraction for standard stars ## FW: The slit is too wide and the target usually close to the center where is the boundary ## two detectors. global_sky will cause some problem sometime. par['reduce']['skysub']['global_sky_std'] = False # Flexure par['flexure']['method'] = 'skip' par['scienceframe']['process']['sigclip'] = 20.0 par['scienceframe']['process']['satpix'] = 'nothing' #par['scienceframe']['process']['overscan'] ='median' # Set the default exposure time ranges for the frame typing par['calibrations']['standardframe']['exprng'] = [None, 100] par['calibrations']['arcframe']['exprng'] = [20, None] par['calibrations']['darkframe']['exprng'] = [20, None] par['scienceframe']['exprng'] = [20, None] return par
def default_pypeit_par(self): """ Set default parameters for Keck/MOSFIRE """ par = pypeitpar.PypeItPar() par['rdx']['spectrograph'] = 'lbt_luci2' # for key in par['calibrations'].keys(): # print(key) # par['calibrations'][key]['process']['overscan'] = 'none' # Wavelengths # 1D wavelength solution par['calibrations']['wavelengths'][ 'rms_threshold'] = 0.20 # 0.20 # Might be grating dependent.. par['calibrations']['wavelengths']['sigdetect'] = 5.0 par['calibrations']['wavelengths']['fwhm'] = 5.0 par['calibrations']['wavelengths']['n_final'] = 4 par['calibrations']['wavelengths']['lamps'] = ['OH_NIRES'] par['calibrations']['wavelengths']['nonlinear_counts'] = \ self.detector[0]['nonlinear'] * self.detector[0]['saturation'] par['calibrations']['wavelengths']['method'] = 'holy-grail' par['calibrations']['slitedges']['edge_thresh'] = 300 par['calibrations']['slitedges']['sync_predict'] = 'nearest' par['calibrations']['slitedges']['fit_order'] = 8 # Flats par['calibrations']['flatfield']['illumflatten'] = True # par['calibration']['flatfield']['tweak_slits'] = False # Extraction # Model full slit currently turned on par['reduce']['extraction']['model_full_slit'] = True # Tailored profile nsigma parameter for the standard par['reduce']['extraction']['std_prof_nsigma'] = 100. # Do not perform global sky subtraction for standard stars par['reduce']['skysub']['global_sky_std'] = False par['reduce']['skysub']['bspline_spacing'] = 0.8 par['reduce']['extraction']['sn_gauss'] = 4.0 # Flexure par['flexure']['method'] = 'skip' par['scienceframe']['process']['sigclip'] = 20.0 par['scienceframe']['process']['satpix'] = 'nothing' # par['scienceframe']['process']['satpix'] = 'reject' par['scienceframe']['process']['overscan'] = 'none' # par['standardframe']['process']['overscan'] = 'none' return par
def default_pypeit_par(self): """ Set default parameters for Gemini GNIRS reductions. """ par = pypeitpar.PypeItPar() par['rdx']['spectrograph'] = 'gemini_gnirs' # Image processing steps turn_off = dict(use_illumflat=False, use_biasimage=False, use_overscan=False, use_darkimage=False) par.reset_all_processimages_par(**turn_off) # Flats par['calibrations']['flatfield']['tweak_slits_thresh'] = 0.90 par['calibrations']['flatfield']['tweak_slits_maxfrac'] = 0.10 # Reduce parameters par['reduce']['findobj'][ 'sig_thresh'] = 5.0 # Object finding threshold par['reduce']['findobj']['find_trim_edge'] = [ 2, 2 ] # Slit is too short to trim 5,5 especially par['reduce']['findobj'][ 'find_cont_fit'] = False # Don't continuum fit objfind for narrow slits par['reduce']['findobj'][ 'find_npoly_cont'] = 0 # Continnum order for determining thresholds par['reduce']['skysub']['bspline_spacing'] = 0.8 par['reduce']['skysub'][ 'global_sky_std'] = False # Do not perform global sky subtraction for standard stars par['reduce']['skysub'][ 'no_poly'] = True # Do not use polynomial degree of freedom for global skysub par['reduce']['extraction'][ 'model_full_slit'] = True # local sky subtraction operates on entire slit # Do not correct for flexure par['flexure']['spec_method'] = 'skip' # Set the default exposure time ranges for the frame typing par['calibrations']['pixelflatframe']['exprng'] = [None, 30] par['calibrations']['traceframe']['exprng'] = [None, 30] par['calibrations']['standardframe']['exprng'] = [None, 30] par['scienceframe']['exprng'] = [30, None] # Sensitivity function parameters par['sensfunc']['algorithm'] = 'IR' par['sensfunc']['polyorder'] = 8 par['sensfunc']['IR']['telgridfile'] = resource_filename( 'pypeit', '/data/telluric/TelFit_MaunaKea_3100_26100_R20000.fits') return par
def default_pypeit_par(self): """ Set default parameters. """ par = pypeitpar.PypeItPar() par['rdx']['spectrograph'] = 'magellan_fire_long' # Wavelengths # 1D wavelength solution with arc lines par['calibrations']['wavelengths']['rms_threshold'] = 1.0 par['calibrations']['wavelengths']['sigdetect'] = 3 par['calibrations']['wavelengths']['fwhm'] = 20 par['calibrations']['wavelengths']['n_first'] = 2 par['calibrations']['wavelengths']['n_final'] = 4 par['calibrations']['wavelengths']['lamps'] = [ 'ArI', 'ArII', 'ThAr', 'NeI' ] #par['calibrations']['wavelengths']['nonlinear_counts'] = self.detector[0]['nonlinear'] * self.detector[0]['saturation'] par['calibrations']['wavelengths']['method'] = 'full_template' par['calibrations']['wavelengths'][ 'reid_arxiv'] = 'magellan_fire_long.fits' par['calibrations']['wavelengths']['match_toler'] = 5.0 # Set slits and tilts parameters par['calibrations']['tilts']['tracethresh'] = 5 par['calibrations']['slitedges']['trace_thresh'] = 10. par['calibrations']['slitedges']['sync_predict'] = 'nearest' # Processing steps turn_off = dict(use_illumflat=False, use_biasimage=False, use_overscan=False, use_darkimage=False) par.reset_all_processimages_par(**turn_off) # Scienceimage parameters par['reduce']['findobj']['sig_thresh'] = 5 #par['reduce']['maxnumber'] = 2 par['reduce']['findobj']['find_trim_edge'] = [50, 50] par['flexure']['spec_method'] = 'skip' par['sensfunc']['IR']['telgridfile'] = resource_filename( 'pypeit', '/data/telluric/TelFit_LasCampanas_3100_26100_R20000.fits') # Set the default exposure time ranges for the frame typing par['calibrations']['standardframe']['exprng'] = [None, 60] par['calibrations']['arcframe']['exprng'] = [1, 50] par['calibrations']['darkframe']['exprng'] = [20, None] par['scienceframe']['exprng'] = [20, None] return par