Using updated astrometry solutions#

As part of an effort to improve the absolute astrometry of HST images, STScI has created multiple new astrometric solutions for ACS and WFC3 images. These solutions are contained in the World Coordinate System (WCS) of the images, as well as headerlet extesions. This notebook provides an example workflow showing how to use/change to a different solution.

The solutions are contained in the exposure files (flt.fits and flc.fits), so no extra files are required. However, these updates were implemented in December 2019 as a part of HST Data Processing version 2019.5. If data were downloaded before that, they can either be redownloaded (and will contain the new solutions) from mast.stsci.edu or via astroquery, or can be updated by connecting to the database cotaining solutions (shown below).

For more information, see the overview page here: https://outerspace.stsci.edu/pages/viewpage.action?spaceKey=HAdP&title=Improvements+in+HST+Astrometry

REQUIREMENT: This notebook was designed around using stwcs version 1.5.3, and python version 3.6. If versions older than this are used the software will likely not work!
NOTE: The new solutions are used by default by the MAST pipeline! Some datasets may have certain solutions such as fitting to Gaia DR2, though other datasets (even in the same visit) may not! Thus, it is crucial to check the which solution (WCS) is active! The easiest way to check which solution is active is to check the WCSNAME keyword in the header of the SCI extensions.

Table Of Contents#

  1. Example Data Download

  2. New Extensions on FITS Files

  3. Exploring different solutions

  4. Applying a headerlet to the science extensions

  5. Restoring the “old” solution

  6. Inspecting alignment

  7. Changing the WCS of drizzled images

import numpy as np
import os
import shutil
import matplotlib.pyplot as plt

from astropy.io import fits
from astropy.wcs import WCS
from astropy.visualization import PercentileInterval, ImageNormalize, LogStretch
from astroquery.mast import Observations
from stwcs.wcsutil import headerlet
from stwcs import updatewcs
from drizzlepac.align import generate_astrometric_catalog
from drizzlepac import astrodrizzle

%matplotlib notebook

The following task in the stsci.skypac package can be run with TEAL:
                                    skymatch                                    
The following tasks in the drizzlepac package can be run with TEAL:
    astrodrizzle       config_testbed      imagefindpars           mapreg       
       photeq            pixreplace           pixtopix            pixtosky      
  refimagefindpars       resetbits          runastrodriz          skytopix      
     tweakback            tweakreg           updatenpol

Because some steps in this notebook require access to reference files, we will create a temporary ‘iref’ directory here to place these reference files after download. This step is typically done by defining the ‘iref’ path in your bash profile so that all reference files for all datasets can be in one static location, but for the portability of this notebook we will just create a temporary directory. Please see the ‘Initalization’ notebook for more information.

os.environ['CRDS_SERVER_URL'] = 'https://hst-crds.stsci.edu'
os.environ['CRDS_PATH'] = os.path.abspath(os.path.join('.', 'reference_files'))

os.environ['iref'] = os.path.abspath(os.path.join('.', 'reference_files', 'references', 'hst', 'wfc3')) + os.path.sep

0. Example Data Download#

Lets find some example HST data from MAST and download it:

