HST¶
HST images take very long to download, so the user might prefer to download the images manually (or maybe use private data) and then use set_HST_image
to include the image into HostPhot’s workflow.
The difference with other surveys is that HostPhot only handles one filter at a time when working with HST given the large combination of instruments and filters:
[1]:
import hostphot
print('HostPhot version:', hostphot.__version__)
HostPhot version: 2.6.0
[2]:
from hostphot.cutouts import set_HST_image
name = 'SN2011ee'
ra, dec = 351.9889166667, +8.7772500000
host_ra, host_dec = 351.98623877, +8.77895936
survey = 'HST'
filt = 'WFC3_UVIS_F275W'
file = 'hst_16741_3d_wfc3_uvis_f275w_iepo3d_drc.fits'
set_HST_image(file, filt, name)
The mask can be performed in the usual way:
[3]:
from hostphot.image_masking import create_mask
create_mask(name, host_ra, host_dec, filt, survey=survey, threshold=6)
Same thing with the photometry:
[4]:
import hostphot.local_photometry as lp
ap_radii = [3, 4]
z = 0.0294468
results = lp.multi_band_phot(name, ra, dec, z, filters=filt,
survey=survey, ap_radii=ap_radii,
use_mask=True, correct_extinction=True,
save_plots=True, raise_exception=True)
results
[4]:
{'name': 'SN2011ee',
'ra': 351.9889166667,
'dec': 8.77725,
'redshift': 0.0294468,
'survey': 'HST',
'WFC3_UVIS_F275W_3': 19.216330997223157,
'WFC3_UVIS_F275W_3_err': 0.010700905390909725,
'WFC3_UVIS_F275W_3_flux': 69.69300555478219,
'WFC3_UVIS_F275W_3_flux_err': 0.6779114129675258,
'WFC3_UVIS_F275W_4': 18.558496365300403,
'WFC3_UVIS_F275W_4_err': 0.0078856391137125,
'WFC3_UVIS_F275W_4_flux': 127.73886321170855,
'WFC3_UVIS_F275W_4_flux_err': 0.9053093552572765}
[5]:
import hostphot.global_photometry as gp
results = gp.multi_band_phot(name, host_ra, host_dec, filters=filt,
survey=survey, ra=ra, dec=dec,
use_mask=True, correct_extinction=True,
threshold=6, common_aperture=False,
save_plots=True, raise_exception=True)
results
[5]:
{'name': 'SN2011ee',
'host_ra': 351.98623877,
'host_dec': 8.77895936,
'survey': 'HST',
'WFC3_UVIS_F275W': 16.928938161038392,
'WFC3_UVIS_F275W_err': 0.037112242979449296,
'WFC3_UVIS_F275W_flux': 572.8355467965029,
'WFC3_UVIS_F275W_flux_err': 19.55931311133422}
[ ]: