class determineWavelengthSolutionConfig(config.Config): suffix = config.Field("Filename suffix", str, "_wavelengthSolutionDetermined", optional=True) order = config.RangeField("Order of fitting polynomial", int, 2, min=1) center = config.RangeField("Central row/column to extract", int, None, min=1, optional=True) nsum = config.RangeField("Number of lines to sum", int, 10, min=1) min_snr = config.RangeField("Minimum SNR for peak detection", float, 10., min=1.) min_sep = config.RangeField("Minimum feature separation (pixels)", float, 2., min=1.) weighting = config.ChoiceField("Weighting of identified peaks", str, allowed={ "none": "no weighting", "natural": "natural weighting", "relative": "relative to local peaks" }, default="natural") fwidth = config.RangeField("Feature width in pixels", float, None, min=2., optional=True) min_lines = config.Field("Minimum number of lines to fit each segment", (str, int), '15,20', check=min_lines_check) central_wavelength = config.RangeField("Estimated central wavelength (nm)", float, None, min=300., max=25000., optional=True) dispersion = config.Field("Estimated dispersion (nm/pixel)", float, None, optional=True) linelist = config.Field("Filename of arc line list", str, None, optional=True) alternative_centers = config.Field("Try alternative wavelength centers?", bool, False) debug = config.Field("Make diagnostic plots?", bool, False)
class calculateSensitivityConfig(config.core_1Dfitting_config): suffix = config.Field("Filename suffix", str, "_sensitivityCalculated", optional=True) filename = config.Field("Name of spectrophotometric data file", str, None, optional=True) bandpass = config.RangeField("Bandpass width (nm) if not supplied", float, 5., min=0.1, max=10.) debug_airmass0 = config.Field("Calculate sensitivity curve at zero airmass?", bool, False) regions = config.Field("Sample regions", str, None, optional=True, check=validate_regions_float) debug_plot = config.Field("Plot sensitivity curve?", bool, False) interactive_spline = config.Field("Interactive spline selection?", bool, False) niter = config.RangeField("Maximum number of clipping iterations to perform of spline fit", int, 3, min=1) grow = config.RangeField("Radius to reject pixels adjacent to masked pixels of spline fit", int, 0, min=0) interactive = config.Field("Display interactive fitter?", bool, False) def setDefaults(self): del self.grow
class adjustSlitOffsetToReferenceConfig(config.Config): suffix = config.Field("Filename suffix", str, "_slitOffsetCorrected", optional=True) tolerance = config.RangeField( "Maximum distance from the header offset, " "for the correlation method (arcsec)", float, 1, min=0., optional=True) method = config.ChoiceField("Alignment method", str, allowed={ "offsets": "Use telescope offsets", "correlation": "Correlate the slit profile" }, default="correlation")
class normalizeFlatConfig(config.Config): suffix = config.Field("Filename suffix", str, "_normalized", optional=True) center = config.RangeField("Central row/column to extract", int, None, min=1, optional=True) nsum = config.RangeField("Number of lines to sum", int, 10, min=1) spectral_order = config.RangeField("Fitting order in spectral direction", int, 20, min=1) hsigma = config.RangeField("High rejection threshold (sigma)", float, 3., min=0) lsigma = config.RangeField("Low rejection threshold (sigma)", float, 3., min=0) grow = config.RangeField("Growth radius for bad pixels", int, 0, min=0)
class getCalibrationConfig(config.Config): caltype = config.ChoiceField( "Type of calibration required", str, allowed={"processed_arc": "processed ARC", "processed_bias": "procsessed BIAS", "processed_dark": "processed DARK", "processed_flat": "processed FLAT", "processed_fringe": "processed fringe", "processed_standard": "processed standard", "processed_slitillum": "processed slitillum", }, optional=False ) refresh = config.Field( "Refresh existing calibration associations?", bool, True) howmany = config.RangeField( "Maximum number of calibrations to return", int, None, min=1, optional=True)
class findSourceAperturesConfig(config.Config): suffix = config.Field("Filename suffix", str, "_aperturesFound", optional=True) max_apertures = config.RangeField("Maximum number of sources to find", int, None, min=1, optional=True) threshold = config.RangeField( "Threshold relative to peak for automatic width determination", float, 0.01, min=0, max=1) min_sky_region = config.RangeField( "Minimum number of contiguous pixels between sky lines", int, 20, min=1)
class subtractOverscanConfig(config.Config): suffix = config.Field("Filename suffix", str, "_overscanSubtracted", optional=True) niterate = config.RangeField("Maximum number of iterations", int, 2, min=1) high_reject = config.RangeField("High rejection limit (standard deviations)", float, 3., min=0., optional=True) low_reject = config.RangeField("Low rejection limit (standard deviations)", float, 3., min=0., optional=True) function = config.ChoiceField("Type of function", str, allowed = {"spline": "Cublic spline", "poly": "Polynomial", "none": "Row-by-row"}, default="spline", optional=True) nbiascontam = config.RangeField("Number of columns to exclude from averaging", int, None, min=0, optional=True) order = config.RangeField("Order of fitting function", int, None, min=0, optional=True) def validate(self): config.Config.validate(self) if self.function == "poly" and self.order is None: raise ValueError("Polynomial order must be specified")
class write1DSpectraConfig(config.Config): #format = config.Field("Format for writing", str, "ascii") format = config.ChoiceField("Format for writing", str, allowed=table_writing_formats(), default="ascii", optional=False) header = config.Field("Write full FITS header?", bool, False) extension = config.Field("Filename extension", str, "dat") apertures = config.Field("Apertures to write", (str, int), None, optional=True, check=list_of_ints_check) dq = config.Field("Write Data Quality values?", bool, False) var = config.Field("Write Variance values?", bool, False) overwrite = config.Field("Overwrite existing files?", bool, False) def validate(self): config.Config.validate(self) if self.header and not self.format.startswith("ascii"): raise ValueError("FITS header can only be written with ASCII formats")
class resampleToCommonFrameConfig(config.Config): suffix = config.Field("Filename suffix", str, "_align", optional=True) order = config.RangeField("Order of interpolation", int, 1, min=0, max=5, inclusiveMax=True) trim_data = config.Field("Trim to field of view of reference image?", bool, False) clean_data = config.Field("Clean bad pixels before interpolation?", bool, False) conserve = config.Field("Conserve image flux?", bool, True) force_affine = config.Field("Force affine transformation for speed?", bool, True) reference = config.Field("Name of reference image (optional)", (str, AstroData), None, optional=True)
class fixPixelsConfig(config.Config): suffix = config.Field("Filename suffix", dtype=str, default="_pixelsFixed", optional=True) regions = config.Field('Regions to fix, e.g. "450,521; 430:437,513:533"', dtype=str, optional=True) regions_file = config.Field("Path to a file containing the regions to fix", dtype=str, optional=True) axis = config.Field( "Axis over which the interpolation is done (Fortran order)", dtype=int, optional=True) use_local_median = config.Field( "Use a local median filter for single pixels?", dtype=bool, default=False, optional=True) debug = config.Field("Display regions?", dtype=bool, default=False)
class fixPixelsConfig(config.Config): suffix = config.Field("Filename suffix", dtype=str, default="_pixelsFixed", optional=True) regions = config.Field('Regions to fix, e.g. "450,521; 430:437,513:533"', dtype=str, optional=True) regions_file = config.Field("Path to a file containing the regions to fix", dtype=str, optional=True) axis = config.Field( "Interpolation axis. 1 is x-axis, 2 is y-axis, 3 is z-axis. If left undefined, use the narrowest region dimension.", dtype=int, optional=True) use_local_median = config.Field( "Use a local median filter for single pixels?", dtype=bool, default=False, optional=True) debug = config.Field("Display regions?", dtype=bool, default=False)
class ADUToElectronsConfig(config.Config): suffix = config.Field("Filename suffix", str, "_ADUToElectrons", optional=True)
class correctBackgroundToReferenceConfig(config.Config): suffix = config.Field("Filename suffix", str, "_backgroundCorrected", optional=True) separate_ext = config.Field("Treat each extension separately?", bool, True) remove_background = config.Field("Remove background level?", bool, False)
class myNewPrimitive(config.Config): suffix = config.Field("Filename suffix", str, "_suffix") param1 = config.Field("Param1", str, "default") param2 = config.Field("do param2?", bool, False)
class addObjectMaskToDQConfig(config.Config): suffix = config.Field("Filename suffix", str, "_objectMaskAdded", optional=True)
class darkCorrectConfig(config.Config): suffix = config.Field("Filename suffix", str, "_darkCorrected", optional=True) dark = config.ListField("Dark frame", (str, AstroData), None, optional=True, single=True) do_dark = config.Field("Perform dark subtraction?", bool, True)
class findAcquisitionSlitsConfig(config.Config): suffix = config.Field("Filename suffix", str, "_acqSlitsAdded", optional=True)
class subtractSkyBackgroundConfig(config.Config): suffix = config.Field("Filename suffix", str, "_skyBackgroundSubtracted", optional=True)
class separateSkyConfig(config.Config): suffix = config.Field("Filename suffix", str, "_skySeparated", optional=True) ref_obj = config.Field("Manually-assigned object files", str, None, optional=True) ref_sky = config.Field("Manually-assigned sky files", str, None, optional=True) frac_FOV = config.RangeField("Field of view scaling for coaddition", float, 0.9, min=0.5, max=1)
class flatCorrectConfig(config.Config): suffix = config.Field("Filename suffix", str, "_flatCorrected", optional=True) flat = config.ListField("Flatfield frame", (str, AstroData), None, optional=True, single=True) do_flat = config.Field("Perform flatfield correction?", bool, True)
class dilateObjectMaskConfig(config.Config): suffix = config.Field("Filename suffix", str, "_objmaskDilated", optional=True) dilation = config.RangeField("Dilation radius (pixels)", float, 1., min=0) repeat = config.Field("Allow dilation of already-dilated image?", bool, False)
class addVARConfig(config.Config): suffix = config.Field("Filename suffix", str, "_varAdded", optional=True) read_noise = config.Field("Add read noise?", bool, False) poisson_noise = config.Field("Add Poisson noise?", bool, False)
class nonlinearityCorrectConfig(config.Config): suffix = config.Field("Filename suffix", str, "_nonlinearityCorrected", optional=True)
class standardizeInstrumentHeadersConfig(config.Config): suffix = config.Field("Filename suffix", str, "_instrumentHeadersStandardized", optional=True)
class scaleByExposureTimeConfig(config.Config): suffix = config.Field("Filename suffix", str, "_exposureTimeScaled", optional=True) time = config.RangeField("Output exposure time", float, None, min=0.1, optional=True)
class standardizeObservatoryHeadersConfig(config.Config): suffix = config.Field("Filename suffix", str, "_observatoryHeadersStandardized", optional=True)
class thresholdFlatfieldConfig(config.Config): suffix = config.Field("Filename suffix", str, "_thresholdFlatfielded", optional=True) upper = config.RangeField("Upper limit of valid pixels", float, 10., min=1) lower = config.RangeField("Lower limit of valid pixels", float, 0.01, max=1)
class standardizeStructureConfig(config.Config): suffix = config.Field("Filename suffix", str, "_structureStandardized", optional=True)
class QECorrectConfig(config.Config): suffix = config.Field("Filename suffix", str, "_QECorrected", optional=True) arc = config.ListField("Arc(s) with distortion map", (AstroData, str), None, optional=True, single=True) use_iraf = config.Field("Use IRAF polynomial fits for Hamamatsu CCDs?", bool, False)
class validateDataConfig(config.Config): suffix = config.Field("Filename suffix", str, "_dataValidated", optional=True)