HST Python Tutorial: Hubble Catalog of Variables light curve period analysis

Author: Deborah Baines, Juan-Carlos Segovia, Raúl Gutierrez

This use case is partially based on the paper by Brown et. al. 2004, AJ 127, 2738 'RR Lyrae Stars in the Andromeda Halo from Deep Imaging with the Advanced Camera for Surveys'.

Workflow:

  1. Query the Hubble Catalog of Variables (HCV) for an RR Lyrae in the Halo of M31 (matchid = 106259089).
  2. Plot the light curves as a function of observation date.
  3. Compute the Lomb-Scargle periodogram of the light curve in one band.
  4. Phase and plot the light curve.

Additional:

  1. Perform a cone search around the RR Lyrae star and retrieve the HCV sources.
  2. Download an associated HLA image.
  3. Plot these sources on an associated HLA image and plot the RR Lyrae star in a different colour.
  4. For the RR Lyrae star, perform a cutout around the star and show the images for the brightest and faintest magnitudes.
In [1]:
# Import the relevant modules
from astroquery.utils.tap.core import TapPlus
import numpy as np
from astropy.stats import LombScargle

%matplotlib inline
import matplotlib.pyplot as plt
from matplotlib.colors import LogNorm
from astropy.io import fits
from astropy import visualization

# suppress warnings
import warnings
warnings.filterwarnings('ignore')

Step 1. Query the Hubble Catalog of Variables (HCV) for an RR Lyrae in the Halo of M31

In this example, the RR Lyrae of interest is matchid = 106259089 (or V10 in Brown+ 2004).

In [2]:
# Call the HST TAP and print the available tables
hst = TapPlus(url="http://hst.esac.esa.int/tap-server/tap")
tables = hst.load_tables(only_names=True)
for table in (tables):
      print(table.get_qualified_name())
Created TAP+ (v1.0.1) - Connection:
	Host: hst.esac.esa.int
	Use HTTPS: False
	Port: 80
	SSL Port: 443
Retrieving tables...
Parsing tables...
Done.
public.public.dual
tap_schema.tap_schema.columns
tap_schema.tap_schema.key_columns
tap_schema.tap_schema.keys
tap_schema.tap_schema.schemas
tap_schema.tap_schema.tables
hsc_v2.hsc_v2.hubble_sc2
hsc_v2.hsc_v2.hubble_sc2_ra_dec
hsc.hsc.hubble_sc
hsc.hsc.hubble_sc_ra_dec
hcv.hcv.hcv
hcv.hcv.hsc_aux
hcv.hcv.mv_hcv_agg
ehst.ehst.artifact
ehst.ehst.energy
ehst.ehst.instrument
ehst.ehst.observation
ehst.ehst.obs_simple_obs_composite
ehst.ehst.plane
ehst.ehst.position
ehst.ehst.proposal
ehst.ehst.publication
ehst.ehst.publication_proposal
ehst.ehst.target
In [3]:
# Inspect the columns of the HCV table
hst = TapPlus(url="http://hst.esac.esa.int/tap-server/tap")
hcv_table = hst.load_table('hcv.hcv')
for column in (hcv_table.columns):
    print(column.name)
Created TAP+ (v1.0.1) - Connection:
	Host: hst.esac.esa.int
	Use HTTPS: False
	Port: 80
	SSL Port: 443
Retrieving table 'hcv.hcv'
Parsing table 'hcv.hcv'...
Done.
chi2
ci_d
ci_v
d_d
dec
d_v
expert_class
filter
groupid
lightcurve_cm
lightcurve_d
lightcurve_e
lightcurve_i
lightcurve_m
lightcurve_r
mad
matchid
pipeline_class
ra

Query the HCV via an Astronomical Data Query Language (ADQL) query. See here for more information and examples of ADQL queries.

In [4]:
# Query the HCV for the RR Lyrae variable star with matchid = 106259089 and for the filter ACS_F814W:
job1 = hst.launch_job_async("SELECT * FROM hcv.hcv WHERE matchid = 106259089 AND filter LIKE '%ACS_F814W%'")
hcv_f814w = job1.get_results()
job1.get_data()

# Brings back a table of 33 rows. 
Query finished.
Out[4]:
Table masked=True length=33
chi2ci_dci_vd_ddecd_vexpert_classfiltergroupidlightcurve_cmlightcurve_dlightcurve_elightcurve_ilightcurve_mlightcurve_rmadmatchidpipeline_classra
daysdaysdegmilliarcsecmagdaysmagmagdeg
objectfloat64float64float64float64float64int32objectint32float64float64float64objectfloat64boolfloat64int32int32float64
17.933235354997798152611.266382780161.001296281814575252611.2663827801640.6841659545898440.223488390445709231ACS_F814W104375625.402362485861752611.266382780160.052900001hst_9453_02_acs_wfc_f814w25.407801False0.16130864386038724106259089211.502689361572266
17.933235354997798152611.570404820610.992037057876586952611.5704048206140.6841659545898440.0291624087840318681ACS_F814W104375625.0791096643723552611.570404820610.0403hst_9453_04_acs_wfc_f814w25.0867False0.16130864386038724106259089211.502689361572266
17.933235354997798152612.095017050861.081481456756591852612.0950170508640.6841659545898442.1038370132446291ACS_F814W104375625.11924232593476752612.095017050860.041900001hst_9453_06_acs_wfc_f814w25.120701False0.16130864386038724106259089211.502689361572266
17.933235354997798152614.0961839512461.12259256839752252614.09618395124640.6841659545898446.9310293197631841ACS_F814W104375625.25382478312785452614.0961839512460.047699999hst_9453_08_acs_wfc_f814w25.253False0.16130864386038724106259089211.502689361572266
17.933235354997798152614.70643490391.002592563629150452614.706434903940.6841659545898443.07375049591064451ACS_F814W104375625.4067148910368152614.70643490390.052299999hst_9453_10_acs_wfc_f814w25.4039False0.16130864386038724106259089211.502689361572266
17.933235354997798152615.440509160981.110092520713806252615.4405091609840.6841659545898446.406048297882081ACS_F814W104375625.35687893707330852615.440509160980.0526hst_9453_12_acs_wfc_f814w25.353399False0.16130864386038724106259089211.502689361572266
17.933235354997798152616.097702319271.07046294212341352616.0977023192740.6841659545898441.06944799423217771ACS_F814W104375625.26406328963733552616.097702319270.047499999hst_9453_14_acs_wfc_f814w25.261False0.16130864386038724106259089211.502689361572266
17.933235354997798152616.441626018381.027592539787292552616.4416260183840.6841659545898440.12642437219619751ACS_F814W104375625.200471413063752616.441626018380.044199999hst_9453_16_acs_wfc_f814w25.197001False0.16130864386038724106259089211.502689361572266
17.933235354997798152618.309102876110.960462927818298352618.3091028761140.6841659545898441.11071443557739261ACS_F814W104375624.90798905907040652618.309102876110.034299999hst_9453_20_acs_wfc_f814w24.905199False0.16130864386038724106259089211.502689361572266
.........................................................
17.933235354997798152634.5345427093561.024814724922180252634.53454270935640.6841659545898441.07935798168182371ACS_F814W104375625.2978005780971452634.5345427093560.048900001hst_9453_48_acs_wfc_f814w25.296False0.16130864386038724106259089211.502689361572266
17.933235354997798152636.5356654955540.939629614353179952636.53566549555440.6841659545898441.77265870571136471ACS_F814W104375625.3486746516974952636.5356654955540.051899999hst_9453_50_acs_wfc_f814w25.3444False0.16130864386038724106259089211.502689361572266
17.933235354997798152639.6323208287360.951018512248992952639.63232082873640.6841659545898441.1603841781616211ACS_F814W104375624.90712763388853552639.6323208287360.034200002hst_9453_42_acs_wfc_f814w24.9067False0.16130864386038724106259089211.502689361572266
17.933235354997798152644.206267519621.000648140907287652644.2062675196240.6841659545898441.35766339302062991ACS_F814W104375625.38674118539111652644.206267519620.051899999hst_9453_54_acs_wfc_f814w25.3859False0.16130864386038724106259089211.502689361572266
17.933235354997798152644.3396693044341.069074153900146552644.33966930443440.6841659545898441.63591969013214111ACS_F814W104375625.0614850567054652644.3396693044340.041299999hst_9453_52_acs_wfc_f814w25.0674False0.16130864386038724106259089211.502689361572266
17.933235354997798152646.1406310393941.016481518745422452646.14063103939440.6841659545898441.00268948078155521ACS_F814W104375625.35086045058249552646.1406310393940.051100001hst_9453_56_acs_wfc_f814w25.354799False0.16130864386038724106259089211.502689361572266
17.933235354997798152646.274033803030.995092570781707852646.2740338030340.6841659545898441.41513109207153321ACS_F814W104375625.37754195252202652646.274033803030.052299999hst_9453_57_acs_wfc_f814w25.374701False0.16130864386038724106259089211.502689361572266
17.933235354997798152646.4074425057040.936851918697357252646.40744250570440.6841659545898443.72544884681701661ACS_F814W104375625.00362034531078252646.4074425057040.037700001hst_9453_58_acs_wfc_f814w24.999001False0.16130864386038724106259089211.502689361572266
17.933235354997798152648.341811578720.981203734874725352648.3418115787240.6841659545898441.51270258426666261ACS_F814W104375625.43480971450975452648.341811578720.054200001hst_9453_60_acs_wfc_f814w25.4345False0.16130864386038724106259089211.502689361572266
17.933235354997798152650.409601010381.060648083686828652650.4096010103840.6841659545898443.39907932281494141ACS_F814W104375625.4911282604177152650.409601010380.057hst_9453_59_acs_wfc_f814w25.488199False0.16130864386038724106259089211.502689361572266
In [5]:
# Query the HCV for the RR Lyrae variable star with matchid = 106259089 and for the filter ACS_F606W:
job2 = hst.launch_job_async("SELECT * FROM hcv.hcv WHERE matchid = 106259089 AND filter LIKE '%ACS_F606W%'")
hcv_f606w = job2.get_results()
job2.get_data()

# Brings back a table of 29 rows. 
Query finished.
Out[5]:
Table masked=True length=29
chi2ci_dci_vd_ddecd_vexpert_classfiltergroupidlightcurve_cmlightcurve_dlightcurve_elightcurve_ilightcurve_mlightcurve_rmadmatchidpipeline_classra
daysdaysdegmilliarcsecmagdaysmagmagdeg
objectfloat64float64float64float64float64int32objectint32float64float64float64objectfloat64boolfloat64int32int32float64
60.059827127724410952610.1618170798761.053240776062011752610.16181707987640.6841659545898441.8768533468246461ACS_F606W104375625.19461088502044552610.1618170798760.028000001hst_9453_01_acs_wfc_f606w25.195101False0.16173090767108178106259089211.502689361572266
60.059827127724410952611.436961702541.08759260177612352611.4369617025440.6841659545898441.95862436294555661ACS_F606W104375624.94958284079232852611.436961702540.023600001hst_9453_03_acs_wfc_f606w24.9569False0.16173090767108178106259089211.502689361572266
60.059827127724410952611.7038424361960.992314815521240252611.70384243619640.6841659545898440.83185887336730961ACS_F606W104375625.38688854987701452611.7038424361960.032900002hst_9453_05_acs_wfc_f606w25.395599False0.16173090767108178106259089211.502689361572266
60.059827127724410952612.336064665580.929907381534576452612.3360646655840.6841659545898443.6721665859222411ACS_F606W104375625.35867522341222752612.336064665580.031500001hst_9453_07_acs_wfc_f606w25.356199False0.16173090767108178106259089211.502689361572266
60.059827127724410952614.305023056690.923611104488372852614.3050230566940.6841659545898442.78377890586853031ACS_F606W104375625.12260718461594452614.305023056690.0263hst_9453_09_acs_wfc_f606w25.119301False0.16173090767108178106259089211.502689361572266
60.059827127724410952615.096898079851.026944398880004952615.0968980798540.6841659545898442.86722636222839361ACS_F606W104375625.33622617642052852615.096898079850.031399999hst_9453_11_acs_wfc_f606w25.337601False0.16173090767108178106259089211.502689361572266
60.059827127724410952615.7074593936560.974722266197204652615.70745939365640.6841659545898443.24353027343751ACS_F606W104375625.2367099133212152615.7074593936560.028200001hst_9453_13_acs_wfc_f606w25.232201False0.16173090767108178106259089211.502689361572266
60.059827127724410952616.3066954745450.924444437026977552616.30669547454540.6841659545898442.25607609748840331ACS_F606W104375625.02341278419648852616.3066954745450.023800001hst_9453_15_acs_wfc_f606w25.0245False0.16173090767108178106259089211.502689361572266
60.059827127724410952616.575115466491.01055562496185352616.5751154664940.6841659545898441.66252791881561281ACS_F606W104375625.45367185361612552616.575115466490.034400001hst_9453_17_acs_wfc_f606w25.449301False0.16173090767108178106259089211.502689361572266
.........................................................
60.059827127724410952632.0991954768541.045092582702636752632.09919547685440.6841659545898441.19538426399230961ACS_F606W104375625.0366862308916852632.0991954768540.0242hst_9453_39_acs_wfc_f606w25.038799False0.16173090767108178106259089211.502689361572266
60.059827127724410952632.399872502310.970092654228210452632.3998725023140.6841659545898440.86093127727508541ACS_F606W104375625.43949251115212552632.399872502310.033799998hst_9453_43_acs_wfc_f606w25.4391False0.16173090767108178106259089211.502689361572266
60.059827127724410952632.533292667940.938240706920623852632.5332926679440.6841659545898443.52722311019897461ACS_F606W104375625.6116528309462752632.533292667940.038899999hst_9453_45_acs_wfc_f606w25.609699False0.16173090767108178106259089211.502689361572266
60.059827127724410952633.533946585610.993888914585113552633.5339465856140.6841659545898442.11308693885803221ACS_F606W104375625.1278540890698652633.533946585610.0261hst_9453_47_acs_wfc_f606w25.129101False0.16173090767108178106259089211.502689361572266
60.059827127724410952636.402268433940.924629628658294752636.4022684339440.6841659545898442.826681375503541ACS_F606W104375625.2520988846812552636.402268433940.0287hst_9453_49_acs_wfc_f606w25.2523False0.16173090767108178106259089211.502689361572266
60.059827127724410952636.74064234971.194999933242797952636.740642349740.6841659545898444.1030626296997071ACS_F606W104375625.44503801472873852636.74064234970.037300002hst_9453_51_acs_wfc_f606w25.437799False0.16173090767108178106259089211.502689361572266
60.059827127724410952640.404340693260.973796308040618952640.4043406932640.6841659545898442.47601652145385741ACS_F606W104375625.1175449726348352640.404340693260.0263hst_9453_41_acs_wfc_f606w25.1166False0.16173090767108178106259089211.502689361572266
60.059827127724410952644.4730904919561.004814743995666552644.47309049195640.6841659545898440.46668332815170291ACS_F606W104375625.0446423963979352644.4730904919560.024499999hst_9453_53_acs_wfc_f606w25.040501False0.16173090767108178106259089211.502689361572266
60.059827127724410952650.241828969911.00879621505737352650.2418289699140.6841659545898443.29742527008056641ACS_F606W104375625.4979570840916152650.241828969910.036200002hst_9453_55_acs_wfc_f606w25.496099False0.16173090767108178106259089211.502689361572266
60.059827127724410955204.290988179390.948888838291168255204.2909881793940.6841659545898444.49397277832031251ACS_F606W104375625.0082503627167555204.290988179390.0337hst_11684_04_acs_wfc_f606w25.008699False0.16173090767108178106259089211.502689361572266

The above steps can also be performed using the ESA_Hubble astroquery module. Currently this module can be downloaded from the dev version of astroquery, details here.

The ESA_Hubble module should be available in astropy version 4.0 onwards. More details can be found here.

In [6]:
# Perform exactly the same query as above, but this time using the astroquery.esa_hubble module

# Import ESAHubble from astroquery.esa_hubble
from astroquery.esa_hubble import ESAHubble

job = ESAHubble.query_hst_tap("SELECT * FROM hcv.hcv WHERE matchid = 106259089 AND filter LIKE '%ACS_F606W%'")
hcv_f606w = job.get_results()
job.get_data()
Created TAP+ (v1.0.1) - Connection:
	Host: hst.esac.esa.int
	Use HTTPS: False
	Port: 80
	SSL Port: 443
Out[6]:
Table masked=True length=29
chi2ci_dci_vd_ddecd_vexpert_classfiltergroupidlightcurve_cmlightcurve_dlightcurve_elightcurve_ilightcurve_mlightcurve_rmadmatchidpipeline_classra
daysdaysdegmilliarcsecmagdaysmagmagdeg
objectfloat64float64float64float64float64int32objectint32float64float64float64objectfloat64boolfloat64int32int32float64
60.059827127724410952610.1618170798761.053240776062011752610.16181707987640.6841659545898441.8768533468246461ACS_F606W104375625.19461088502044552610.1618170798760.028000001hst_9453_01_acs_wfc_f606w25.195101False0.16173090767108178106259089211.502689361572266
60.059827127724410952611.436961702541.08759260177612352611.4369617025440.6841659545898441.95862436294555661ACS_F606W104375624.94958284079232852611.436961702540.023600001hst_9453_03_acs_wfc_f606w24.9569False0.16173090767108178106259089211.502689361572266
60.059827127724410952611.7038424361960.992314815521240252611.70384243619640.6841659545898440.83185887336730961ACS_F606W104375625.38688854987701452611.7038424361960.032900002hst_9453_05_acs_wfc_f606w25.395599False0.16173090767108178106259089211.502689361572266
60.059827127724410952612.336064665580.929907381534576452612.3360646655840.6841659545898443.6721665859222411ACS_F606W104375625.35867522341222752612.336064665580.031500001hst_9453_07_acs_wfc_f606w25.356199False0.16173090767108178106259089211.502689361572266
60.059827127724410952614.305023056690.923611104488372852614.3050230566940.6841659545898442.78377890586853031ACS_F606W104375625.12260718461594452614.305023056690.0263hst_9453_09_acs_wfc_f606w25.119301False0.16173090767108178106259089211.502689361572266
60.059827127724410952615.096898079851.026944398880004952615.0968980798540.6841659545898442.86722636222839361ACS_F606W104375625.33622617642052852615.096898079850.031399999hst_9453_11_acs_wfc_f606w25.337601False0.16173090767108178106259089211.502689361572266
60.059827127724410952615.7074593936560.974722266197204652615.70745939365640.6841659545898443.24353027343751ACS_F606W104375625.2367099133212152615.7074593936560.028200001hst_9453_13_acs_wfc_f606w25.232201False0.16173090767108178106259089211.502689361572266
60.059827127724410952616.3066954745450.924444437026977552616.30669547454540.6841659545898442.25607609748840331ACS_F606W104375625.02341278419648852616.3066954745450.023800001hst_9453_15_acs_wfc_f606w25.0245False0.16173090767108178106259089211.502689361572266
60.059827127724410952616.575115466491.01055562496185352616.5751154664940.6841659545898441.66252791881561281ACS_F606W104375625.45367185361612552616.575115466490.034400001hst_9453_17_acs_wfc_f606w25.449301False0.16173090767108178106259089211.502689361572266
.........................................................
60.059827127724410952632.0991954768541.045092582702636752632.09919547685440.6841659545898441.19538426399230961ACS_F606W104375625.0366862308916852632.0991954768540.0242hst_9453_39_acs_wfc_f606w25.038799False0.16173090767108178106259089211.502689361572266
60.059827127724410952632.399872502310.970092654228210452632.3998725023140.6841659545898440.86093127727508541ACS_F606W104375625.43949251115212552632.399872502310.033799998hst_9453_43_acs_wfc_f606w25.4391False0.16173090767108178106259089211.502689361572266
60.059827127724410952632.533292667940.938240706920623852632.5332926679440.6841659545898443.52722311019897461ACS_F606W104375625.6116528309462752632.533292667940.038899999hst_9453_45_acs_wfc_f606w25.609699False0.16173090767108178106259089211.502689361572266
60.059827127724410952633.533946585610.993888914585113552633.5339465856140.6841659545898442.11308693885803221ACS_F606W104375625.1278540890698652633.533946585610.0261hst_9453_47_acs_wfc_f606w25.129101False0.16173090767108178106259089211.502689361572266
60.059827127724410952636.402268433940.924629628658294752636.4022684339440.6841659545898442.826681375503541ACS_F606W104375625.2520988846812552636.402268433940.0287hst_9453_49_acs_wfc_f606w25.2523False0.16173090767108178106259089211.502689361572266
60.059827127724410952636.74064234971.194999933242797952636.740642349740.6841659545898444.1030626296997071ACS_F606W104375625.44503801472873852636.74064234970.037300002hst_9453_51_acs_wfc_f606w25.437799False0.16173090767108178106259089211.502689361572266
60.059827127724410952640.404340693260.973796308040618952640.4043406932640.6841659545898442.47601652145385741ACS_F606W104375625.1175449726348352640.404340693260.0263hst_9453_41_acs_wfc_f606w25.1166False0.16173090767108178106259089211.502689361572266
60.059827127724410952644.4730904919561.004814743995666552644.47309049195640.6841659545898440.46668332815170291ACS_F606W104375625.0446423963979352644.4730904919560.024499999hst_9453_53_acs_wfc_f606w25.040501False0.16173090767108178106259089211.502689361572266
60.059827127724410952650.241828969911.00879621505737352650.2418289699140.6841659545898443.29742527008056641ACS_F606W104375625.4979570840916152650.241828969910.036200002hst_9453_55_acs_wfc_f606w25.496099False0.16173090767108178106259089211.502689361572266
60.059827127724410955204.290988179390.948888838291168255204.2909881793940.6841659545898444.49397277832031251ACS_F606W104375625.0082503627167555204.290988179390.0337hst_11684_04_acs_wfc_f606w25.008699False0.16173090767108178106259089211.502689361572266

Step 2. Plot the light curves as a function of observation date

In [7]:
#Plotting the light curves (note, ignoring the one F606W value at MJD = 55204.29)
x = hcv_f814w['lightcurve_d']
y = hcv_f814w['lightcurve_cm']
yerr = hcv_f814w['lightcurve_e']
x2 = hcv_f606w['lightcurve_d']
y2 = hcv_f606w['lightcurve_cm']
yerr2 = hcv_f606w['lightcurve_e']