obsTable = Observations.query_criteria(project='HST', proposal_id='14689', obs_id='ID7307030')
products = Observations.get_product_list(obsTable)
filtered_products = Observations.filter_products(products, mrp_only=False, productSubGroupDescription=['FLC', 'ASN'])
filtered_products
Table masked=True length=9
obsIDobs_collectiondataproduct_typeobs_iddescriptiontypedataURIproductTypeproductGroupDescriptionproductSubGroupDescriptionproductDocumentationURLprojectprvversionproposal_idproductFilenamesizeparent_obsiddataRightscalib_level
str8str3str5str37str64str1str69str9str28str11str1str7str19str5str52int64str8str6int64
25874804HSTimageid7307xfqDADS FLC file - CTE-corrected calibrated exposure ACS/WFC3Smast:HST/product/id7307xfq_flc.fitsSCIENCE--FLC--CALWF33.7.1 (Oct-18-2023)14689id7307xfq_flc.fits16903296025874840PUBLIC2
25874805HSTimageid7307xhqDADS FLC file - CTE-corrected calibrated exposure ACS/WFC3Smast:HST/product/id7307xhq_flc.fitsSCIENCE--FLC--CALWF33.7.1 (Oct-18-2023)14689id7307xhq_flc.fits16903296025874840PUBLIC2
25874806HSTimageid7307xlqDADS FLC file - CTE-corrected calibrated exposure ACS/WFC3Smast:HST/product/id7307xlq_flc.fitsSCIENCE--FLC--CALWF33.7.1 (Oct-18-2023)14689id7307xlq_flc.fits16903296025874840PUBLIC2
25874807HSTimageid7307xpqDADS FLC file - CTE-corrected calibrated exposure ACS/WFC3Smast:HST/product/id7307xpq_flc.fitsSCIENCE--FLC--CALWF33.7.1 (Oct-18-2023)14689id7307xpq_flc.fits16903296025874840PUBLIC2
25874840HSTimageid7307030DADS ASN file - Association ACS/WFC3/STISDmast:HST/product/id7307030_asn.fitsAUXILIARYMinimum Recommended ProductsASN--CALWF33.7.1 (Oct-18-2023)14689id7307030_asn.fits1152025874840PUBLIC3
26303775HSTimagehst_14689_07_wfc3_uvis_f814w_id7307xhHAP flat-field productDmast:HST/product/hst_14689_07_wfc3_uvis_f814w_id7307xh_flc.fitsSCIENCE--FLC--HAP-SVMDrizzlePac 3.6.214689hst_14689_07_wfc3_uvis_f814w_id7307xh_flc.fits16914816025874840PUBLIC2
26303830HSTimagehst_14689_07_wfc3_uvis_f814w_id7307xlHAP flat-field productDmast:HST/product/hst_14689_07_wfc3_uvis_f814w_id7307xl_flc.fitsSCIENCE--FLC--HAP-SVMDrizzlePac 3.6.214689hst_14689_07_wfc3_uvis_f814w_id7307xl_flc.fits16914816025874840PUBLIC2
26303880HSTimagehst_14689_07_wfc3_uvis_f814w_id7307xpHAP flat-field productDmast:HST/product/hst_14689_07_wfc3_uvis_f814w_id7307xp_flc.fitsSCIENCE--FLC--HAP-SVMDrizzlePac 3.6.214689hst_14689_07_wfc3_uvis_f814w_id7307xp_flc.fits16914816025874840PUBLIC2
26303905HSTimagehst_14689_07_wfc3_uvis_f814w_id7307xfHAP flat-field productDmast:HST/product/hst_14689_07_wfc3_uvis_f814w_id7307xf_flc.fitsSCIENCE--FLC--HAP-SVMDrizzlePac 3.6.214689hst_14689_07_wfc3_uvis_f814w_id7307xf_flc.fits16914816025874840PUBLIC2
dl_tbl = Observations.download_products(filtered_products, mrp_only=False)
dl_tbl
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/id7307xfq_flc.fits to ./mastDownload/HST/id7307xfq/id7307xfq_flc.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/id7307xhq_flc.fits to ./mastDownload/HST/id7307xhq/id7307xhq_flc.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/id7307xlq_flc.fits to ./mastDownload/HST/id7307xlq/id7307xlq_flc.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/id7307xpq_flc.fits to ./mastDownload/HST/id7307xpq/id7307xpq_flc.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/id7307030_asn.fits to ./mastDownload/HST/id7307030/id7307030_asn.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hst_14689_07_wfc3_uvis_f814w_id7307xh_flc.fits to ./mastDownload/HST/hst_14689_07_wfc3_uvis_f814w_id7307xh/hst_14689_07_wfc3_uvis_f814w_id7307xh_flc.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hst_14689_07_wfc3_uvis_f814w_id7307xl_flc.fits to ./mastDownload/HST/hst_14689_07_wfc3_uvis_f814w_id7307xl/hst_14689_07_wfc3_uvis_f814w_id7307xl_flc.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hst_14689_07_wfc3_uvis_f814w_id7307xp_flc.fits to ./mastDownload/HST/hst_14689_07_wfc3_uvis_f814w_id7307xp/hst_14689_07_wfc3_uvis_f814w_id7307xp_flc.fits ...
 [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/hst_14689_07_wfc3_uvis_f814w_id7307xf_flc.fits to ./mastDownload/HST/hst_14689_07_wfc3_uvis_f814w_id7307xf/hst_14689_07_wfc3_uvis_f814w_id7307xf_flc.fits ...
 [Done]
Table length=9
Local PathStatusMessageURL
str103str8objectobject
./mastDownload/HST/id7307xfq/id7307xfq_flc.fitsCOMPLETENoneNone
./mastDownload/HST/id7307xhq/id7307xhq_flc.fitsCOMPLETENoneNone
./mastDownload/HST/id7307xlq/id7307xlq_flc.fitsCOMPLETENoneNone
./mastDownload/HST/id7307xpq/id7307xpq_flc.fitsCOMPLETENoneNone
./mastDownload/HST/id7307030/id7307030_asn.fitsCOMPLETENoneNone
./mastDownload/HST/hst_14689_07_wfc3_uvis_f814w_id7307xh/hst_14689_07_wfc3_uvis_f814w_id7307xh_flc.fitsCOMPLETENoneNone
./mastDownload/HST/hst_14689_07_wfc3_uvis_f814w_id7307xl/hst_14689_07_wfc3_uvis_f814w_id7307xl_flc.fitsCOMPLETENoneNone
./mastDownload/HST/hst_14689_07_wfc3_uvis_f814w_id7307xp/hst_14689_07_wfc3_uvis_f814w_id7307xp_flc.fitsCOMPLETENoneNone
./mastDownload/HST/hst_14689_07_wfc3_uvis_f814w_id7307xf/hst_14689_07_wfc3_uvis_f814w_id7307xf_flc.fitsCOMPLETENoneNone

Now to make the paths easier to work with, lets move those files from their default download locations into the same location as this notebook:

for f in dl_tbl['Local Path']:
    filename = os.path.split(f)[-1]
    if not os.path.exists(filename):
        shutil.move(f, '.')

And then download all of the necessary reference files for the images using CRDS (this uses the CRDS paths defined at the top of the notebook, although you would probably want to use a different path for your own data as described above):

for row in filtered_products:
    if row['productSubGroupDescription'] == 'FLC':
        os.system('crds bestrefs --files {}_flc.fits --sync-references=1 --update-bestrefs'.format(row['obs_id']))
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfpc2_wf4tfile_0250.rmap      678 bytes  (1 / 141 files) (0 / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfpc2_shadfile_0250.rmap      977 bytes  (2 / 141 files) (678 / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfpc2_offtab_0250.rmap      642 bytes  (3 / 141 files) (1.7 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfpc2_maskfile_0250.rmap      685 bytes  (4 / 141 files) (2.3 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfpc2_idctab_0250.rmap      696 bytes  (5 / 141 files) (3.0 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfpc2_flatfile_0250.rmap   30.0 K bytes  (6 / 141 files) (3.7 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfpc2_dgeofile_0250.rmap      801 bytes  (7 / 141 files) (33.7 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfpc2_darkfile_0250.rmap  178.4 K bytes  (8 / 141 files) (34.5 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfpc2_biasfile_0250.rmap    3.3 K bytes  (9 / 141 files) (212.8 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfpc2_atodfile_0250.rmap      874 bytes  (10 / 141 files) (216.1 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfpc2_0250.imap      782 bytes  (11 / 141 files) (217.0 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfc3_snkcfile_0003.rmap      681 bytes  (12 / 141 files) (217.8 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfc3_satufile_0002.rmap    1.0 K bytes  (13 / 141 files) (218.5 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfc3_pfltfile_0253.rmap   34.2 K bytes  (14 / 141 files) (219.5 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfc3_pctetab_0004.rmap      698 bytes  (15 / 141 files) (253.7 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfc3_oscntab_0250.rmap      747 bytes  (16 / 141 files) (254.4 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfc3_npolfile_0254.rmap    4.0 K bytes  (17 / 141 files) (255.1 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfc3_nlinfile_0250.rmap      726 bytes  (18 / 141 files) (259.2 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfc3_mdriztab_0254.rmap      845 bytes  (19 / 141 files) (259.9 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfc3_imphttab_0256.rmap      683 bytes  (20 / 141 files) (260.7 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfc3_idctab_0254.rmap      661 bytes  (21 / 141 files) (261.4 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfc3_flshfile_0256.rmap    5.8 K bytes  (22 / 141 files) (262.1 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfc3_drkcfile_0190.rmap  231.0 K bytes  (23 / 141 files) (267.9 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfc3_dfltfile_0002.rmap   17.1 K bytes  (24 / 141 files) (498.8 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfc3_darkfile_0488.rmap  272.1 K bytes  (25 / 141 files) (515.9 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfc3_d2imfile_0251.rmap      605 bytes  (26 / 141 files) (788.0 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfc3_crrejtab_0250.rmap      803 bytes  (27 / 141 files) (788.6 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfc3_ccdtab_0250.rmap      799 bytes  (28 / 141 files) (789.4 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfc3_bpixtab_0304.rmap   11.4 K bytes  (29 / 141 files) (790.2 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfc3_biasfile_0267.rmap   23.4 K bytes  (30 / 141 files) (801.6 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfc3_biacfile_0003.rmap      692 bytes  (31 / 141 files) (825.0 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfc3_atodtab_0250.rmap      651 bytes  (32 / 141 files) (825.7 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_wfc3_0586.imap    1.3 K bytes  (33 / 141 files) (826.3 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_synphot_tmttab_0002.rmap      745 bytes  (34 / 141 files) (827.6 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_synphot_tmgtab_0012.rmap      767 bytes  (35 / 141 files) (828.3 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_synphot_tmctab_0051.rmap      743 bytes  (36 / 141 files) (829.1 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_synphot_thruput_0055.rmap  329.6 K bytes  (37 / 141 files) (829.8 K / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_synphot_thermal_0003.rmap   20.4 K bytes  (38 / 141 files) (1.2 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_synphot_obsmodes_0004.rmap      743 bytes  (39 / 141 files) (1.2 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_synphot_0066.imap      579 bytes  (40 / 141 files) (1.2 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_xtractab_0250.rmap      815 bytes  (41 / 141 files) (1.2 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_wcptab_0251.rmap      578 bytes  (42 / 141 files) (1.2 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_teltab_0250.rmap      745 bytes  (43 / 141 files) (1.2 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_tdstab_0253.rmap      921 bytes  (44 / 141 files) (1.2 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_tdctab_0251.rmap      650 bytes  (45 / 141 files) (1.2 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_srwtab_0250.rmap      745 bytes  (46 / 141 files) (1.2 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_sptrctab_0251.rmap      895 bytes  (47 / 141 files) (1.2 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_sdctab_0251.rmap      889 bytes  (48 / 141 files) (1.2 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_riptab_0254.rmap      877 bytes  (49 / 141 files) (1.2 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_phottab_0258.rmap    1.6 K bytes  (50 / 141 files) (1.2 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_pfltfile_0250.rmap   23.7 K bytes  (51 / 141 files) (1.2 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_pctab_0250.rmap    3.1 K bytes  (52 / 141 files) (1.2 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_mofftab_0250.rmap      747 bytes  (53 / 141 files) (1.2 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_mlintab_0250.rmap      601 bytes  (54 / 141 files) (1.2 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_lfltfile_0250.rmap   11.8 K bytes  (55 / 141 files) (1.2 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_lamptab_0250.rmap      610 bytes  (56 / 141 files) (1.2 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_inangtab_0250.rmap      815 bytes  (57 / 141 files) (1.2 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_imphttab_0252.rmap      616 bytes  (58 / 141 files) (1.2 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_idctab_0251.rmap      775 bytes  (59 / 141 files) (1.2 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_halotab_0250.rmap      747 bytes  (60 / 141 files) (1.2 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_gactab_0250.rmap      651 bytes  (61 / 141 files) (1.2 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_exstab_0250.rmap      745 bytes  (62 / 141 files) (1.2 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_echsctab_0250.rmap      749 bytes  (63 / 141 files) (1.2 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_disptab_0250.rmap      813 bytes  (64 / 141 files) (1.2 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_darkfile_0350.rmap   58.7 K bytes  (65 / 141 files) (1.2 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_crrejtab_0250.rmap      711 bytes  (66 / 141 files) (1.3 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_cdstab_0250.rmap      745 bytes  (67 / 141 files) (1.3 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_ccdtab_0252.rmap      893 bytes  (68 / 141 files) (1.3 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_bpixtab_0250.rmap      845 bytes  (69 / 141 files) (1.3 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_biasfile_0352.rmap  118.0 K bytes  (70 / 141 files) (1.3 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_apertab_0250.rmap      588 bytes  (71 / 141 files) (1.4 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_apdestab_0252.rmap      636 bytes  (72 / 141 files) (1.4 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_stis_0364.imap    1.7 K bytes  (73 / 141 files) (1.4 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_nicmos_zprattab_0250.rmap      646 bytes  (74 / 141 files) (1.4 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_nicmos_tempfile_0250.rmap    1.1 K bytes  (75 / 141 files) (1.4 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_nicmos_tdffile_0250.rmap    8.9 K bytes  (76 / 141 files) (1.4 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_nicmos_saadfile_0250.rmap      771 bytes  (77 / 141 files) (1.4 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_nicmos_saacntab_0250.rmap      594 bytes  (78 / 141 files) (1.4 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_nicmos_rnlcortb_0250.rmap      771 bytes  (79 / 141 files) (1.4 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_nicmos_pmskfile_0250.rmap      603 bytes  (80 / 141 files) (1.4 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_nicmos_pmodfile_0250.rmap      603 bytes  (81 / 141 files) (1.4 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_nicmos_phottab_0250.rmap      862 bytes  (82 / 141 files) (1.4 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_nicmos_pedsbtab_0250.rmap      594 bytes  (83 / 141 files) (1.4 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_nicmos_noisfile_0250.rmap    2.6 K bytes  (84 / 141 files) (1.4 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_nicmos_nlinfile_0250.rmap    1.7 K bytes  (85 / 141 files) (1.4 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_nicmos_maskfile_0250.rmap    1.2 K bytes  (86 / 141 files) (1.4 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_nicmos_illmfile_0250.rmap    5.8 K bytes  (87 / 141 files) (1.4 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_nicmos_idctab_0250.rmap      767 bytes  (88 / 141 files) (1.4 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_nicmos_flatfile_0250.rmap   11.0 K bytes  (89 / 141 files) (1.4 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_nicmos_darkfile_0250.rmap   14.9 K bytes  (90 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_nicmos_0250.imap    1.1 K bytes  (91 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_cos_ywlkfile_0002.rmap      922 bytes  (92 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_cos_xwlkfile_0002.rmap      922 bytes  (93 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_cos_xtractab_0269.rmap    1.6 K bytes  (94 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_cos_wcptab_0257.rmap    1.3 K bytes  (95 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_cos_twozxtab_0277.rmap      990 bytes  (96 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_cos_tracetab_0276.rmap      998 bytes  (97 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_cos_tdstab_0270.rmap      803 bytes  (98 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_cos_spwcstab_0255.rmap    1.1 K bytes  (99 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_cos_spottab_0006.rmap      766 bytes  (100 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_cos_proftab_0276.rmap    1.0 K bytes  (101 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_cos_phatab_0250.rmap      668 bytes  (102 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_cos_lamptab_0264.rmap    1.4 K bytes  (103 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_cos_hvtab_0259.rmap      567 bytes  (104 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_cos_gsagtab_0259.rmap      712 bytes  (105 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_cos_geofile_0250.rmap      670 bytes  (106 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_cos_fluxtab_0282.rmap    1.7 K bytes  (107 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_cos_flatfile_0264.rmap    1.8 K bytes  (108 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_cos_disptab_0276.rmap    1.7 K bytes  (109 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_cos_dgeofile_0002.rmap      909 bytes  (110 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_cos_deadtab_0250.rmap      711 bytes  (111 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_cos_brsttab_0250.rmap      696 bytes  (112 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_cos_brftab_0250.rmap      614 bytes  (113 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_cos_bpixtab_0260.rmap      773 bytes  (114 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_cos_badttab_0252.rmap      643 bytes  (115 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_cos_0353.imap    1.4 K bytes  (116 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_acs_spottab_0251.rmap      641 bytes  (117 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_acs_snkcfile_0093.rmap    7.1 K bytes  (118 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_acs_shadfile_0251.rmap      531 bytes  (119 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_acs_satufile_0002.rmap    1.2 K bytes  (120 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_acs_pfltfile_0253.rmap   69.2 K bytes  (121 / 141 files) (1.5 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_acs_pctetab_0253.rmap      615 bytes  (122 / 141 files) (1.6 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_acs_oscntab_0251.rmap      781 bytes  (123 / 141 files) (1.6 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_acs_npolfile_0253.rmap    3.2 K bytes  (124 / 141 files) (1.6 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_acs_mlintab_0250.rmap      646 bytes  (125 / 141 files) (1.6 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_acs_mdriztab_0253.rmap      769 bytes  (126 / 141 files) (1.6 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_acs_imphttab_0259.rmap      769 bytes  (127 / 141 files) (1.6 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_acs_idctab_0256.rmap    1.5 K bytes  (128 / 141 files) (1.6 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_acs_flshfile_0268.rmap    3.4 K bytes  (129 / 141 files) (1.6 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_acs_drkcfile_0444.rmap   14.6 K bytes  (130 / 141 files) (1.6 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_acs_dgeofile_0250.rmap    3.2 K bytes  (131 / 141 files) (1.6 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_acs_darkfile_0435.rmap   86.6 K bytes  (132 / 141 files) (1.6 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_acs_d2imfile_0253.rmap      601 bytes  (133 / 141 files) (1.7 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_acs_crrejtab_0251.rmap      945 bytes  (134 / 141 files) (1.7 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_acs_cfltfile_0250.rmap    1.2 K bytes  (135 / 141 files) (1.7 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_acs_ccdtab_0256.rmap    1.4 K bytes  (136 / 141 files) (1.7 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_acs_bpixtab_0252.rmap    1.0 K bytes  (137 / 141 files) (1.7 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_acs_biasfile_0433.rmap   56.7 K bytes  (138 / 141 files) (1.7 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_acs_atodtab_0251.rmap      528 bytes  (139 / 141 files) (1.8 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_acs_0533.imap    1.3 K bytes  (140 / 141 files) (1.8 M / 1.8 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/mappings/hst/hst_1153.pmap      495 bytes  (141 / 141 files) (1.8 M / 1.8 M bytes)
CRDS - INFO -  No comparison context or source comparison requested.
CRDS - INFO -  ===> Processing id7307xfq_flc.fits
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/references/hst/wfc3/2321606li_bia.fits  174.2 M bytes  (1 / 14 files) (0 / 757.0 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/references/hst/wfc3/2731450pi_idc.fits   40.3 K bytes  (2 / 14 files) (174.2 M / 757.0 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/references/hst/wfc3/2ck18260i_mdz.fits  118.1 K bytes  (3 / 14 files) (174.2 M / 757.0 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/references/hst/wfc3/2ck1856fi_bpx.fits    1.8 M bytes  (4 / 14 files) (174.3 M / 757.0 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/references/hst/wfc3/51c1638pi_imp.fits  397.4 K bytes  (5 / 14 files) (176.2 M / 757.0 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/references/hst/wfc3/7b21735ti_sat.fits  174.2 M bytes  (6 / 14 files) (176.6 M / 757.0 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/references/hst/wfc3/7bd1927fi_drk.fits  168.1 M bytes  (7 / 14 files) (350.7 M / 757.0 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/references/hst/wfc3/n9i1435li_crr.fits   11.5 K bytes  (8 / 14 files) (518.8 M / 757.0 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/references/hst/wfc3/q911321oi_osc.fits   25.9 K bytes  (9 / 14 files) (518.8 M / 757.0 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/references/hst/wfc3/t291659mi_ccd.fits  247.7 K bytes  (10 / 14 files) (518.9 M / 757.0 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/references/hst/wfc3/y7b1516hi_d2i.fits   51.8 K bytes  (11 / 14 files) (519.1 M / 757.0 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/references/hst/wfc3/y7b15170i_npl.fits   51.8 K bytes  (12 / 14 files) (519.2 M / 757.0 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/references/hst/wfc3/zcv2054mi_pfl.fits  168.1 M bytes  (13 / 14 files) (519.2 M / 757.0 M bytes)
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/references/hst/wfc3/zcv2057oi_snk.fits   69.7 M bytes  (14 / 14 files) (687.3 M / 757.0 M bytes)
CRDS - INFO -  0 errors
CRDS - INFO -  0 warnings
CRDS - INFO -  157 infos
CRDS - INFO -  No comparison context or source comparison requested.
CRDS - INFO -  ===> Processing id7307xhq_flc.fits
CRDS - INFO -  0 errors
CRDS - INFO -  0 warnings
CRDS - INFO -  2 infos
CRDS - INFO -  No comparison context or source comparison requested.
CRDS - INFO -  ===> Processing id7307xlq_flc.fits
CRDS - INFO -  0 errors
CRDS - INFO -  0 warnings
CRDS - INFO -  2 infos
CRDS - INFO -  No comparison context or source comparison requested.
CRDS - INFO -  ===> Processing id7307xpq_flc.fits
CRDS - INFO -  Fetching  /home/runner/work/hst_notebooks/hst_notebooks/notebooks/DrizzlePac/using_updated_astrometry_solutions/reference_files/references/hst/wfc3/6c820144i_fls.fits  209.0 M bytes  (1 / 1 files) (0 / 209.0 M bytes)
CRDS - INFO -  0 errors
CRDS - INFO -  0 warnings
CRDS - INFO -  3 infos
CRDS - INFO -  No comparison context or source comparison requested.
CRDS - INFO -  ===> Processing hst_14689_07_wfc3_uvis_f814w_id7307xh_flc.fits
CRDS - INFO -  0 errors
CRDS - INFO -  0 warnings
CRDS - INFO -  2 infos
CRDS - INFO -  No comparison context or source comparison requested.
CRDS - INFO -  ===> Processing hst_14689_07_wfc3_uvis_f814w_id7307xl_flc.fits
CRDS - INFO -  0 errors
CRDS - INFO -  0 warnings
CRDS - INFO -  2 infos
CRDS - INFO -  No comparison context or source comparison requested.
CRDS - INFO -  ===> Processing hst_14689_07_wfc3_uvis_f814w_id7307xp_flc.fits
CRDS - INFO -  0 errors
CRDS - INFO -  0 warnings
CRDS - INFO -  2 infos
CRDS - INFO -  No comparison context or source comparison requested.
CRDS - INFO -  ===> Processing hst_14689_07_wfc3_uvis_f814w_id7307xf_flc.fits
CRDS - INFO -  0 errors
CRDS - INFO -  0 warnings
CRDS - INFO -  2 infos

1. New extensions on fits files#

Using fits.info prints basic information about the extensions in a fits file. In the following examples, we will show operations for one file, though performing the same operations for multiple files simply requires looping.

filename = 'id7307xfq_flc.fits'

If no extensions named HDRLET appear, then solutions can be downloaded from the database (if available) and automatically appended to the fits files using the following command:

updatewcs.updatewcs(filename, use_db=True)
AstrometryDB service available...
Deleted all instances of WCS with key A in extensions [1, 4]
Deleted all instances of WCS with key B in extensions [1, 4]
Wcskey 'O' is reserved for the original WCS and should not be deleted.
INFO: 
                Inconsistent SIP distortion information is present in the FITS header and the WCS object:
                SIP coefficients were detected, but CTYPE is missing a "-SIP" suffix.
                astropy.wcs is using the SIP distortion coefficients,
                therefore the coordinates calculated here might be incorrect.

                If you do not want to apply the SIP distortion coefficients,
                please remove the SIP coefficients from the FITS header or the
                WCS object.  As an example, if the image is already distortion-corrected
                (e.g., drizzled) then distortion components should not apply and the SIP
                coefficients should be removed.

                While the SIP distortion coefficients are being applied here, if that was indeed the intent,
                for consistency please append "-SIP" to the CTYPE in the FITS header or the WCS object.

                 [astropy.wcs.wcs]
- IDCTAB: Distortion model from row 36 for chip 2 : F814W
INFO: 
                Inconsistent SIP distortion information is present in the FITS header and the WCS object:
                SIP coefficients were detected, but CTYPE is missing a "-SIP" suffix.
                astropy.wcs is using the SIP distortion coefficients,
                therefore the coordinates calculated here might be incorrect.

                If you do not want to apply the SIP distortion coefficients,
                please remove the SIP coefficients from the FITS header or the
                WCS object.  As an example, if the image is already distortion-corrected
                (e.g., drizzled) then distortion components should not apply and the SIP
                coefficients should be removed.

                While the SIP distortion coefficients are being applied here, if that was indeed the intent,
                for consistency please append "-SIP" to the CTYPE in the FITS header or the WCS object.

                 [astropy.wcs.wcs]
- IDCTAB: Distortion model from row 36 for chip 2 : F814W
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[2]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[3]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[5]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[6]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[7]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[8]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[9]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[10]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[11]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[12]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[13]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[14]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[15]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[16]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[17]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[18]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[19]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[20]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[21]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[22]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[23]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key B [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[2]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'B' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key B [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[3]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'B' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key B [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[5]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'B' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key B [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[6]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'B' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key B [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[7]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'B' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key B [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[8]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'B' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key B [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[9]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'B' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key B [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[10]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'B' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key B [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[11]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'B' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key B [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[12]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'B' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key B [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[13]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'B' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key B [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[14]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'B' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key B [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[15]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'B' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key B [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[16]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'B' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key B [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[17]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'B' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key B [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[18]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'B' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key B [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[19]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'B' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key B [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[20]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'B' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key B [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[21]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'B' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key B [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[22]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'B' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key B [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[23]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'B' was found in the given header [stwcs.wcsutil.altwcs]
INFO: 
                Inconsistent SIP distortion information is present in the FITS header and the WCS object:
                SIP coefficients were detected, but CTYPE is missing a "-SIP" suffix.
                astropy.wcs is using the SIP distortion coefficients,
                therefore the coordinates calculated here might be incorrect.

                If you do not want to apply the SIP distortion coefficients,
                please remove the SIP coefficients from the FITS header or the
                WCS object.  As an example, if the image is already distortion-corrected
                (e.g., drizzled) then distortion components should not apply and the SIP
                coefficients should be removed.

                While the SIP distortion coefficients are being applied here, if that was indeed the intent,
                for consistency please append "-SIP" to the CTYPE in the FITS header or the WCS object.

                 [astropy.wcs.wcs]
- IDCTAB: Distortion model from row 35 for chip 1 : F814W
Updating astrometry for id7307xfq
Accessing AstrometryDB service :
	https://mast.stsci.edu/portal/astrometryDB/observation/read/id7307xfq
AstrometryDB service call succeeded
Retrieving astrometrically-updated WCS "OPUS" for observation "id7307xfq"
Retrieving astrometrically-updated WCS "IDC_2731450pi" for observation "id7307xfq"
Retrieving astrometrically-updated WCS "OPUS-GSC240" for observation "id7307xfq"
Retrieving astrometrically-updated WCS "IDC_2731450pi-GSC240" for observation "id7307xfq"
Retrieving astrometrically-updated WCS "IDC_2731450pi-FIT_REL_GAIADR2" for observation "id7307xfq"
Retrieving astrometrically-updated WCS "id7307xfq_flt_IDC_2731450pi-GSC240-hlet.fits" for observation "id7307xfq"
Retrieving astrometrically-updated WCS "IDC_2731450pi-FIT_SVM_GAIADR2" for observation "id7307xfq"
Updating id7307xfq with:
Replacing primary WCS with
	Headerlet with WCSNAME=IDC_2731450pi-FIT_SVM_GAIADR2
['id7307xfq_flc.fits']

The updated solutions should then show up as extra HDRLET extensions

fits.info(filename)
Filename: id7307xfq_flc.fits
No.    Name      Ver    Type      Cards   Dimensions   Format
  0  PRIMARY       1 PrimaryHDU     304   ()      
  1  SCI           1 ImageHDU       207   (4096, 2051)   float32   
  2  ERR           1 ImageHDU        50   (4096, 2051)   float32   
  3  DQ            1 ImageHDU        42   (4096, 2051)   int16   
  4  SCI           2 ImageHDU       205   (4096, 2051)   float32   
  5  ERR           2 ImageHDU        50   (4096, 2051)   float32   
  6  DQ            2 ImageHDU        42   (4096, 2051)   int16   
  7  HDRLET        1 HeaderletHDU     18   ()      
  8  HDRLET        2 HeaderletHDU     26   ()      
  9  HDRLET        3 HeaderletHDU     26   ()      
 10  HDRLET        4 HeaderletHDU     26   ()      
 11  HDRLET        5 HeaderletHDU     26   ()      
 12  HDRLET        6 HeaderletHDU     26   ()      
 13  WCSCORR       1 BinTableHDU     59   14R x 24C   [40A, I, A, 24A, 24A, 24A, 24A, D, D, D, D, D, D, D, D, 24A, 24A, D, D, D, D, J, 40A, 128A]   
 14  HDRLET        7 HeaderletHDU     26   ()      
 15  HDRLET        8 HeaderletHDU     26   ()      
 16  WCSDVARR      1 ImageHDU        15   (64, 32)   float32   
 17  WCSDVARR      2 ImageHDU        15   (64, 32)   float32   
 18  D2IMARR       1 ImageHDU        15   (64, 32)   float32   
 19  D2IMARR       2 ImageHDU        15   (64, 32)   float32   
 20  WCSDVARR      3 ImageHDU        15   (64, 32)   float32   
 21  WCSDVARR      4 ImageHDU        15   (64, 32)   float32   
 22  D2IMARR       3 ImageHDU        15   (64, 32)   float32   
 23  D2IMARR       4 ImageHDU        15   (64, 32)   float32   

As seen above, there are new HDRLET extensions in the fits files (compared to the pre-2019.3 products). These extensions each contain information used to construct a World Coordinate System (WCS), which is used to transform image coordinates into physical (sky) coordinates. Each of these WCS’s represent an astrometric solution derived in a different way.

2. Exploring different solutions#

Each HDRLET extension contains information describing the solution used in its creation. To investigate this we first programmatically obtain the extension numbers of the HDRLETs.

ext_indices = headerlet.find_headerlet_HDUs(filename, strict=False)

# To show it's consistent with the fits.info from above
print(ext_indices)
[7, 8, 9, 10, 11, 12, 14, 15]

We can then loop through these extensions to see what the WCS solutions are.

hdu = fits.open(filename)
print('Ext\tWCSNAME')
for ext_ind in ext_indices:
    print(ext_ind, '\t', hdu[ext_ind].header['WCSNAME'])

hdu.close()
Ext	WCSNAME
7 	 OPUS
8 	 IDC_2731450pi
9 	 IDC_2731450pi-GSC240
10 	 IDC_2731450pi-FIT_REL_GAIADR2
11 	 id7307xfq_flt_IDC_2731450pi-GSC240-hlet.fits
12 	 IDC_2731450pi-FIT_SVM_GAIADR2
14 	 IDC_2731450pi
15 	 IDC_2731450pi-FIT_REL_GAIAeDR3

Alternatively, we can use get_headerlet_kw_names:

new_wcsnames = headerlet.get_headerlet_kw_names(filename, kw='WCSNAME')
new_wcsnames
['OPUS',
 'IDC_2731450pi',
 'IDC_2731450pi-GSC240',
 'IDC_2731450pi-FIT_REL_GAIADR2',
 'id7307xfq_flt_IDC_2731450pi-GSC240-hlet.fits',
 'IDC_2731450pi-FIT_SVM_GAIADR2',
 'IDC_2731450pi',
 'IDC_2731450pi-FIT_REL_GAIAeDR3']

We can write this into a convenience function:

def get_hdrlet_wcsnames(filename):
    """Print and return list of WCS names in HDRLET extensions of fits file"""
    hdu = fits.open(filename)
    ext_indices = headerlet.find_headerlet_HDUs(filename, strict=False)

    print('Ext\tWCSNAME')
    new_wcsnames = []
    for ext_ind in ext_indices:
        name = hdu[ext_ind].header['WCSNAME']
        print(ext_ind, '\t', name)
        new_wcsnames.append(name)
        
    hdu.close()
    return new_wcsnames
new_wcsnames = get_hdrlet_wcsnames(filename)
Ext	WCSNAME
7 	 OPUS
8 	 IDC_2731450pi
9 	 IDC_2731450pi-GSC240
10 	 IDC_2731450pi-FIT_REL_GAIADR2
11 	 id7307xfq_flt_IDC_2731450pi-GSC240-hlet.fits
12 	 IDC_2731450pi-FIT_SVM_GAIADR2
14 	 IDC_2731450pi
15 	 IDC_2731450pi-FIT_REL_GAIAeDR3

We can also see which solution is the “active” solution (the one currently applied to the SCI extensions):

current_wcs = fits.getval(filename, 'WCSNAME', ext=('SCI', 1))

print(current_wcs)
IDC_2731450pi-FIT_SVM_GAIADR2

The nature of each solution is described here: https://drizzlepac.readthedocs.io/en/latest/astrometry.html#interpreting-wcs-names

3. Applying a headerlet to the science extensions#

To apply/activate one of the other solutions, the restore_from_headerlet() function can be used. This function applies the WCS contained in a HDRLET extension to all SCI extensions of the image. Doing this requires knowing which solution should be applied, which can be obtained in multiple ways.

NOTE: This is especially useful in cases where some of the exposures in a visit will have solutions that are aligned to Gaia, but others won't. This is true for grism images in the same visit as direct images, or shallow/deep exposure combinations.

For instance, if the desired solution is IDC_2731450pi-GSC240, we can find the EXTVER of the corresponding HDRLET from the list of wcs names we generated before.

# Gets the index of list element with value 'IDC_2731450pi-GSC240'
# The index in this list + 1 is the same as the EXTVER of the corresponding HDRLET
# We need to add 1 because lists are 0-indexed, while EXTVER's are 1 indexed
chosen_ext = new_wcsnames.index('IDC_2731450pi-GSC240') + 1
headerlet.restore_from_headerlet(filename, hdrext=('HDRLET', chosen_ext), archive=False, force=False)

In this case we set archive keyword argument to False. Setting archive to True will preserve the currently active WCS as a new HDRLET extension on the file. Since in our case the current solution already has a HDRLET, we do not need to archive it. This may be useful in some cases, such as when the image has been manually aligned/transformed, and keeping a record of that solution is desired.

We can check that the solution was applied:

current_wcs = fits.getval(filename, 'WCSNAME', ext=('SCI', 1))

print(current_wcs)
IDC_2731450pi-GSC240

We can also apply the solution via the HDRNAME:

hdrlet_hdrnames = headerlet.get_headerlet_kw_names(fits.open(filename), 'HDRNAME')
desired_hdrname = hdrlet_hdrnames[new_wcsnames.index('IDC_2731450pi-GSC240')]
print(desired_hdrname)
id7307xfq_flt_IDC_2731450pi-GSC240
headerlet.restore_from_headerlet(filename, hdrname=desired_hdrname, archive=False, force=False)

We can also apply some logic to get the hdrext programatically. For instance, if we only wanted the IDC (distortion calibrated) solution with the GSC240 tag (indicating that the guide star positions had been updated), we can do the following:

for i, wcsname in enumerate(new_wcsnames):
    if 'IDC' in wcsname and 'GSC240' in wcsname:
        chosen_ext = i + 1 # Add one due to 0 indexing of enumerate vs 1 indexing of EXTVER
        break

print('The desired extension is:', ('HDRLET', chosen_ext))
The desired extension is: ('HDRLET', 3)

Finding the solution this way can be easier, as it doesn’t require a full typing out of the IDCTAB name. However, in the future, if new IDCTABs are created, there may be multiple solutions matching the criteria above, and more sophisticated logic will need to be applied.

4. Restoring the “old” solution#

If the original solution is desired, it can be restored using the methods shown above, by replacing the WCSNAME simply with IDC_2731450pi, or whatever the name of the IDCTAB for that file is. To get that name, the following procedure can be done:

NOTE: Data taken after October 2017 may not have a solution of the form IDC_xxxxxxxxx, as the pointing information of the telescope was already calculated using GSC 2.4.0. As such, the "old" solution may be of the same form as the a priori solution, i.e.: IDC_xxxxxxxxx-GSC240.
idc_file = fits.getval(filename, 'IDCTAB')
idc_filename = idc_file.split('$')[-1]
idc_wcsname = 'IDC_' + idc_filename.replace('_idc.fits', '')
print(idc_wcsname)
IDC_2731450pi

Restoring the solution is then done the same as above:

chosen_ext = new_wcsnames.index(idc_wcsname) + 1
headerlet.restore_from_headerlet(filename, hdrext=('HDRLET', chosen_ext), archive=False, force=False)
current_wcs = fits.getval(filename, 'WCSNAME', ext=('SCI', 1))

print(current_wcs)
IDC_2731450pi

Alternatively, updatewcs can be run on the image, with the use_db flag set to False:

updatewcs.updatewcs(filename, use_db=False)
Deleted all instances of WCS with key A in extensions [1, 4]
Wcskey 'O' is reserved for the original WCS and should not be deleted.
INFO: 
                Inconsistent SIP distortion information is present in the FITS header and the WCS object:
                SIP coefficients were detected, but CTYPE is missing a "-SIP" suffix.
                astropy.wcs is using the SIP distortion coefficients,
                therefore the coordinates calculated here might be incorrect.

                If you do not want to apply the SIP distortion coefficients,
                please remove the SIP coefficients from the FITS header or the
                WCS object.  As an example, if the image is already distortion-corrected
                (e.g., drizzled) then distortion components should not apply and the SIP
                coefficients should be removed.

                While the SIP distortion coefficients are being applied here, if that was indeed the intent,
                for consistency please append "-SIP" to the CTYPE in the FITS header or the WCS object.

                 [astropy.wcs.wcs]
- IDCTAB: Distortion model from row 36 for chip 2 : F814W
INFO: 
                Inconsistent SIP distortion information is present in the FITS header and the WCS object:
                SIP coefficients were detected, but CTYPE is missing a "-SIP" suffix.
                astropy.wcs is using the SIP distortion coefficients,
                therefore the coordinates calculated here might be incorrect.

                If you do not want to apply the SIP distortion coefficients,
                please remove the SIP coefficients from the FITS header or the
                WCS object.  As an example, if the image is already distortion-corrected
                (e.g., drizzled) then distortion components should not apply and the SIP
                coefficients should be removed.

                While the SIP distortion coefficients are being applied here, if that was indeed the intent,
                for consistency please append "-SIP" to the CTYPE in the FITS header or the WCS object.

                 [astropy.wcs.wcs]
- IDCTAB: Distortion model from row 36 for chip 2 : F814W
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[2]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[3]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[5]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[6]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[7]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[8]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[9]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[10]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[11]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[12]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[13]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[14]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[15]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[16]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[17]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[18]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[19]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[20]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[21]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[22]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
WARNING: wcs_from_key: Could not read WCS with key A [stwcs.wcsutil.altwcs]
WARNING:               Skipping file 'id7307xfq_flc.fits[23]' [stwcs.wcsutil.altwcs]
WARNING:               No WCS with key 'A' was found in the given header [stwcs.wcsutil.altwcs]
INFO: 
                Inconsistent SIP distortion information is present in the FITS header and the WCS object:
                SIP coefficients were detected, but CTYPE is missing a "-SIP" suffix.
                astropy.wcs is using the SIP distortion coefficients,
                therefore the coordinates calculated here might be incorrect.

                If you do not want to apply the SIP distortion coefficients,
                please remove the SIP coefficients from the FITS header or the
                WCS object.  As an example, if the image is already distortion-corrected
                (e.g., drizzled) then distortion components should not apply and the SIP
                coefficients should be removed.

                While the SIP distortion coefficients are being applied here, if that was indeed the intent,
                for consistency please append "-SIP" to the CTYPE in the FITS header or the WCS object.

                 [astropy.wcs.wcs]
- IDCTAB: Distortion model from row 35 for chip 1 : F814W
['id7307xfq_flc.fits']
current_wcs = fits.getval(filename, 'WCSNAME', ext=('SCI', 1))

print(current_wcs)
IDC_2731450pi

5. Inspecting alignment (optional)#

While the solutions should improve the astrometry of the images, they may not have perfect absolute astrometry. To check the quality of the absolute astrometry. To do this, we can overplot the positions of the Gaia sources on the images. If the absolute astrometry is correct, the Gaia positions will project on top of the sources in the images. The WCS solutions that contain ‘FIT-GAIA’ in the WCSNAME should have the closest alignment, while the GSC-240 and baseline IDC solution will likely have small offsets.

We first need to get a listing of the Gaia sources:

ast_tbl = generate_astrometric_catalog('id7307xfq_flc.fits', output=True) 
ast_tbl
Table length=2230
RADECmagobjID
float64float64float64int64
80.5730899119131-67.9474991750782--4658741306468400256
80.5439170969378-67.9438011573397--4658741370926206336
80.5924054598397-67.9544180247475--4658741306468435328
80.5214509397304-67.9429440875399--4658741581346201600
80.5087676329488-67.964893769999221.593734658741169049735680
80.5396243528847-67.935249394057221.541214658741478269158016
80.5510482118061-67.970306515029521.414514658740962871024768
80.6007478478036-67.951098819913121.335244658741405311718400
80.5812549526072-67.951742421404521.244634658741302232469248
80.5353526051586-67.957380575200721.23774658741340848432768
............
80.585738596849-67.946741792724813.899224658741409567587072
80.5264460461267-67.951103844699513.813264658741340848070272
80.4472721687584-67.927997150333613.509864658741615725905024
80.5312351802869-67.946027354676313.484654658741370889602688
80.5742154420049-67.952569054206913.293134658741306488369408
80.5778068165484-67.955536433710113.17664658741306488372736
80.4911693176135-67.940433863203513.060154658741547006462976
80.5158350687302-67.924681408944912.713754658741684445420032
80.5718868285313-67.949162528372212.012824658741370886084992
80.4448429583895-67.945115583505211.777744658741233447131136

We then need the WCS of the images, to project the Gaia positions onto the image coordinate frame.

hdu = fits.open(filename)
w = WCS(hdu['SCI', 1].header, hdu)
data = hdu['SCI', 1].data
x, y = w.all_world2pix(np.array([ast_tbl['RA'], ast_tbl['DEC']]).T, 0).T
fig = plt.figure(figsize=(10, 5))
ax = plt.subplot(projection=w) # matplotlib has support for axes using WCS projections!

ax.imshow(data, origin='lower',
          norm=ImageNormalize(data, interval=PercentileInterval(99.65), stretch=LogStretch()))
ax.coords.grid(True, color='white', ls=':', alpha=.6)
ax.autoscale(False)
ax.scatter(x, y, edgecolors='r', facecolor=None, alpha=.8)
<matplotlib.collections.PathCollection at 0x7ff53e410810>

The original (only IDC tab) WCS will likely have an offset between the Gaia positions and the sources. The GSC-240 solution offset is generally smaller, while any of the GAIA-FIT solutions should be well under a pixel. Using the code in section 3, the offsets can be seen for each available WCS.

6. Changing the WCS of drizzled images#

Because the drizzling process is directly affected by the WCS’s of the input images, the WCS of the drizzled image cannot be changed as simply as shown above for FLC images. To use an astrometric solution (other than the one applied to the FLT/FLC at the time of drizzling), the images will have to be re-drizzled after activating the desired WCS in the FLT/FLC images.

NOTE: The images input to astrodrizzle should use the same WCS solution, or the drizzling process will produce poor results.

In order to get the same name for the drizzled file, we can simply run astrodrizzle on the association (asn) file we downloaded before.

astrodrizzle.AstroDrizzle('id7307030_asn.fits', mdriztab=True, build=True, clean=True, preserve=False)
Setting up logfile :  astrodrizzle.log
AstroDrizzle log file: astrodrizzle.log
AstroDrizzle Version 3.5.1 started at: 16:53:39.346 (19/04/2024)

==== Processing Step  Initialization  started at  16:53:39.34 (19/04/2024)

Reading in MDRIZTAB parameters for 4 files
- MDRIZTAB: AstroDrizzle parameters read from row 3.
WCS Keywords

Number of WCS axes: 2
CTYPE : 'RA---TAN'  'DEC--TAN'  
CRVAL : 80.52478377106357  -67.94279218580297  
CRPIX : 2076.5  2237.5  
CD1_1 CD1_2  : 1.0380442337376844e-05  3.656319909454076e-06  
CD2_1 CD2_2  : 3.656319909454076e-06  -1.0380442337376844e-05  
NAXIS : 4153  4475
********************************************************************************
*
*  Estimated memory usage:  up to 1107 Mb.
*  Output image size:       4153 X 4475 pixels. 
*  Output image file:       ~ 212 Mb. 
*  Cores available:         4
*
********************************************************************************
==== Processing Step Initialization finished at 16:53:40.572 (19/04/2024)
==== Processing Step  Static Mask  started at  16:53:40.575 (19/04/2024)

==== Processing Step Static Mask finished at 16:53:41.575 (19/04/2024)
==== Processing Step  Subtract Sky  started at  16:53:41.576 (19/04/2024)

***** skymatch started on 2024-04-19 16:53:41.813791
      Version 1.0.9

'skymatch' task will apply computed sky differences to input image file(s).

NOTE: Computed sky values WILL NOT be subtracted from image data ('subtractsky'=False).
'MDRIZSKY' header keyword will represent sky value *computed* from data.

-----  User specified keywords:  -----
       Sky Value Keyword:  'MDRIZSKY'
       Data Units Keyword: 'BUNIT'


-----  Input file list:  -----

   **  Input image: 'id7307xfq_flc.fits'
       EXT: 'SCI',1;	MASK: id7307xfq_skymatch_mask_sci1.fits[0]
       EXT: 'SCI',2;	MASK: id7307xfq_skymatch_mask_sci2.fits[0]

   **  Input image: 'id7307xhq_flc.fits'
       EXT: 'SCI',1;	MASK: id7307xhq_skymatch_mask_sci1.fits[0]
       EXT: 'SCI',2;	MASK: id7307xhq_skymatch_mask_sci2.fits[0]

   **  Input image: 'id7307xlq_flc.fits'
       EXT: 'SCI',1;	MASK: id7307xlq_skymatch_mask_sci1.fits[0]
       EXT: 'SCI',2;	MASK: id7307xlq_skymatch_mask_sci2.fits[0]

   **  Input image: 'id7307xpq_flc.fits'
       EXT: 'SCI',1;	MASK: id7307xpq_skymatch_mask_sci1.fits[0]
       EXT: 'SCI',2;	MASK: id7307xpq_skymatch_mask_sci2.fits[0]

-----  Sky statistics parameters:  -----
       statistics function: 'median'
       lower = -100.0
       upper = None
       nclip = 5
       lsigma = 4.0
       usigma = 4.0
       binwidth = 0.10000000149011612

-----  Data->Brightness conversion parameters for input files:  -----

   *   Image: id7307xfq_flc.fits
       EXT = 'SCI',1
             Data units type: COUNTS
             EXPTIME: 697.0 [s]
             Conversion factor (data->brightness):  0.9139832998392358
       EXT = 'SCI',2
             Data units type: COUNTS
             EXPTIME: 697.0 [s]
             Conversion factor (data->brightness):  0.9139832998392358

   *   Image: id7307xhq_flc.fits
       EXT = 'SCI',1
             Data units type: COUNTS
             EXPTIME: 697.0 [s]
             Conversion factor (data->brightness):  0.9139832998392358
       EXT = 'SCI',2
             Data units type: COUNTS
             EXPTIME: 697.0 [s]
             Conversion factor (data->brightness):  0.9139832998392358

   *   Image: id7307xlq_flc.fits
       EXT = 'SCI',1
             Data units type: COUNTS
             EXPTIME: 697.0 [s]
             Conversion factor (data->brightness):  0.9139832998392358
       EXT = 'SCI',2
             Data units type: COUNTS
             EXPTIME: 697.0 [s]
             Conversion factor (data->brightness):  0.9139832998392358

   *   Image: id7307xpq_flc.fits
       EXT = 'SCI',1
             Data units type: COUNTS
             EXPTIME: 441.0 [s]
             Conversion factor (data->brightness):  1.4445495691336674
       EXT = 'SCI',2
             Data units type: COUNTS
             EXPTIME: 441.0 [s]
             Conversion factor (data->brightness):  1.4445495691336674


-----  Computing sky values requested image extensions (detector chips):  -----

   *   Image:   'id7307xfq_flc.fits['SCI',1,2]'  --  SKY = 33.16146072933555 (brightness units)
       Sky change (data units):
      - EXT = 'SCI',1   delta(MDRIZSKY) = 36.2823   NEW MDRIZSKY = 36.2823
      - EXT = 'SCI',2   delta(MDRIZSKY) = 36.2823   NEW MDRIZSKY = 36.2823
   *   Image:   'id7307xhq_flc.fits['SCI',1,2]'  --  SKY = 23.675934355626346 (brightness units)
       Sky change (data units):
      - EXT = 'SCI',1   delta(MDRIZSKY) = 25.9041   NEW MDRIZSKY = 25.9041
      - EXT = 'SCI',2   delta(MDRIZSKY) = 25.9041   NEW MDRIZSKY = 25.9041
   *   Image:   'id7307xlq_flc.fits['SCI',1,2]'  --  SKY = 23.78707573459735 (brightness units)
       Sky change (data units):
      - EXT = 'SCI',1   delta(MDRIZSKY) = 26.0257   NEW MDRIZSKY = 26.0257
      - EXT = 'SCI',2   delta(MDRIZSKY) = 26.0257   NEW MDRIZSKY = 26.0257
   *   Image:   'id7307xpq_flc.fits['SCI',1,2]'  --  SKY = 24.23146985119446 (brightness units)
       Sky change (data units):
      - EXT = 'SCI',1   delta(MDRIZSKY) = 16.7744   NEW MDRIZSKY = 16.7744
      - EXT = 'SCI',2   delta(MDRIZSKY) = 16.7744   NEW MDRIZSKY = 16.7744
***** skymatch ended on 2024-04-19 16:53:44.002033
TOTAL RUN TIME: 0:00:02.188242
==== Processing Step Subtract Sky finished at 16:53:44.24 (19/04/2024)
==== Processing Step  Separate Drizzle  started at  16:53:44.24 (19/04/2024)

WCS Keywords

Number of WCS axes: 2
CTYPE : 'RA---TAN'  'DEC--TAN'  
CRVAL : 80.52478377106357  -67.94279218580297  
CRPIX : 2076.5  2237.5  
CD1_1 CD1_2  : 1.0380442337376844e-05  3.656319909454076e-06  
CD2_1 CD2_2  : 3.656319909454076e-06  -1.0380442337376844e-05  
NAXIS : 4153  4475
-Generating simple FITS output: id7307xfq_single_sci.fits
-Generating simple FITS output: id7307xhq_single_sci.fits
-Generating simple FITS output: id7307xlq_single_sci.fits
-Generating simple FITS output: id7307xpq_single_sci.fits
Writing out image to disk: id7307xfq_single_sci.fits
Writing out image to disk: id7307xhq_single_sci.fits
Writing out image to disk: id7307xlq_single_sci.fits
Writing out image to disk: id7307xpq_single_sci.fits
Writing out image to disk: id7307xfq_single_wht.fits
Writing out image to disk: id7307xhq_single_wht.fits
Writing out image to disk: id7307xpq_single_wht.fits
Writing out image to disk: id7307xlq_single_wht.fits
==== Processing Step Separate Drizzle finished at 16:53:46.61 (19/04/2024)
==== Processing Step  Create Median  started at  16:53:46.613 (19/04/2024)

reference sky value for image 'id7307xfq_flc.fits' is 36.2823486328125
reference sky value for image 'id7307xhq_flc.fits' is 25.90412139892578
reference sky value for image 'id7307xlq_flc.fits' is 26.02572250366211
reference sky value for image 'id7307xpq_flc.fits' is 16.774412155151367
Saving output median image to: 'id7307030_med.fits'
==== Processing Step Create Median finished at 16:53:48.95 (19/04/2024)
==== Processing Step  Blot  started at  16:53:48.956 (19/04/2024)

    Blot: creating blotted image:  id7307xfq_flc.fits[sci,1]
Using default C-based coordinate transformation...
-Generating simple FITS output: id7307xfq_sci1_blt.fits
Writing out image to disk: id7307xfq_sci1_blt.fits
    Blot: creating blotted image:  id7307xfq_flc.fits[sci,2]
Using default C-based coordinate transformation...
-Generating simple FITS output: id7307xfq_sci2_blt.fits
Writing out image to disk: id7307xfq_sci2_blt.fits
    Blot: creating blotted image:  id7307xhq_flc.fits[sci,1]
Using default C-based coordinate transformation...
-Generating simple FITS output: id7307xhq_sci1_blt.fits
Writing out image to disk: id7307xhq_sci1_blt.fits
    Blot: creating blotted image:  id7307xhq_flc.fits[sci,2]
Using default C-based coordinate transformation...
-Generating simple FITS output: id7307xhq_sci2_blt.fits
Writing out image to disk: id7307xhq_sci2_blt.fits
    Blot: creating blotted image:  id7307xlq_flc.fits[sci,1]
Using default C-based coordinate transformation...
-Generating simple FITS output: id7307xlq_sci1_blt.fits
Writing out image to disk: id7307xlq_sci1_blt.fits
    Blot: creating blotted image:  id7307xlq_flc.fits[sci,2]
Using default C-based coordinate transformation...
-Generating simple FITS output: id7307xlq_sci2_blt.fits
Writing out image to disk: id7307xlq_sci2_blt.fits
    Blot: creating blotted image:  id7307xpq_flc.fits[sci,1]
Using default C-based coordinate transformation...
-Generating simple FITS output: id7307xpq_sci1_blt.fits
Writing out image to disk: id7307xpq_sci1_blt.fits
    Blot: creating blotted image:  id7307xpq_flc.fits[sci,2]
Using default C-based coordinate transformation...
-Generating simple FITS output: id7307xpq_sci2_blt.fits
Writing out image to disk: id7307xpq_sci2_blt.fits
==== Processing Step Blot finished at 16:53:58.068 (19/04/2024)
==== Processing Step  Driz_CR  started at  16:53:58.070 (19/04/2024)

Creating output: id7307xfq_sci1_crmask.fits
Creating output: id7307xhq_sci1_crmask.fits
Creating output: id7307xlq_sci1_crmask.fits
Creating output: id7307xpq_sci1_crmask.fits
Creating output: id7307xfq_sci2_crmask.fits
Creating output: id7307xhq_sci2_crmask.fits
Creating output: id7307xlq_sci2_crmask.fits
Creating output: id7307xpq_sci2_crmask.fits
==== Processing Step Driz_CR finished at 16:54:01.462 (19/04/2024)
==== Processing Step  Final Drizzle  started at  16:54:01.474 (19/04/2024)

WCS Keywords

Number of WCS axes: 2
CTYPE : 'RA---TAN'  'DEC--TAN'  
CRVAL : 80.52478377106357  -67.94279218580297  
CRPIX : 2076.5  2237.5  
CD1_1 CD1_2  : 1.0380442337376844e-05  3.656319909454076e-06  
CD2_1 CD2_2  : 3.656319909454076e-06  -1.0380442337376844e-05  
NAXIS : 4153  4475
-Generating multi-extension output file:  id7307030_drc.fits
Writing out to disk: id7307030_drc.fits
==== Processing Step Final Drizzle finished at 16:54:16.555 (19/04/2024)

AstroDrizzle Version 3.5.1 is finished processing at 16:54:16.556 (19/04/2024).



   --------------------          --------------------
                   Step          Elapsed time
   --------------------          --------------------

         Initialization          1.2245 sec.
            Static Mask          1.0001 sec.
           Subtract Sky          2.6702 sec.
       Separate Drizzle          2.3646 sec.
          Create Median          2.3417 sec.
                   Blot          9.1122 sec.
                Driz_CR          3.3920 sec.
          Final Drizzle          15.0805 sec.
   ====================          ====================
                  Total          37.1858 sec.

Trailer file written to:  astrodrizzle.log

About this Notebook#

Updated: June 12, 2023 by A. O'Connor -- STScI WFC3