Global and local photometry of galaxies hosting supernovae or other transients
Project description
HostPhot
Global and local photometry of galaxies hosting supernovae or other transients
Read the full documentation at hostphot.readthedocs.io.
Conda environment
It is recommended to create an environment before installing HostPhot:
conda create -n hostphot pip
conda activate hostphot
pip install hostphot
Modules
Cutouts
This module allows you to download image cutouts from PS1
, DES
and SDSS
:
from hostphot.cutouts import download_images
download_images(name='SN2004eo', ra=308.22579, dec=9.92853, survey='PS1')
Image Pre-processing
Coadds can be created and stars can be masked out of the images:
from hostphot.coadd import coadd_images
coadd_filters = 'riz'
survey = 'PS1'
coadd_images('SN2004eo', coadd_filters, survey) # creates a new fits file
from hostphot.image_masking import create_mask
host_ra, host_dec = 308.2092, 9.92755 # coods of host galaxy of SN2004eo
coadd_mask_params = create_mask(name, host_ra, host_dec,
filt=coadd_filters, survey=survey,
extract_params=True) # we can extract the mask parameters from the coadd
for filt in 'grizy':
create_mask(name, host_ra, host_dec, filt, survey=survey,
common_params=coadd_mask_params)
Local Photometry
Local photometry can be obtained for multiple circular apertures:
import hostphot.local_photometry as lp
ap_radii = [1, 2, 3, 4] # in units of kpc
results = lp.multi_band_phot(name='SN2004eo', ra=308.22579, dec=9.92853, z=0.0157,
survey='PS1', ap_radii=ap_radii, use_mask=True, save_plots=True)
Global Photometry
Global photometry can be obtained in a similar way to local photometry, using common aperture:
import hostphot.global_photometry as gp
host_ra, host_dec = 308.2092, 9.92755 # coods of host galaxy of SN2004eo
results = gp.multi_band_phot(name='SN2004eo', host_ra, host_dec, survey='PS1',
use_mask=True, common_aperture=True, coadd_filters='riz',
optimze_kronrad=True, save_plots=True)
Citing HostPhot
If you make use of HostPhot, please cite:
@software{hostphot,
author = {Tom\'as E. M\"uller-Bravo and
Llu\'is Galbany},
title = {HostPhot},
month = apr,
year = 2022,
publisher = {Zenodo},
version = {v1.0.1},
doi = {10.5281/zenodo.6469981},
url = {https://doi.org/10.5281/zenodo.6469981}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file HostPhot-2.0.0.tar.gz
.
File metadata
- Download URL: HostPhot-2.0.0.tar.gz
- Upload date:
- Size: 44.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17f1d777d9a0785ed0e57a634f4637bc9e12ece0b0a0e395e1f1b772c5fdd024 |
|
MD5 | 395e28e8c626e56e089322128bb91859 |
|
BLAKE2b-256 | e015c1c5e54547a0fb80e95f06f3f2ee2ccf9c3d85069e5db111df5118e69b55 |
File details
Details for the file HostPhot-2.0.0-py3-none-any.whl
.
File metadata
- Download URL: HostPhot-2.0.0-py3-none-any.whl
- Upload date:
- Size: 51.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73abadab3268648ca817bdf24d629f973a9cb0d7bde3a91b45f03eb70f8ae92d |
|
MD5 | 3aa548df561a175480abe86c2d790773 |
|
BLAKE2b-256 | f95a18375c6d647f4e52d546f2aac9fc5a1decc6e90b8273b2dd5828b78eeb43 |