plt.figure(figsize=(8, 8))
plt.scatter(x, y, color='g', alpha=0.5)
plt.errorbar(x, y, yerr, fmt='o', color='g', alpha=0.5)
plt.scatter(x2, y2, color='b', alpha=0.5)
plt.errorbar(x2, y2, yerr2, fmt='o', color='b', alpha=0.5)
plt.xlim(52600.0, 52660.0)
plt.ylim(25.7, 24.7)  # flip the y axis
plt.xlabel('MJD (days)')
plt.ylabel('Corrected Magnitude')
plt.legend(["F814W", "F606W"])
plt.show()

Step 3. Compute the Lomb-Scargle periodogram of the light curve in one band

Generate a periodgram using the Astropy 'LombScargle' function and obtain the period based on the best frequency. More information can be found here.

In [8]:
# For the ACS_F814W filter:
hcv_f814w['lightcurve_d'].unit = None
hcv_f814w['lightcurve_cm'].unit = None
hcv_f814w['lightcurve_e'].unit = None

#generate periodogram
frequency, power = LombScargle(hcv_f814w['lightcurve_d'], \
                               hcv_f814w['lightcurve_cm'], \
                               hcv_f814w['lightcurve_e']).autopower(minimum_frequency=1.0,\
                                                                        maximum_frequency=5.0)

best_frequency = frequency[np.argmax(power)]
best_power = power[np.argmax(power)]

plt.figure(figsize=(8, 8))
plt.scatter([best_frequency], [best_power], facecolors='none', edgecolors='r', s=80)
plt.plot(frequency, power)
plt.xlabel('Frequency')
plt.ylabel('Relative Power')

#print(best_frequency)
period=1/best_frequency
print("Best found period: " + str(period) + " days")
Best found period: 0.6874079029387833 days

This result compares well with Brown+ 2004, who found a period of 0.687 days.

Step 4. Phase and plot the light curve

In [9]:
phase = (hcv_f814w['lightcurve_d'] / period) % 1
plt.figure(figsize=(8, 8))
plt.axes().invert_yaxis()
plt.scatter(phase, hcv_f814w['lightcurve_cm'], color='b', alpha=0.5)
plt.errorbar(phase, hcv_f814w['lightcurve_cm'], hcv_f814w['lightcurve_e'], fmt='o', color='b', alpha=0.5)
plt.scatter(phase+1, hcv_f814w['lightcurve_cm'], color='b', alpha=0.5)
plt.errorbar(phase+1, hcv_f814w['lightcurve_cm'], hcv_f814w['lightcurve_e'], fmt='o', color='b', alpha=0.5)
plt.xlim(0.0, 2.0)
#plt.ylim(25.7, 24.7)  # flip the y axis
plt.xlabel('Phase')
plt.ylabel('Corrected Magnitude')
plt.show()

Check the results by increasing and decreasing the period:

In [10]:
from ipywidgets import widgets
from ipywidgets import interact

def fn(x):
    print("period=" + str(x))
    phase = (hcv_f814w['lightcurve_d'] / x) % 1
    #print(phase)
    plt.figure(figsize=(8, 8))
    plt.axes().invert_yaxis()
    plt.scatter(phase, hcv_f814w['lightcurve_cm'], color='b', alpha=0.3)
    plt.errorbar(phase, hcv_f814w['lightcurve_cm'], hcv_f814w['lightcurve_e'], fmt='o', color='b', alpha=0.3)
    plt.xlabel('Phase')
    plt.ylabel('Corrected Magnitude')
    plt.show()
#interact(fn, x=period)
#interact(fn, x=period)
max = (period + period*0.01)
min = (period - period*0.01)
interact(fn, x=widgets.FloatSlider(min=min,max=max,step=0.00005,value=period));

Additional Steps

Step 5. Perform a cone search around the RR Lyrae star and retrieve the HCV sources.

In [11]:
hst = TapPlus(url="http://hst.esac.esa.int/tap-server/tap")

# Performing a cone search of radius 3 arcminutes:
job3 = hst.launch_job_async("SELECT * FROM hcv.hcv \
WHERE 1=CONTAINS( \
  POINT('ICRS', ra, dec), \
  CIRCLE('ICRS', 11.50269, +40.68417, 0.05))")
hcv = job3.get_results()
job3.get_data()

# Returns 3335 rows. Note the number of rows is larger than the number of sources since the filter information
# and magnitudes (light curves) are all given in the one (flattened) table.
Created TAP+ (v1.0.1) - Connection:
	Host: hst.esac.esa.int
	Use HTTPS: False
	Port: 80
	SSL Port: 443
Query finished.
Out[11]:
Table masked=True length=3335
chi2ci_dci_vd_ddecd_vexpert_classfiltergroupidlightcurve_cmlightcurve_dlightcurve_elightcurve_ilightcurve_mlightcurve_rmadmatchidpipeline_classra
daysdaysdegmilliarcsecmagdaysmagmagdeg
objectfloat64float64float64float64float64int32objectint32float64float64float64objectfloat64boolfloat64int32int32float64
3.0962824081607549552611.266382780161.05999994277954152611.2663827801640.709297180175784.7542147636413572ACS_F814W104375624.55374005440375752611.266382780160.0266hst_9453_02_acs_wfc_f814w24.5581False0.0303590280431684898239091111.494104385375977
3.0962824081607549552614.70643490391.136851906776428252614.706434903940.709297180175783.10149598121643072ACS_F814W104375624.45488878959016452614.70643490390.0243hst_9453_10_acs_wfc_f814w24.451599False0.0303590280431684898239091111.494104385375977
3.0962824081607549552616.097702319271.104907393455505452616.0977023192740.709297180175787.8962106704711912ACS_F814W104375624.4769894544007652616.097702319270.0272hst_9453_14_acs_wfc_f814w24.477301False0.0303590280431684898239091111.494104385375977
3.0962824081607549552626.4900750995151.144259333610534752626.49007509951540.709297180175784.495592117309572ACS_F814W104375624.5059320938358552626.4900750995150.0363hst_9453_61_acs_wfc_f814w24.4995False0.0303590280431684898239091111.494104385375977
3.0962824081607549552631.399160670121.07481479644775452631.3991606701240.709297180175787.7905898094177252ACS_F814W104375624.50734848244392752631.399160670120.026000001hst_9453_38_acs_wfc_f814w24.5056False0.0303590280431684898239091111.494104385375977
3.0962824081607549552644.206267519620.959907412528991752644.2062675196240.709297180175787.8099374771118162ACS_F814W104375624.5901393109229952644.206267519620.0265hst_9453_54_acs_wfc_f814w24.590799False0.0303590280431684898239091111.494104385375977
3.0962824081607549552646.274033803031.06009256839752252646.2740338030340.709297180175788.6345300674438482ACS_F814W104375624.52668105269197752646.274033803030.026000001hst_9453_57_acs_wfc_f814w24.5263False0.0303590280431684898239091111.494104385375977
5.5547544157807822252611.266382780160.952777802944183352611.2663827801640.70800781250.77703523635864262ACS_F814W104375623.58419031536192352611.266382780160.012hst_9453_02_acs_wfc_f814w23.589199False0.02191107142884618585054530111.492891311645508
5.5547544157807822252611.570404820610.978981435298919752611.5704048206140.70800781250.481119632720947272ACS_F814W104375623.57759862781668452611.570404820610.012hst_9453_04_acs_wfc_f814w23.582899False0.02191107142884618585054530111.492891311645508
.........................................................
10.562089098221038752632.0991954768541.013518452644348152632.09919547685440.725997924804693.04637575149536131ACS_F606W104375625.91289287145371752632.0991954768540.0528hst_9453_39_acs_wfc_f606w25.9156False0.0996731868365259358227924111.4900484085083
10.562089098221038752632.399872502310.937592566013336252632.3998725023140.725997924804694.6410059928894041ACS_F606W104375625.90637907508303452632.399872502310.052000001hst_9453_43_acs_wfc_f606w25.907301False0.0996731868365259358227924111.4900484085083
10.562089098221038752632.533292667941.022870302200317452632.5332926679440.725997924804692.0210337638854981ACS_F606W104375625.5514746785629952632.533292667940.039000001hst_9453_45_acs_wfc_f606w25.5527False0.0996731868365259358227924111.4900484085083
10.562089098221038752633.533946585610.982500016689300552633.5339465856140.725997924804695.5439186096191411ACS_F606W104375625.90670978900192652633.533946585610.053399999hst_9453_47_acs_wfc_f606w25.908199False0.0996731868365259358227924111.4900484085083
10.562089098221038752636.402268433940.947777748107910252636.4022684339440.725997924804693.50235295295715331ACS_F606W104375625.89699469610533852636.402268433940.0524hst_9453_49_acs_wfc_f606w25.895599False0.0996731868365259358227924111.4900484085083
10.562089098221038752636.74064234970.932037055492401152636.740642349740.725997924804691.28331196308135991ACS_F606W104375625.71489849920540452636.74064234970.044hst_9453_51_acs_wfc_f606w25.7113False0.0996731868365259358227924111.4900484085083
10.562089098221038752640.404340693261.123888850212097252640.4043406932640.725997924804691.82470071315765381ACS_F606W104375625.90589964631957252640.404340693260.0526hst_9453_41_acs_wfc_f606w25.9074False0.0996731868365259358227924111.4900484085083
10.562089098221038752644.4730904919561.001203775405883852644.47309049195640.725997924804691.81076967716217041ACS_F606W104375625.79083626747543452644.4730904919560.047400001hst_9453_53_acs_wfc_f606w25.7946False0.0996731868365259358227924111.4900484085083
10.562089098221038752650.241828969911.036203622817993252650.2418289699140.725997924804694.15645551681518551ACS_F606W104375625.63003197672114652650.241828969910.041999999hst_9453_55_acs_wfc_f606w25.628099False0.0996731868365259358227924111.4900484085083
10.562089098221038755204.290988179390.998518526554107755204.2909881793940.725997924804695.12294721603393551ACS_F606W104375625.92066137873392555204.290988179390.078000002hst_11684_04_acs_wfc_f606w25.920601False0.0996731868365259358227924111.4900484085083

Step 6. Download an associated HLA image.

These steps require the ESA_Hubble astroquery module. Currently this module can be downloaded from the dev version of astroquery, details here.

The ESA_Hubble module should be available in astropy version 4.0 onwards. More details can be found here.

In [12]:
# The associated HLA images are found in the HCV column lightcurve_i:
print (hcv_f814w['lightcurve_i'])
       lightcurve_i      
-------------------------
hst_9453_02_acs_wfc_f814w
hst_9453_04_acs_wfc_f814w
hst_9453_06_acs_wfc_f814w
hst_9453_08_acs_wfc_f814w
hst_9453_10_acs_wfc_f814w
hst_9453_12_acs_wfc_f814w
hst_9453_14_acs_wfc_f814w
hst_9453_16_acs_wfc_f814w
hst_9453_20_acs_wfc_f814w
hst_9453_22_acs_wfc_f814w
                      ...
