ztforce.ztf_images
ZTF IRSA metadata queries, URL construction, FITS/PSF download with retry.
Attributes
Functions
|
Query ZTF IRSA for all science exposures covering (ra, dec) in band. |
|
Construct the IRSA IBE URL for a science image product. |
|
Return True if the FITS file opens without error. |
|
Download url to dest, retrying on failure with exponential backoff. |
|
Download a FITS cutout to dest. |
|
Download a DAOPhot PSF sidecar (.psf) file to dest. |
Module Contents
- query_sci_metadata(ra: float, dec: float, band: str, config: ztforce.config.ZTForceConfig, search_radius_deg: float = 0.01) pandas.DataFrame[source]
Query ZTF IRSA for all science exposures covering (ra, dec) in band.
Returns a DataFrame sorted by obsjd ascending. Raises NoImagesFoundError when no images are found.
- build_sci_url(row: pandas.Series, ra: float, dec: float, suffix: str = 'sciimg.fits', cutout_size_arcmin: float = DEFAULT_CUTOUT_SIZE_ARCMIN) str[source]
Construct the IRSA IBE URL for a science image product.
For FITS files a cutout query is appended so that only a
cutout_size_arcmin×cutout_size_arcminregion centred on(ra, dec)is downloaded. PSF sidecar files are returned in full (they are small text files that describe the whole quadrant).
- _download_with_retry(url: str, dest: pathlib.Path, config: ztforce.config.ZTForceConfig, validate: bool = True) pathlib.Path[source]
Download url to dest, retrying on failure with exponential backoff.
- download_fits(url: str, dest: pathlib.Path, config: ztforce.config.ZTForceConfig) pathlib.Path[source]
Download a FITS cutout to dest.
- download_psf_sidecar(url: str, dest: pathlib.Path, config: ztforce.config.ZTForceConfig) pathlib.Path[source]
Download a DAOPhot PSF sidecar (.psf) file to dest.