AstrometricAlignStep

This step provides absolute astrometric alignment to some external reference catalog, and back-propagates this to the crf.fits files. It allows for multiple iterations, to get e.g. a rough idea of the shift and then adding in rotation to improve the solution. We can also inherit solutions from other bands, for e.g. long wavelength MIRI observations where we find very few point sources so this kind of matching doesn’t work. There is also an option for cross-correlating the images to try and find a shift, but our testing finds this does not work particularly well and simply inheriting the tweakreg solutions from a shorter wavelength band works better.

API

class pjpipe.AstrometricAlignStep(target, band, target_dir, in_dir, is_bgr, catalog_dir, run_astro_cat, step_ext, procs, catalogs=None, align_mapping_mode='shift', align_mapping=None, tweakreg_parameters=None, overwrite=False)[source]

Perform absolute astrometric alignment

There are a number of modes here. The simplest is by matching a catalog of sources, using tweakreg. Alternatively, we can either apply calculated shifts to other mosaics, or attempt to match via cross-correlation.

Parameters:
  • target – Target to consider

  • band – Band to consider

  • in_dir – Input directory

  • is_bgr – Whether we’re processing background observations or not

  • catalog_dir – Directory of alignment catalogs

  • run_astro_cat – Whether we’ve run the astrometric_catalog step for this target/band

  • step_ext – .fits extension for the files going into the step

  • procs – Number of processes to run in parallel

  • catalogs – Dictionary for the external alignment catalogs

  • align_mapping_mode – If locking to other JWST image, method to use. Option is “shift” (pull the tweakreg solution from the existing file), or “cross-corr” (do some cross-correlation between the images)

  • tweakreg_parameters – Dictionary of parameters to pass to tweakreg for the standard alignment

  • overwrite – Whether to overwrite or not. Defaults to False

align_to_aligned_image(band)[source]

Align to a pre-aligned image

This will align to a pre-aligned image, either using cross-correlation or by pulling out the shift values and matrix from tweakreg (default)

Parameters:

band – Band we’re aligning

do_step()[source]

Run absolute astrometric alignment

move_tweakback_files(files, shift=None, matrix=None, ref_tpwcs=None)[source]

Wrapper to parallelise up tweakback

Parameters:
  • files – List of files to tweakback

  • shift – shift for tweakback. Defaults to None

  • matrix – rotation/skew matrix. Defaults to None

  • ref_tpwcs – WCS defining the plane in which the shift/matrix was defined. Defaults to None

tweakreg_align(cat_suffix='cat.ecsv')[source]

Align using tweakreg

Parameters:

cat_suffix – extension for the existing catalog. Defaults to “cat.ecsv”, which is the pipeline default