hst_9453_46_acs_wfc_f814w
hst_9453_48_acs_wfc_f814w
hst_9453_50_acs_wfc_f814w
hst_9453_42_acs_wfc_f814w
hst_9453_54_acs_wfc_f814w
hst_9453_52_acs_wfc_f814w
hst_9453_56_acs_wfc_f814w
hst_9453_57_acs_wfc_f814w
hst_9453_58_acs_wfc_f814w
hst_9453_60_acs_wfc_f814w
hst_9453_59_acs_wfc_f814w
Length = 33 rows
In [13]:
# Download a single image from the ESA Hubble Science Archive using the astroquery.esa_hubble module.

# A single observation has the prefix 'drz' (drizzle). Therefore the files to download are: 
# hst_9453_**_acs_wfc_f814w_drz.fits, where ** is a number

from astroquery.esa_hubble import ESAHubble
ESAHubble.get_artifact("hst_9453_02_acs_wfc_f814w_drz.fits")

image_file = "hst_9453_02_acs_wfc_f814w_drz.fits"
http://archives.esac.esa.int/ehst-sl-server/servlet/data-action?ARTIFACT_ID=hst_9453_02_acs_wfc_f814w_drz.fits
File hst_9453_02_acs_wfc_f814w_drz.fits downloaded to current directory
In [14]:
# Check the headers
hdu_list = fits.open(image_file)
hdu_list.info()
hdu_list[0].header
Filename: hst_9453_02_acs_wfc_f814w_drz.fits
No.    Name      Ver    Type      Cards   Dimensions   Format
  0  PRIMARY       1 PrimaryHDU     861   ()      
  1  SCI           1 ImageHDU        86   (5185, 5166)   float32   
  2  WHT           1 ImageHDU        46   (5185, 5166)   float32   
  3  CTX           1 ImageHDU        39   (5185, 5166)   int32   
  4  HDRTAB        1 BinTableHDU    631   8R x 311C   [9A, 3A, J, D, D, D, D, D, D, D, D, D, D, D, D, D, J, 3A, 9A, 7A, 18A, 4A, D, D, D, D, 3A, D, D, D, D, D, D, D, D, D, D, D, D, J, 8A, 23A, D, D, D, D, J, J, J, 8A, J, 23A, 9A, 19A, J, 4A, J, J, J, J, J, J, 23A, D, D, D, D, J, J, 3A, 3A, 4A, 4A, J, D, D, D, 3A, 1A, J, D, D, D, 13A, 3A, 4A, 4A, 12A, 12A, 23A, 8A, 23A, 10A, 10A, D, D, 3A, 3A, 23A, 4A, 8A, 7A, 23A, D, J, D, 6A, 9A, 8A, D, D, J, 4A, 18A, 3A, J, 7A, 5A, 3A, D, 13A, 8A, 4A, 3A, J, J, J, J, J, J, J, D, D, D, D, D, D, 3A, 1A, D, 23A, D, D, D, 3A, 23A, J, 1A, 3A, 1A, D, 3A, 6A, J, D, D, D, D, D, D, D, D, D, D, 23A, D, D, D, D, 3A, D, D, D, 1A, J, J, J, J, J, J, 23A, J, 5A, 7A, D, D, D, D, D, D, D, D, D, D, D, D, D, D, D, D, D, 13A, D, 24A, 23A, D, 1A, 1A, D, J, D, D, 1A, 1A, D, 4A, J, D, J, 8A, D, J, D, J, J, 23A, 23A, D, 8A, D, 29A, D, 3A, D, J, D, D, 3A, 6A, 5A, 2A, D, 3A, J, 1A, 1A, 1A, 1A, D, D, D, D, D, D, 4A, D, 4A, D, 4A, J, 4A, 3A, 1A, J, J, J, 1A, D, D, D, D, J, 3A, J, J, 6A, J, D, D, 11A, 1A, 1A, 3A, 8A, 1A, D, J, D, J, J, 5A, 4A, J, D, D, D, D, D, D, D, D, D, D, D, D, D, D, 8A, 8A, 3A, 3A]   
  5  EXP           1 ImageHDU         8   (5185, 5166)   float32   
Out[14]:
SIMPLE  =                    T / Fits standard                                  
BITPIX  =                   16 / Bits per pixel                                 
NAXIS   =                    0 / Number of axes                                 
EXTEND  =                    T / File may contain extensions                    
ORIGIN  = 'NOAO-IRAF FITS Image Kernel July 2003' / FITS file originator        
DATE    = '2017-08-23         ' / Date FITS file was generated                  
IRAF-TLM= '2017-08-23T16:02:22' / Time of last modification                     
COMMENT   FITS (Flexible Image Transport System) format is defined in 'Astronomy
COMMENT   and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H 
                                                                                
TELESCOP= 'HST'                / telescope used to acquire data                 
INSTRUME= 'ACS   '             / identifier for instrument used to acquire data 
                                                                                
              / DATA DESCRIPTION KEYWORDS                                       
                                                                                
IMAGETYP= 'EXT               ' / type of exposure identifier                    
PRIMESI = 'ACS   '             / instrument designated as prime                 
                                                                                
              / TARGET INFORMATION                                              
                                                                                
TARGNAME= 'NGC224-HALO                   ' / proposer's target name             
                                                                                
              / PROPOSAL INFORMATION                                            
                                                                                
PROPOSID=                 9453 / PEP proposal identifier                        
                                                                                
              / EXPOSURE INFORMATION                                            
                                                                                
SUNANGLE=           128.445786 / angle between sun and V1 axis                  
MOONANGL=           137.613449 / angle between moon and V1 axis                 
SUN_ALT =            24.114336 / altitude of the sun above Earth's limb         
FGSLOCK = 'FINE              ' / commanded FGS lock (FINE,COARSE,GYROS,UNKNOWN) 
GYROMODE= '3'                  / number of gyros scheduled, T=3+OBAD            
                                                                                
DATE-OBS= '2002-12-03'         / UT date of start of observation (yyyy-mm-dd)   
EXPSTART=   5.261119857568E+04 / exposure start time (Modified Julian Date)     
EXPEND  =       52611.33419003 / exposure end time (Modified Julian Date)       
EXPTIME =               5060.0 / exposure duration (seconds)--calculated        
TEXPTIME=               5060.0                                                  
EXPFLAG = 'NORMAL       '      / Exposure interruption indicator                
                                                                                
DARKTIME=          1233.247202 / fiducial pixel dark time (secs)                
                                                                                
              / POINTING INFORMATION                                            
                                                                                
                                                                                
              / TARGET OFFSETS (POSTARGS)                                       
                                                                                
POSTARG1=            -0.227366 / POSTARG in axis 1 direction                    
POSTARG2=             2.969150 / POSTARG in axis 2 direction                    
                                                                                
              / DIAGNOSTIC KEYWORDS                                             
                                                                                
CSYS_VER= 'hstdp-2016.2'       / Calibration software system version id         
                                                                                
              / SCIENCE INSTRUMENT CONFIGURATION                                
                                                                                
OBSTYPE = 'IMAGING       '     / observation type - imaging or spectroscopic    
OBSMODE = 'ACCUM     '         / operating mode                                 
CTEIMAGE= 'NONE'               / type of Charge Transfer Image, if applicable   
SCLAMP  = 'NONE          '     / lamp status, NONE or name of lamp which is on  
NRPTEXP =                    1 / number of repeat exposures in set: default 1   
SUBARRAY=                    F / data from a subarray (T) or full frame (F)     
DETECTOR= 'WFC'                / detector in use: WFC, HRC, or SBC              
FILTER1 = 'CLEAR1L           ' / element selected from filter wheel 1           
FILTER2 = 'F814W             ' / element selected from filter wheel 2           
FW1OFFST=                    0 / computed filter wheel offset                   
FW1ERROR=                    F / filter wheel position error flag               
FW2OFFST=                    0 / computed filter wheel offset                   
FW2ERROR=                    F / filter wheel position error flag               
FWSOFFST=                    0 / computed filter wheel offset                   
FWSERROR=                    F / filter wheel position error flag               
LRFWAVE =             0.000000 / proposed linear ramp filter wavelength         
APERTURE= 'WFC             '   / aperture name                                  
PROPAPER= 'WFC             '   / proposed aperture name                         
DIRIMAGE= 'NONE     '          / direct image for grism or prism exposure       
CTEDIR  = 'NONE    '           / CTE measurement direction: serial or parallel  
CRSPLIT =                    1 / number of cosmic ray split exposures           
                                                                                
              / CALIBRATION SWITCHES: PERFORM, OMIT, COMPLETE                   
                                                                                
WRTERR  =                    T / write out error array extension                
DQICORR = 'COMPLETE'           / data quality initialization                    
ATODCORR= 'OMIT    '           / correct for A to D conversion errors           
BLEVCORR= 'COMPLETE'           / subtract bias level computed from overscan img 
BIASCORR= 'COMPLETE'           / Subtract bias image                            
FLSHCORR= 'OMIT    '           / post flash correction                          
CRCORR  = 'OMIT    '           / combine observations to reject cosmic rays     
EXPSCORR= 'COMPLETE'           / process individual observations after cr-reject
SHADCORR= 'OMIT    '           / apply shutter shading correction               
DARKCORR= 'COMPLETE'           / Subtract dark image                            
FLATCORR= 'COMPLETE'           / flat field data                                
PHOTCORR= 'COMPLETE'           / populate photometric header keywords           
DRIZCORR= 'COMPLETE'           / drizzle processing                             
                                                                                
              / CALIBRATION REFERENCE FILES                                     
                                                                                
BPIXTAB = 'jref$n9p09145j_bpx.fits' / bad pixel table                           
CCDTAB  = 'jref$o151506dj_ccd.fits' / CCD calibration parameters                
ATODTAB = 'N/A     '           / analog to digital correction file              
OSCNTAB = 'jref$lch1459bj_osc.fits' / CCD overscan table                        
BIASFILE= 'jref$mc91206ej_bia.fits' / bias image file name                      
FLSHFILE= 'N/A     '           / post flash correction file name                
CRREJTAB= 'N/A     '           / cosmic ray rejection parameters                
SHADFILE= 'N/A     '           / shutter shading correction file                
DARKFILE= 'jref$mc91206cj_drk.fits' / dark image file name                      
DFLTFILE= 'N/A                    ' / delta flat field file name                
LFLTFILE= 'N/A                    ' / low order flat                            
PHOTTAB = 'N/A                    ' / Photometric throughput table              
GRAPHTAB= 'N/A                    ' / the HST graph table                       
COMPTAB = 'N/A                    ' / the HST components table                  
IDCTAB  = 'jref$0461802ej_idc.fits' / image distortion correction table         
DGEOFILE= 'jref$qbu16429j_dxy.fits' / Distortion correction image               
MDRIZTAB= 'jref$1371334kj_mdz.fits' / MultiDrizzle parameter table              
CFLTFILE= 'N/A     '           / Coronagraphic spot image                       
SPOTTAB = 'N/A     '           / Coronagraphic spot offset table                
IMPHTTAB= 'jref$08b18470j_imp.fits' / Image Photometry Table                    
                                                                                
              / COSMIC RAY REJECTION ALGORITHM PARAMETERS                       
                                                                                
MEANEXP =             0.000000 / reference exposure time for parameters         
SCALENSE=             0.000000 / multiplicative scale factor applied to noise   
SKYSUB  = '    '               / sky value subtracted (MODE or NONE)            
SKYSUM  =                  0.0 / sky level from the sum of all constituent image
CRRADIUS=             0.000000 / rejection propagation radius (pixels)          
CRTHRESH=             0.000000 / rejection propagation threshold                
BADINPDQ=                    0 / data quality flag bits to reject               
REJ_RATE=                  0.0 / rate at which pixels are affected by cosmic ray
CRMASK  =                    F / flag CR-rejected pixels in input files (T/F)   
                                                                                
              / OTFR KEYWORDS                                                   
                                                                                
                                                                                
              / PATTERN KEYWORDS                                                
                                                                                
