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 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(): """ 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 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 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(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(self): """ Set default parameters for Keck LRISb reductions. """ par = pypeitpar.PypeItPar() par['rdx']['spectrograph'] = 'keck_deimos' # Set wave tilts order par['calibrations']['slits']['sigdetect'] = 50. par['calibrations']['slits']['trace_npoly'] = 3 par['calibrations']['slits']['fracignore'] = 0.02 par['calibrations']['slits']['pcapar'] = [3, 2, 1, 0] # Overscan subtract the images par['calibrations']['biasframe']['useframe'] = 'overscan' # 1D wavelength solution par['calibrations']['wavelengths']['lamps'] = [ 'ArI', 'NeI', 'KrI', 'XeI' ] par['calibrations']['wavelengths']['nonlinear_counts'] = self.detector[ 0]['nonlinear'] * self.detector[0]['saturation'] # 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['calibrations']['biasframe']['exprng'] = [None, 2] par['calibrations']['darkframe']['exprng'] = [999999, None] # No dark frames par['calibrations']['pinholeframe']['exprng'] = [999999, None ] # No pinhole frames par['calibrations']['pixelflatframe']['exprng'] = [None, 30] par['calibrations']['traceframe']['exprng'] = [None, 30] par['scienceframe']['exprng'] = [30, None] # LACosmics parameters par['scienceframe']['process']['sigclip'] = 4.0 par['scienceframe']['process']['objlim'] = 1.5 return par
def default_pypeit_par(): """ Set default parameters for TNG Dolores reductions. """ par = pypeitpar.PypeItPar() #par['calibrations']['tilts']['params'] = [1,1,1] # 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, 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 default_pypeit_par(): """ Set default parameters for Keck LRISb reductions. """ par = pypeitpar.PypeItPar() par['calibrations']['slitedges']['edge_thresh'] = 20. par['calibrations']['slitedges']['fit_order'] = 3 # 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'] par['calibrations']['wavelengths']['method'] = 'full_template' par['calibrations']['wavelengths'][ 'nsnippet'] = 1 # 3 detectors splitting is already a lot par['calibrations']['tilts'][ 'tracethresh'] = 10. # Deals with faint CuAr lines # IF YOU CHANGE THIS, YOU WILL NEED TO DEAL WITH THE OVERSCAN GOING ALONG ROWS #for key in par['calibrations'].keys(): # if 'frame' in key: # par['calibrations'][key]['process']['overscan'] = 'median' # 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. ] # Always flux calibrate, starting with default parameters par['fluxcalib'] = pypeitpar.FluxCalibrationPar() # Always correct for flexure, starting with default parameters par['flexure'] = pypeitpar.FlexurePar() # Always correct for flexure, starting with default parameters par['flexure']['method'] = 'boxcar' # Set the default exposure time ranges for the frame typing #par['scienceframe']['exprng'] = [30, None] return par
# Read the baseline file that is not changed and must be edited by # the person building the documentation as necessary. pypeit_root = os.path.dirname(resource_filename('pypeit', '')) input_base = os.path.join(pypeit_root, 'doc', 'scripts', 'base_par_rst.txt') with open(input_base, 'r') as f: lines = [ l.replace('\n','') for l in f.readlines() ] lines += [''] # Start to append the automatically generated documentation lines += ['Current PypeItPar Parameter Hierarchy'] lines += ['++++++++++++++++++++++++++++++++++++'] lines += [''] p = pypeitpar.PypeItPar(flexure=pypeitpar.FlexurePar(), fluxcalib=pypeitpar.FluxCalibrationPar()) lines += par_hierarchy(p) lines += [''] lines += ['----'] lines += [''] lines += p.to_rst_table() lines += [''] lines += ['Instrument-Specific Default Configuration'] lines += ['+++++++++++++++++++++++++++++++++++++++++'] lines += [''] lines += textwrap.wrap('The following provides the changes to the global default parameters ' 'provided above for each instrument. That is, if one were to include '
def test_fluxcalibration(): pypeitpar.FluxCalibrationPar()