tweakreg_step

The tweakreg_step function (class name TweakRegStep) is the top-level function used to call the “tweakreg” operation from the Roman Calibration pipeline.

Roman pipeline step for image alignment.

class romancal.tweakreg.tweakreg_step.TweakRegStep(name=None, parent=None, config_file=None, _validate_kwds=True, **kws)[source]

TweakRegStep: Image alignment based on catalogs of sources detected in input images.

Create a Step instance.

Parameters:
  • name (str, optional) – The name of the Step instance. Used in logging messages and in cache filenames. If not provided, one will be generated based on the class name.

  • parent (Step instance, optional) – The parent step of this step. Used to determine a fully-qualified name for this step, and to determine the mode in which to run this step.

  • config_file (str or pathlib.Path, optional) – The path to the config file that this step was initialized with. Use to determine relative path names of other config files.

  • **kws (dict) – Additional parameters to set. These will be set as member variables on the new Step instance.

class_alias = 'tweakreg'
process(input)[source]

This is where real work happens. Every Step subclass has to override this method. The default behaviour is to raise a NotImplementedError exception.

refcat = None
reference_file_types: ClassVar = []
spec = '\n        use_custom_catalogs = boolean(default=False) # Use custom user-provided catalogs?\n        catalog_format = string(default=\'ascii.ecsv\') # Catalog output file format\n        catfile = string(default=\'\') # Name of the file with a list of custom user-provided catalogs\n        catalog_path = string(default=\'\') # Catalog output file path\n        enforce_user_order = boolean(default=False) # Align images in user specified order?\n        expand_refcat = boolean(default=False) # Expand reference catalog with new sources?\n        minobj = integer(default=15) # Minimum number of objects acceptable for matching\n        searchrad = float(default=2.0) # The search radius in arcsec for a match\n        use2dhist = boolean(default=True) # Use 2d histogram to find initial offset?\n        separation = float(default=1.0) # Minimum object separation in arcsec\n        tolerance = float(default=0.7) # Matching tolerance for xyxymatch in arcsec\n        fitgeometry = option(\'shift\', \'rshift\', \'rscale\', \'general\', default=\'rshift\') # Fitting geometry\n        nclip = integer(min=0, default=3) # Number of clipping iterations in fit\n        sigma = float(min=0.0, default=3.0) # Clipping limit in sigma units\n        abs_refcat = string(default=\'GAIADR3\')  # Absolute reference\n        # catalog. Options: "\'GAIADR3\'", "\'GAIADR2\'", or "\'GAIADR1\'"\n        save_abs_catalog = boolean(default=False)  # Write out used absolute astrometric reference catalog as a separate product\n        abs_minobj = integer(default=15) # Minimum number of objects acceptable for matching when performing absolute astrometry\n        abs_searchrad = float(default=6.0) # The search radius in arcsec for a match when performing absolute astrometry\n        # We encourage setting this parameter to True. Otherwise, xoffset and yoffset will be set to zero.\n        abs_use2dhist = boolean(default=True) # Use 2D histogram to find initial offset when performing absolute astrometry?\n        abs_separation = float(default=0.1) # Minimum object separation in arcsec when performing absolute astrometry\n        abs_tolerance = float(default=0.7) # Matching tolerance for xyxymatch in arcsec when performing absolute astrometry\n        # Fitting geometry when performing absolute astrometry\n        abs_fitgeometry = option(\'shift\', \'rshift\', \'rscale\', \'general\', default=\'rshift\')\n        abs_nclip = integer(min=0, default=3) # Number of clipping iterations in fit when performing absolute astrometry\n        abs_sigma = float(min=0.0, default=3.0) # Clipping limit in sigma units when performing absolute astrometry\n        output_use_model = boolean(default=True)  # When saving use `DataModel.meta.filename`\n    '