PATTERN1= 'NONE                    ' / primary pattern type                     
P1_SHAPE= '                  ' / primary pattern shape                          
P1_PURPS= '          '         / primary pattern purpose                        
P1_NPTS =                    0 / number of points in primary pattern            
P1_PSPAC=             0.000000 / point spacing for primary pattern (arc-sec)    
P1_LSPAC=             0.000000 / line spacing for primary pattern (arc-sec)     
P1_ANGLE=             0.000000 / angle between sides of parallelogram patt (deg)
P1_FRAME= '         '          / coordinate frame of primary pattern            
P1_ORINT=             0.000000 / orientation of pattern to coordinate frame (deg
P1_CENTR= '   '                / center pattern relative to pointing (yes/no)   
PATTSTEP=                    0 / position number of this point in the pattern   
                                                                                
              / POST FLASH  PARAMETERS                                          
                                                                                
FLASHDUR=                  0.0 / Exposure time in seconds: 0.1 to 409.5         
FLASHCUR= 'OFF '               / Post flash current: OFF, LOW, MED, HIGH        
FLASHSTA= 'NOT PERFORMED   '   / Status: SUCCESSFUL, ABORTED, NOT PERFORMED     
SHUTRPOS= 'MULTIPLE'           / Shutter position: A or B                       
                                                                                
              / ENGINEERING PARAMETERS                                          
                                                                                
CCDGAIN =                    1 / commanded gain of CCD                          
CCDOFSTA=                    3 / commanded CCD bias offset for amplifier A      
CCDOFSTB=                    3 / commanded CCD bias offset for amplifier B      
CCDOFSTC=                    3 / commanded CCD bias offset for amplifier C      
CCDOFSTD=                    3 / commanded CCD bias offset for amplifier D      
                                                                                
              / CALIBRATED ENGINEERING PARAMETERS                               
                                                                                
ATODGNA =        9.9989998E-01 / calibrated gain for amplifier A                
ATODGNB =        9.7210002E-01 / calibrated gain for amplifier B                
ATODGNC =        1.0107000E+00 / calibrated gain for amplifier C                
ATODGND =        1.0180000E+00 / calibrated gain for amplifier D                
READNSEA=        4.9699998E+00 / calibrated read noise for amplifier A          
READNSEB=        4.8499999E+00 / calibrated read noise for amplifier B          
READNSEC=        5.2399998E+00 / calibrated read noise for amplifier C          
READNSED=        4.8499999E+00 / calibrated read noise for amplifier D          
                                                                                
              / ASSOCIATION KEYWORDS                                            
                                                                                
CRDS_CTX= 'hst_0515.pmap'                                                       
CRDS_VER= '7.0.1, opus_2016.1-universal, af27872'                               
UPWCSVER= '1.2.3.dev'          / Version of STWCS used to updated the WCS       
PYWCSVER= '1.2.1   '           / Version of PYWCS used to updated the WCS       
HISTORY CCD parameters table:                                                   
HISTORY   reference table jref$o151506dj_ccd.fits                               
HISTORY     inflight                                                            
HISTORY     June 2002                                                           
HISTORY DQICORR complete ...                                                    
HISTORY   values checked for saturation                                         
HISTORY   DQ array initialized ...                                              
HISTORY   reference table jref$n9p09145j_bpx.fits                               
HISTORY BIASCORR complete ...                                                   
HISTORY   reference image jref$mc91206ej_bia.fits                               
HISTORY     INFLIGHT 09/11/2002 04/12/2002                                      
HISTORY     Superbias created by Doug Van Orsow from proposal 9647              
HISTORY BLEVCORR complete; bias level from overscan was subtracted.             
HISTORY BLEVCORR does not include correction for drift along lines.             
HISTORY   Overscan region table:                                                
HISTORY   reference table jref$lch1459bj_osc.fits                               
HISTORY Uncertainty array initialized.                                          
HISTORY CCD parameters table:                                                   
HISTORY   reference table jref$o151506dj_ccd.fits                               
HISTORY     inflight                                                            
HISTORY     June 2002                                                           
PCTETRSH=  -1.000000000000E+01 / PCTE over subtraction threshold                
HISTORY PCTECORR complete ...                                                   
HISTORY   reference table jref$xa81724cj_cte.fits                               
DISTNAME= 'j8f802lcq_0461802ej-02c1450rj-02c1450oj'                             
SIPNAME = 'j8f802lcq_0461802ej'                                                 
RULESVER=                  1.1 / Version ID for header kw rules file            
BLENDVER= '1.2.0   '           / Version of blendheader software used           
RULEFILE= '/home/pipemgr/anaconda2/lib/python2.7/site-packages/fitsblender/acs&'
CONTINUE  '_header.rules&'                                                      
CONTINUE  '' / Name of header kw rules file                                     
NEXTEND =                    4                                                  
FILENAME= 'hst_9453_02_acs_wfc_f814w_run_1_drz.fits'                            
PROD_VER= 'DrizzlePac 2.1.6'                                                    
ROOTNAME= 'hst_9453_02_acs_wfc_f814w_run_1'                                     
ASN_MTYP= 'PROD-DTH'                                                            
NDRIZIM =                    8 / Drizzle, No. images drizzled onto output       
D001OUDA= 'hst_9453_02_acs_wfc_f814w_run_1_drz.fits' / Drizzle, output data imag
D001VER = 'Callable C-based DRIZZLE Version 0.8 (20th M' / Drizzle, task version
D001SCAL=                 0.05 / Drizzle, pixel size (arcsec) of output image   
D001COEF= 'SIP     '           / Drizzle, source of coefficients                
D001OUWE= 'hst_9453_02_acs_wfc_f814w_run_1_drz_wht.fits' / Drizzle, output weigh
D001OUCO= 'hst_9453_02_acs_wfc_f814w_run_1_drz_ctx.fits' / Drizzle, output conte
D001WTSC=                    1 / Drizzle, weighting factor for input image      
D001MASK= 'j8f802lcq_sci1_final_mask.fits' / Drizzle, input weighting image     
D001FVAL= 'INDEF   '           / Drizzle, fill value for zero weight output pix 
D001WKEY= '' / Input image WCS Version used                                     
D001OUUN= 'cps     '           / Drizzle, units of output image - counts or cps 
D001KERN= 'square  '           / Drizzle, form of weight distribution kernel    
D001GEOM= 'wcs     '           / Drizzle, source of geometric information       
D001ISCL=                 0.05 / Drizzle, default IDCTAB pixel size(arcsec)     
D001PIXF=                  1.0 / Drizzle, linear size of drop                   
D001DATA= 'j8f802lcq_flc.fits[sci,1]' / Drizzle, input data image               
D001DEXP=               1230.0 / Drizzle, input image exposure time (s)         
D002OUDA= 'hst_9453_02_acs_wfc_f814w_run_1_drz.fits' / Drizzle, output data imag
D002VER = 'Callable C-based DRIZZLE Version 0.8 (20th M' / Drizzle, task version
D002SCAL=                 0.05 / Drizzle, pixel size (arcsec) of output image   
D002COEF= 'SIP     '           / Drizzle, source of coefficients                
D002OUWE= 'hst_9453_02_acs_wfc_f814w_run_1_drz_wht.fits' / Drizzle, output weigh
D002OUCO= 'hst_9453_02_acs_wfc_f814w_run_1_drz_ctx.fits' / Drizzle, output conte
D002WTSC=                    1 / Drizzle, weighting factor for input image      
D002MASK= 'j8f802lcq_sci2_final_mask.fits' / Drizzle, input weighting image     
D002FVAL= 'INDEF   '           / Drizzle, fill value for zero weight output pix 
D002WKEY= '' / Input image WCS Version used                                     
D002OUUN= 'cps     '           / Drizzle, units of output image - counts or cps 
D002KERN= 'square  '           / Drizzle, form of weight distribution kernel    
D002GEOM= 'wcs     '           / Drizzle, source of geometric information       
D002ISCL=                 0.05 / Drizzle, default IDCTAB pixel size(arcsec)     
D002PIXF=                  1.0 / Drizzle, linear size of drop                   
D002DATA= 'j8f802lcq_flc.fits[sci,2]' / Drizzle, input data image               
D002DEXP=               1230.0 / Drizzle, input image exposure time (s)         
D003OUDA= 'hst_9453_02_acs_wfc_f814w_run_1_drz.fits' / Drizzle, output data imag
D003VER = 'Callable C-based DRIZZLE Version 0.8 (20th M' / Drizzle, task version
D003SCAL=                 0.05 / Drizzle, pixel size (arcsec) of output image   
D003COEF= 'SIP     '           / Drizzle, source of coefficients                
D003OUWE= 'hst_9453_02_acs_wfc_f814w_run_1_drz_wht.fits' / Drizzle, output weigh
D003OUCO= 'hst_9453_02_acs_wfc_f814w_run_1_drz_ctx.fits' / Drizzle, output conte
D003WTSC=                    1 / Drizzle, weighting factor for input image      
D003MASK= 'j8f802loq_sci1_final_mask.fits' / Drizzle, input weighting image     
D003FVAL= 'INDEF   '           / Drizzle, fill value for zero weight output pix 
D003WKEY= '' / Input image WCS Version used                                     
D003OUUN= 'cps     '           / Drizzle, units of output image - counts or cps 
D003KERN= 'square  '           / Drizzle, form of weight distribution kernel    
D003GEOM= 'wcs     '           / Drizzle, source of geometric information       
D003ISCL=                 0.05 / Drizzle, default IDCTAB pixel size(arcsec)     
D003PIXF=                  1.0 / Drizzle, linear size of drop                   
D003DATA= 'j8f802loq_flc.fits[sci,1]' / Drizzle, input data image               
D003DEXP=               1230.0 / Drizzle, input image exposure time (s)         
D004OUDA= 'hst_9453_02_acs_wfc_f814w_run_1_drz.fits' / Drizzle, output data imag
D004VER = 'Callable C-based DRIZZLE Version 0.8 (20th M' / Drizzle, task version
D004SCAL=                 0.05 / Drizzle, pixel size (arcsec) of output image   
D004COEF= 'SIP     '           / Drizzle, source of coefficients                
D004OUWE= 'hst_9453_02_acs_wfc_f814w_run_1_drz_wht.fits' / Drizzle, output weigh
D004OUCO= 'hst_9453_02_acs_wfc_f814w_run_1_drz_ctx.fits' / Drizzle, output conte
D004WTSC=                    1 / Drizzle, weighting factor for input image      
D004MASK= 'j8f802loq_sci2_final_mask.fits' / Drizzle, input weighting image     
D004FVAL= 'INDEF   '           / Drizzle, fill value for zero weight output pix 
D004WKEY= '' / Input image WCS Version used                                     
D004OUUN= 'cps     '           / Drizzle, units of output image - counts or cps 
D004KERN= 'square  '           / Drizzle, form of weight distribution kernel    
D004GEOM= 'wcs     '           / Drizzle, source of geometric information       
D004ISCL=                 0.05 / Drizzle, default IDCTAB pixel size(arcsec)     
D004PIXF=                  1.0 / Drizzle, linear size of drop                   
D004DATA= 'j8f802loq_flc.fits[sci,2]' / Drizzle, input data image               
D004DEXP=               1230.0 / Drizzle, input image exposure time (s)         
D005OUDA= 'hst_9453_02_acs_wfc_f814w_run_1_drz.fits' / Drizzle, output data imag
D005VER = 'Callable C-based DRIZZLE Version 0.8 (20th M' / Drizzle, task version
D005SCAL=                 0.05 / Drizzle, pixel size (arcsec) of output image   
D005COEF= 'SIP     '           / Drizzle, source of coefficients                
D005OUWE= 'hst_9453_02_acs_wfc_f814w_run_1_drz_wht.fits' / Drizzle, output weigh
D005OUCO= 'hst_9453_02_acs_wfc_f814w_run_1_drz_ctx.fits' / Drizzle, output conte
D005WTSC=                    1 / Drizzle, weighting factor for input image      
D005MASK= 'j8f802m1q_sci1_final_mask.fits' / Drizzle, input weighting image     
D005FVAL= 'INDEF   '           / Drizzle, fill value for zero weight output pix 
D005WKEY= '' / Input image WCS Version used                                     
D005OUUN= 'cps     '           / Drizzle, units of output image - counts or cps 
D005KERN= 'square  '           / Drizzle, form of weight distribution kernel    
D005GEOM= 'wcs     '           / Drizzle, source of geometric information       
D005ISCL=                 0.05 / Drizzle, default IDCTAB pixel size(arcsec)     
D005PIXF=                  1.0 / Drizzle, linear size of drop                   
D005DATA= 'j8f802m1q_flc.fits[sci,1]' / Drizzle, input data image               
D005DEXP=               1300.0 / Drizzle, input image exposure time (s)         
D006OUDA= 'hst_9453_02_acs_wfc_f814w_run_1_drz.fits' / Drizzle, output data imag
D006VER = 'Callable C-based DRIZZLE Version 0.8 (20th M' / Drizzle, task version
D006SCAL=                 0.05 / Drizzle, pixel size (arcsec) of output image   
D006COEF= 'SIP     '           / Drizzle, source of coefficients                
D006OUWE= 'hst_9453_02_acs_wfc_f814w_run_1_drz_wht.fits' / Drizzle, output weigh
D006OUCO= 'hst_9453_02_acs_wfc_f814w_run_1_drz_ctx.fits' / Drizzle, output conte
D006WTSC=                    1 / Drizzle, weighting factor for input image      
D006MASK= 'j8f802m1q_sci2_final_mask.fits' / Drizzle, input weighting image     
D006FVAL= 'INDEF   '           / Drizzle, fill value for zero weight output pix 
D006WKEY= '' / Input image WCS Version used                                     
D006OUUN= 'cps     '           / Drizzle, units of output image - counts or cps 
D006KERN= 'square  '           / Drizzle, form of weight distribution kernel    
D006GEOM= 'wcs     '           / Drizzle, source of geometric information       
D006ISCL=                 0.05 / Drizzle, default IDCTAB pixel size(arcsec)     
D006PIXF=                  1.0 / Drizzle, linear size of drop                   
D006DATA= 'j8f802m1q_flc.fits[sci,2]' / Drizzle, input data image               
D006DEXP=               1300.0 / Drizzle, input image exposure time (s)         
D007OUDA= 'hst_9453_02_acs_wfc_f814w_run_1_drz.fits' / Drizzle, output data imag
D007VER = 'Callable C-based DRIZZLE Version 0.8 (20th M' / Drizzle, task version
D007SCAL=                 0.05 / Drizzle, pixel size (arcsec) of output image   
D007COEF= 'SIP     '           / Drizzle, source of coefficients                
D007OUWE= 'hst_9453_02_acs_wfc_f814w_run_1_drz_wht.fits' / Drizzle, output weigh
D007OUCO= 'hst_9453_02_acs_wfc_f814w_run_1_drz_ctx.fits' / Drizzle, output conte
D007WTSC=                    1 / Drizzle, weighting factor for input image      
D007MASK= 'j8f802mfq_sci1_final_mask.fits' / Drizzle, input weighting image     
D007FVAL= 'INDEF   '           / Drizzle, fill value for zero weight output pix 
D007WKEY= '' / Input image WCS Version used                                     
D007OUUN= 'cps     '           / Drizzle, units of output image - counts or cps 
D007KERN= 'square  '           / Drizzle, form of weight distribution kernel    
D007GEOM= 'wcs     '           / Drizzle, source of geometric information       
D007ISCL=                 0.05 / Drizzle, default IDCTAB pixel size(arcsec)     
D007PIXF=                  1.0 / Drizzle, linear size of drop                   
D007DATA= 'j8f802mfq_flc.fits[sci,1]' / Drizzle, input data image               
D007DEXP=               1300.0 / Drizzle, input image exposure time (s)         
D008OUDA= 'hst_9453_02_acs_wfc_f814w_run_1_drz.fits' / Drizzle, output data imag
D008VER = 'Callable C-based DRIZZLE Version 0.8 (20th M' / Drizzle, task version
D008SCAL=                 0.05 / Drizzle, pixel size (arcsec) of output image   
D008COEF= 'SIP     '           / Drizzle, source of coefficients                
D008OUWE= 'hst_9453_02_acs_wfc_f814w_run_1_drz_wht.fits' / Drizzle, output weigh
D008OUCO= 'hst_9453_02_acs_wfc_f814w_run_1_drz_ctx.fits' / Drizzle, output conte
D008WTSC=                    1 / Drizzle, weighting factor for input image      
D008MASK= 'j8f802mfq_sci2_final_mask.fits' / Drizzle, input weighting image     
D008FVAL= 'INDEF   '           / Drizzle, fill value for zero weight output pix 
D008WKEY= '' / Input image WCS Version used                                     
D008OUUN= 'cps     '           / Drizzle, units of output image - counts or cps 
D008KERN= 'square  '           / Drizzle, form of weight distribution kernel    
D008GEOM= 'wcs     '           / Drizzle, source of geometric information       
D008ISCL=                 0.05 / Drizzle, default IDCTAB pixel size(arcsec)     
D008PIXF=                  1.0 / Drizzle, linear size of drop                   
D008DATA= 'j8f802mfq_flc.fits[sci,2]' / Drizzle, input data image               
D008DEXP=               1300.0 / Drizzle, input image exposure time (s)         
PA_V3   =           255.070404 / position angle of V3-axis of HST (deg)         
HISTORY CCD parameters table:                                                   
HISTORY   reference table jref$o151506dj_ccd.fits                               
HISTORY     inflight                                                            
HISTORY     June 2002                                                           
HISTORY DARKCORR complete ...                                                   
HISTORY   reference image jref$z552106tj_dkc.fits                               
HISTORY     INFLIGHT 24/09/2002 07/10/2002                                      
HISTORY     CTE corrected dark for data taken after Oct 07 2002---------------- 
HISTORY FLATCORR complete ...                                                   
HISTORY   reference image jref$n6u12592j_pfl.fits                               
HISTORY     INFLIGHT 18/04/2002 - 09/05/2002                                    
HISTORY     Ground LP-flat corrected by L-flat from program 9018                
HISTORY PHOTCORR complete ...                                                   
HISTORY   reference table jref$08b18470j_imp.fits                               
HISTORY EXPSCORR complete ...                                                   
HISTORY ============================================================            
HISTORY Header Generation rules:                                                
HISTORY     Rules used to combine headers of input files                        
HISTORY     Start of rules...                                                   
HISTORY ------------------------------------------------------------            
HISTORY !VERSION = 1.1                                                          
HISTORY !INSTRUMENT = ACS                                                       
HISTORY ROOTNAME                                                                
HISTORY EXTNAME                                                                 
HISTORY EXTVER                                                                  
HISTORY A_0_2                                                                   
HISTORY A_0_3                                                                   
HISTORY A_0_4                                                                   
HISTORY A_1_1                                                                   
HISTORY A_1_2                                                                   
HISTORY A_1_3                                                                   
HISTORY A_2_0                                                                   
HISTORY A_2_1                                                                   
HISTORY A_2_2                                                                   
HISTORY A_3_0                                                                   
HISTORY A_3_1                                                                   
HISTORY A_4_0                                                                   
HISTORY ACQNAME                                                                 
HISTORY A_ORDER                                                                 
HISTORY APERTURE                                                                
HISTORY ASN_ID                                                                  
HISTORY ASN_MTYP                                                                
HISTORY ASN_TAB                                                                 
HISTORY ATODCORR                                                                
HISTORY ATODGNA                                                                 
HISTORY ATODGNB                                                                 
HISTORY ATODGNC                                                                 
HISTORY ATODGND                                                                 
HISTORY ATODTAB                                                                 
HISTORY B_0_2                                                                   
HISTORY B_0_3                                                                   
HISTORY B_0_4                                                                   
HISTORY B_1_1                                                                   
HISTORY B_1_2                                                                   
HISTORY B_1_3                                                                   
HISTORY B_2_0                                                                   
HISTORY B_2_1                                                                   
HISTORY B_2_2                                                                   
HISTORY B_3_0                                                                   
HISTORY B_3_1                                                                   
HISTORY B_4_0                                                                   
HISTORY BADINPDQ                                                                
HISTORY BIASCORR                                                                
HISTORY BIASFILE                                                                
HISTORY BIASLEVA                                                                
HISTORY BIASLEVB                                                                
HISTORY BIASLEVC                                                                
HISTORY BIASLEVD                                                                
HISTORY BINAXIS1                                                                
HISTORY BINAXIS2                                                                
HISTORY BITPIX                                                                  
HISTORY BLEVCORR                                                                
HISTORY B_ORDER                                                                 
HISTORY BPIXTAB                                                                 
HISTORY BUNIT                                                                   
HISTORY CAL_VER                                                                 
HISTORY CBLKSIZ                                                                 
HISTORY CCDAMP                                                                  
HISTORY CCDCHIP                                                                 
HISTORY CCDGAIN                                                                 
HISTORY CCDOFSTA                                                                
HISTORY CCDOFSTB                                                                
HISTORY CCDOFSTC                                                                
HISTORY CCDOFSTD                                                                
HISTORY CCDTAB                                                                  
HISTORY CD1_1                                                                   
HISTORY CD1_2                                                                   
HISTORY CD2_1                                                                   
HISTORY CD2_2                                                                   
HISTORY CENTERA1                                                                
HISTORY CENTERA2                                                                
HISTORY CFLTFILE                                                                
HISTORY COMPTAB                                                                 
HISTORY COMPTYP                                                                 
HISTORY CRCORR                                                                  
HISTORY CRMASK                                                                  
HISTORY CRPIX1                                                                  
HISTORY CRPIX2                                                                  
HISTORY CRRADIUS                                                                
HISTORY CRREJTAB                                                                
HISTORY CRSIGMAS                                                                
HISTORY CRSPLIT                                                                 
HISTORY CRTHRESH                                                                
HISTORY CRVAL1                                                                  
HISTORY CRVAL2                                                                  
HISTORY CTE_NAME                                                                
HISTORY CTE_VER                                                                 
HISTORY CTEDIR                                                                  
HISTORY CTEIMAGE                                                                
HISTORY CTYPE1                                                                  
HISTORY CTYPE2                                                                  
HISTORY D2IMFILE                                                                
HISTORY DARKCORR                                                                
HISTORY DARKFILE                                                                
HISTORY DATE                                                                    
HISTORY DATE-OBS                                                                
HISTORY DEC_APER                                                                
HISTORY DEC_TARG                                                                
HISTORY DETECTOR                                                                
HISTORY DFLTFILE                                                                
HISTORY DGEOFILE                                                                
HISTORY DIRIMAGE                                                                
HISTORY DQICORR                                                                 
HISTORY DRIZCORR                                                                
HISTORY DRKCFILE                                                                
HISTORY EQUINOX                                                                 
HISTORY ERRCNT                                                                  
HISTORY EXPEND                                                                  
HISTORY EXPFLAG                                                                 
HISTORY EXPNAME                                                                 
HISTORY EXPSCORR                                                                
HISTORY EXPSTART                                                                
HISTORY EXPTIME                                                                 
HISTORY EXTEND                                                                  
HISTORY FGSLOCK                                                                 
HISTORY FILENAME                                                                
HISTORY FILETYPE                                                                
HISTORY FILLCNT                                                                 
HISTORY FILTER1                                                                 
HISTORY FILTER2                                                                 
HISTORY FLASHCUR                                                                
HISTORY FLASHDUR                                                                
HISTORY FLASHSTA                                                                
HISTORY FLATCORR                                                                
HISTORY FLSHCORR                                                                
HISTORY FLSHFILE                                                                
HISTORY FW1ERROR                                                                
HISTORY FW1OFFST                                                                
HISTORY FW2ERROR                                                                
HISTORY FW2OFFST                                                                
HISTORY FWSERROR                                                                
HISTORY FWSOFFST                                                                
HISTORY GCOUNT                                                                  
HISTORY GLINCORR                                                                
HISTORY GLOBLIM                                                                 
HISTORY GLOBRATE                                                                
HISTORY GOODMAX                                                                 
HISTORY GOODMEAN                                                                
HISTORY GOODMIN                                                                 
HISTORY GRAPHTAB                                                                
HISTORY GYROMODE                                                                
HISTORY IDCSCALE                                                                
HISTORY IDCTAB                                                                  
HISTORY IDCTHETA                                                                
HISTORY IDCV2REF                                                                
HISTORY IDCV3REF                                                                
HISTORY IMAGETYP                                                                
HISTORY IMPHTTAB                                                                
HISTORY INHERIT                                                                 
HISTORY INITGUES                                                                
HISTORY INSTRUME                                                                
HISTORY JWROTYPE                                                                
HISTORY LFLGCORR                                                                
HISTORY LFLTFILE                                                                
HISTORY LINENUM                                                                 
HISTORY LOSTPIX                                                                 
HISTORY LRC_FAIL                                                                
HISTORY LRC_XSTS                                                                
HISTORY LRFWAVE                                                                 
HISTORY LTM1_1                                                                  
HISTORY LTM2_2                                                                  
HISTORY LTV1                                                                    
HISTORY LTV2                                                                    
HISTORY MDECODT1                                                                
HISTORY MDECODT2                                                                
HISTORY MDRIZSKY                                                                
HISTORY MDRIZTAB                                                                
HISTORY MEANBLEV                                                                
HISTORY MEANDARK                                                                
HISTORY MEANEXP                                                                 
HISTORY MEANFLSH                                                                
HISTORY MLINTAB                                                                 
HISTORY MOFFSET1                                                                
HISTORY MOFFSET2                                                                
HISTORY MOONANGL                                                                
HISTORY MTFLAG                                                                  
HISTORY NAXIS                                                                   
HISTORY NAXIS1                                                                  
HISTORY NAXIS2                                                                  
HISTORY NCOMBINE                                                                
HISTORY NEXTEND                                                                 
HISTORY NGOODPIX                                                                
HISTORY NPOLFILE                                                                
HISTORY NRPTEXP                                                                 
HISTORY OBSMODE                                                                 
HISTORY OBSTYPE                                                                 
HISTORY OCD1_1                                                                  
HISTORY OCD1_2                                                                  
HISTORY OCD2_1                                                                  
HISTORY OCD2_2                                                                  
HISTORY OCRPIX1                                                                 
HISTORY OCRPIX2                                                                 
HISTORY OCRVAL1                                                                 
HISTORY OCRVAL2                                                                 
HISTORY OCTYPE1                                                                 
HISTORY OCTYPE2                                                                 
HISTORY OCX10                                                                   
HISTORY OCX11                                                                   
HISTORY OCY10                                                                   
HISTORY OCY11                                                                   
HISTORY ONAXIS1                                                                 
HISTORY ONAXIS2                                                                 
HISTORY OORIENTA                                                                
HISTORY OPUS_VER                                                                
HISTORY ORIENTAT                                                                
HISTORY ORIGIN                                                                  
HISTORY OSCNTAB                                                                 
HISTORY P1_ANGLE                                                                
HISTORY P1_CENTR                                                                
HISTORY P1_FRAME                                                                
HISTORY P1_LSPAC                                                                
HISTORY P1_NPTS                                                                 
HISTORY P1_ORINT                                                                
HISTORY P1_PSPAC                                                                
HISTORY P1_PURPS                                                                
HISTORY P1_SHAPE                                                                
HISTORY PA_APER                                                                 
HISTORY PATTERN1                                                                
HISTORY PATTSTEP                                                                
HISTORY PA_V3                                                                   
HISTORY PCOUNT                                                                  
HISTORY PCTECORR                                                                
HISTORY PCTEFRAC                                                                
HISTORY PCTENSMD                                                                
HISTORY PCTERNCL                                                                
HISTORY PCTESHFT                                                                
HISTORY PCTESMIT                                                                
HISTORY PCTETAB                                                                 
HISTORY PFLTFILE                                                                
HISTORY PHOTBW                                                                  
HISTORY PHOTCORR                                                                
HISTORY PHOTFLAM                                                                
HISTORY PHOTMODE                                                                
HISTORY PHOTPLAM                                                                
HISTORY PHOTTAB                                                                 
HISTORY PHOTZPT                                                                 
HISTORY PODPSFF                                                                 
HISTORY POSTARG1                                                                
HISTORY POSTARG2                                                                
HISTORY PRIMESI                                                                 
HISTORY PR_INV_F                                                                
HISTORY PR_INV_L                                                                
HISTORY PR_INV_M                                                                
HISTORY PROCTIME                                                                
HISTORY PROPAPER                                                                
HISTORY PROPOSID                                                                
HISTORY QUALCOM1                                                                
HISTORY QUALCOM2                                                                
HISTORY QUALCOM3                                                                
HISTORY QUALITY                                                                 
HISTORY RA_APER                                                                 
HISTORY RA_TARG                                                                 
HISTORY READNSEA                                                                
HISTORY READNSEB                                                                
HISTORY READNSEC                                                                
HISTORY READNSED                                                                
HISTORY REFFRAME                                                                
HISTORY REJ_RATE                                                                
HISTORY RPTCORR                                                                 
HISTORY SCALENSE                                                                
HISTORY SCLAMP                                                                  
HISTORY SDQFLAGS                                                                
HISTORY SHADCORR                                                                
HISTORY SHADFILE                                                                
HISTORY SHUTRPOS                                                                
HISTORY SIMPLE                                                                  
HISTORY SIZAXIS1                                                                
HISTORY SIZAXIS2                                                                
HISTORY SKYSUB                                                                  
HISTORY SKYSUM                                                                  
HISTORY SNRMAX                                                                  
HISTORY SNRMEAN                                                                 
HISTORY SNRMIN                                                                  
HISTORY SOFTERRS                                                                
HISTORY SPOTTAB                                                                 
HISTORY STATFLAG                                                                
HISTORY STDCFFF                                                                 
HISTORY STDCFFP                                                                 
HISTORY SUBARRAY                                                                
HISTORY SUN_ALT                                                                 
HISTORY SUNANGLE                                                                
HISTORY TARGNAME                                                                
HISTORY TDDALPHA                                                                
HISTORY TDDBETA                                                                 
HISTORY TELESCOP                                                                
HISTORY TIME-OBS                                                                
HISTORY T_SGSTAR                                                                
HISTORY VAFACTOR                                                                
HISTORY WCSAXES                                                                 
HISTORY WCSCDATE                                                                
HISTORY WFCMPRSD                                                                
HISTORY WRTERR                                                                  
HISTORY XTENSION                                                                
HISTORY WCSNAMEO                                                                
HISTORY WCSAXESO                                                                
HISTORY LONPOLEO                                                                
HISTORY LATPOLEO                                                                
HISTORY RESTFRQO                                                                
HISTORY RESTWAVO                                                                
HISTORY CD1_1O                                                                  
HISTORY CD1_2O                                                                  
HISTORY CD2_1O                                                                  
HISTORY CD2_2O                                                                  
HISTORY CDELT1O                                                                 
HISTORY CDELT2O                                                                 
HISTORY CRPIX1O                                                                 
HISTORY CRPIX2O                                                                 
HISTORY CRVAL1O                                                                 
HISTORY CRVAL2O                                                                 
HISTORY CTYPE1O                                                                 
HISTORY CTYPE2O                                                                 
HISTORY CUNIT1O                                                                 
HISTORY CUNIT2O                                                                 
HISTORY APERTURE  APERTURE  multi                                               
HISTORY DETECTOR  DETECTOR  first                                               
HISTORY EXPEND    EXPEND    max                                                 
HISTORY EXPSTART  EXPSTART  min                                                 
HISTORY EXPTIME   TEXPTIME  sum                                                 
HISTORY EXPTIME   EXPTIME   sum                                                 
HISTORY FILTER1   FILTER1   multi                                               
HISTORY FILTER2   FILTER2   multi                                               
HISTORY GOODMAX   GOODMAX   max                                                 
HISTORY GOODMEAN  GOODMEAN  mean                                                
HISTORY GOODMIN   GOODMIN   min                                                 
HISTORY INHERIT   INHERIT   first # maintain IRAF compatibility                 
HISTORY INSTRUME  INSTRUME  first                                               
HISTORY LRFWAVE   LRFWAVE   first                                               
HISTORY NCOMBINE  NCOMBINE  sum                                                 
HISTORY MDRIZSKY  MDRIZSKY  mean                                                
HISTORY PHOTBW    PHOTBW    mean                                                
HISTORY PHOTFLAM  PHOTFLAM  mean                                                
HISTORY PHOTMODE  PHOTMODE  first                                               
HISTORY PHOTPLAM  PHOTPLAM  mean                                                
HISTORY PHOTZPT   PHOTZPT   mean                                                
HISTORY PROPOSID  PROPOSID  first                                               
HISTORY SNRMAX    SNRMAX    max                                                 
HISTORY SNRMEAN   SNRMEAN   mean                                                
HISTORY SNRMIN    SNRMIN    min                                                 
HISTORY TARGNAME  TARGNAME  first                                               
HISTORY TELESCOP  TELESCOP  first                                               
HISTORY ATODCORR  ATODCORR  multi                                               
HISTORY ATODGNA   ATODGNA   first                                               
HISTORY ATODGNB   ATODGNB   first                                               
HISTORY ATODGNC   ATODGNC   first                                               
HISTORY ATODGND   ATODGND   first                                               
HISTORY ATODTAB   ATODTAB   multi                                               
HISTORY BADINPDQ  BADINPDQ  sum                                                 
HISTORY BIASCORR  BIASCORR  multi                                               
HISTORY BIASFILE  BIASFILE  multi                                               
HISTORY BLEVCORR  BLEVCORR  multi                                               
HISTORY BPIXTAB   BPIXTAB   multi                                               
HISTORY CCDCHIP   CCDCHIP   first                                               
HISTORY CCDGAIN   CCDGAIN   first                                               
HISTORY CCDOFSTA  CCDOFSTA  first                                               
HISTORY CCDOFSTB  CCDOFSTB  first                                               
HISTORY CCDOFSTC  CCDOFSTC  first                                               
HISTORY CCDOFSTD  CCDOFSTD  first                                               
HISTORY CCDTAB      CCDTAB    multi                                             
HISTORY CFLTFILE  CFLTFILE  multi                                               
HISTORY COMPTAB   COMPTAB   multi                                               
HISTORY CRCORR      CRCORR    multi                                             
HISTORY CRMASK      CRMASK    first                                             
HISTORY CRRADIUS  CRRADIUS  first                                               
HISTORY CRREJTAB  CRREJTAB  multi                                               
HISTORY CRSPLIT   CRSPLIT   first                                               
HISTORY CRTHRESH  CRTHRESH  first                                               
HISTORY CTEDIR      CTEDIR    multi                                             
HISTORY CTEIMAGE  CTEIMAGE  first                                               
HISTORY DARKCORR  DARKCORR  multi                                               
HISTORY DARKFILE  DARKFILE  multi                                               
HISTORY DATE-OBS  DATE-OBS  first                                               
HISTORY DEC_APER  DEC_APER  first                                               
HISTORY DFLTFILE  DFLTFILE  multi                                               
HISTORY DGEOFILE  DGEOFILE  multi                                               
HISTORY DIRIMAGE  DIRIMAGE  multi                                               
HISTORY DQICORR   DQICORR   multi                                               
HISTORY DRIZCORR  DRIZCORR  multi                                               
HISTORY EXPFLAG   EXPFLAG   multi                                               
HISTORY EXPSCORR  EXPSCORR  multi                                               
HISTORY FGSLOCK   FGSLOCK   multi                                               
HISTORY FLASHCUR  FLASHCUR  multi                                               
HISTORY FLASHDUR  FLASHDUR  first                                               
HISTORY FLASHSTA  FLASHSTA  first                                               
HISTORY FLATCORR  FLATCORR  multi                                               
HISTORY FLSHCORR  FLSHCORR  multi                                               
HISTORY FLSHFILE  FLSHFILE  multi                                               
HISTORY FW1ERROR  FW1ERROR  multi                                               
HISTORY FW1OFFST  FW1OFFST  first                                               
HISTORY FW2ERROR  FW2ERROR  multi                                               
HISTORY FW2OFFST  FW2OFFST  first                                               
HISTORY FWSERROR  FWSERROR  multi                                               
HISTORY FWSOFFST  FWSOFFST  first                                               
HISTORY GRAPHTAB  GRAPHTAB  multi                                               
HISTORY GYROMODE  GYROMODE  multi                                               
HISTORY IDCTAB      IDCTAB    multi                                             
HISTORY IMAGETYP  IMAGETYP  first                                               
HISTORY IMPHTTAB  IMPHTTAB  multi                                               
HISTORY LFLGCORR  LFLGCORR  multi                                               
HISTORY LFLTFILE  LFLTFILE  multi                                               
HISTORY LTM1_1    LTM1_1    float_one                                           
HISTORY LTM2_2    LTM2_2    float_one                                           
HISTORY MDRIZTAB  MDRIZTAB  multi                                               
HISTORY MEANEXP   MEANEXP   first                                               
HISTORY MOONANGL  MOONANGL  first                                               
HISTORY NRPTEXP   NRPTEXP   first                                               
HISTORY OBSMODE   OBSMODE   multi                                               
HISTORY OBSTYPE   OBSTYPE   first                                               
HISTORY OSCNTAB   OSCNTAB   multi                                               
HISTORY P1_ANGLE  P1_ANGLE  first                                               
HISTORY P1_CENTR  P1_CENTR  multi                                               
HISTORY P1_FRAME  P1_FRAME  multi                                               
HISTORY P1_LSPAC  P1_LSPAC  first                                               
HISTORY P1_NPTS   P1_NPTS   first                                               
HISTORY P1_ORINT  P1_ORINT  first                                               
HISTORY P1_PSPAC  P1_PSPAC  first                                               
HISTORY P1_PURPS  P1_PURPS  multi                                               
HISTORY P1_SHAPE  P1_SHAPE  multi                                               
HISTORY P2_ANGLE  P2_ANGLE  first                                               
HISTORY P2_CENTR  P2_CENTR  multi                                               
HISTORY P2_FRAME  P2_FRAME  multi                                               
HISTORY P2_LSPAC  P2_LSPAC  first                                               
HISTORY P2_NPTS   P2_NPTS   first                                               
HISTORY P2_ORINT  P2_ORINT  first                                               
HISTORY P2_PSPAC  P2_PSPAC  first                                               
HISTORY P2_PURPS  P2_PURPS  multi                                               
HISTORY P2_SHAPE  P2_SHAPE  multi                                               
HISTORY PATTERN1  PATTERN1  multi                                               
HISTORY PATTERN2  PATTERN2  multi                                               
HISTORY PATTSTEP  PATTSTEP  first                                               
HISTORY PHOTCORR  PHOTCORR  multi                                               
HISTORY PHOTTAB   PHOTTAB   multi                                               
HISTORY POSTARG1  POSTARG1  first                                               
HISTORY POSTARG2  POSTARG2  first                                               
HISTORY PRIMESI   PRIMESI   multi                                               
HISTORY PROPAPER  PROPAPER  multi                                               
HISTORY RA_APER   RA_APER   first                                               
HISTORY READNSEA  READNSEA  first                                               
HISTORY READNSEB  READNSEB  first                                               
HISTORY READNSEC  READNSEC  first                                               
HISTORY READNSED  READNSED  first                                               
HISTORY REJ_RATE  REJ_RATE  first                                               
HISTORY SCALENSE  SCALENSE  first                                               
HISTORY SCLAMP      SCLAMP    multi                                             
HISTORY SHADCORR  SHADCORR  multi                                               
HISTORY SHADFILE  SHADFILE  multi                                               
HISTORY SHUTRPOS  SHUTRPOS  multi                                               
HISTORY SKYSUB      SKYSUB    multi                                             
HISTORY SKYSUM      SKYSUM    sum                                               
HISTORY SPOTTAB   SPOTTAB   multi                                               
HISTORY SUBARRAY  SUBARRAY  first                                               
HISTORY SUNANGLE  SUNANGLE  first                                               
HISTORY SUN_ALT   SUN_ALT   first                                               
HISTORY WRTERR      WRTERR    multi                                             
HISTORY ------------------------------------------------------------            
HISTORY     End of rules...                                                     
HISTORY ============================================================            
HISTORY AstroDrizzle processing performed using:                                
HISTORY     AstroDrizzle Version 2.1.6                                          
HISTORY     Numpy Version 1.11.3                                                
HISTORY     PyFITS Version 1.3                                                  
HISTORY All refereed publications based on data obtained from the HLA must      
HISTORY carry the following footnote:                                           
HISTORY                                                                         
HISTORY  "Based on observations made with the NASA/ESA Hubble Space Telescope,  
HISTORY   and obtained from the Hubble Legacy Archive, which is a collaboration 
HISTORY   between the Space Telescope Science Institute (STScI/NASA), the Space 
HISTORY   Telescope European Coordinating Facility (ST-ECF/ESA) and the         
HISTORY   Canadian Astronomy Data Centre (CADC/NRC/CSA)."                       
HISTORY                                                                         
HISTORY One copy of each paper resulting from data obtained from the HLA        
HISTORY should be sent to the STScI.                                            
HISTORY                                                                         
HISTORY In addition, publications of research supported by an STScI grant       
HISTORY must carry the following acknowledgment:                                
HISTORY                                                                         
HISTORY  "Support for Program number                                            
HISTORY   ____________ was provided by NASA through a grant from the Space      
HISTORY   Telescope Science Institute, which is operated by the Association of  
HISTORY   Universities for Reasearch in Astronomy, Incorporated, under NASA     
HISTORY   contract NAS5-26555."                                                 
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
In [15]:
# Inspect the array
image_data = fits.getdata(image_file)
print(type(image_data))
print(image_data.shape)
<class 'numpy.ndarray'>
(5166, 5185)

Step 7. Plot the sources on top of the HLA image.

In [16]:
from astropy.wcs import WCS

wcs = WCS(hdu_list[1].header)
pix = wcs.wcs.cdelt[1]*3600.0 # pixel size in arcsec
In [17]:
from astropy.visualization import (MinMaxInterval, SqrtStretch, ImageNormalize, ManualInterval)

# Create an ImageNormalize object
norm = ImageNormalize(image_data, interval = ManualInterval(-0.1,0.5))
print(wcs)

# Display the image
fig = plt.figure(figsize=(10,10),dpi=100)
ax = fig.add_subplot(111,projection=wcs)
im = ax.imshow(image_data, cmap='gray', origin='lower', norm=norm)
p1 = ax.scatter(hcv['ra'],hcv['dec'],transform=ax.get_transform('world'), \
                s=30, edgecolor='salmon', facecolor='none', label='HCV')
p2 = ax.scatter(hcv_f814w['ra'],hcv_f814w['dec'],transform=ax.get_transform('world'), \
                s=30, edgecolor='green', facecolor='none', label='RR Lyrae')
fig.colorbar(im)
ax.set_xlabel("RA")
ax.set_ylabel("Dec")
ax.legend(["HCV Sources", "RR Lyrae star"])
WCS Keywords

Number of WCS axes: 2
CTYPE : 'RA---TAN'  'DEC--TAN'  
CRVAL : 11.52852151701503  40.70915097493346  
CRPIX : 2592.999999999834  2583.499999999835  
CD1_1 CD1_2  : -1.3888888888888e-05  0.0  
CD2_1 CD2_2  : 0.0  1.38888888888896e-05  
NAXIS : 5185  5166
Out[17]:
<matplotlib.legend.Legend at 0x8285bae10>

Step 8. Plot cutouts around the RR Lyrae star for the brightest and faintest magnitudes.

In this example we are calling the HLA cutout service from the STScI to plot the cutouts (within a notebook markdown cell). The RR Lyrae star is in the centre of the image.

The brightest corrected magnitude for F814W is : lightcurve_cm = 24.820026461811118; and corresponds to image lightcurve_i = hst_9453_61_acs_wfc_f814w :

And the faintest corrected magnitude for F814W is : lightcurve_cm = 25.49112826041771; and corresponds to image lightcurve_i = hst_9453_59_acs_wfc_f814w

The brightest corrected magnitude for F606W is : lightcurve_cm = 24.827273229936768; and corresponds to image lightcurve_i = hst_9453_27_acs_wfc_f606w :

The faintest corrected magnitude for F606W is : lightcurve_cm = 25.61165283094627; and corresponds to image lightcurve_i = hst_9453_45_acs_wfc_f606w :