API Documentation
jhat
st_wcs_align
Created on Thu Apr 21 14:32:42 2022
@author: arest, bhilbert, mcorrenti, acanipe, jpierel
- class jhat.st_wcs_align.st_wcs_align[source]
Main class for alignment.
- outrootdir
output root directory. The output directoy is the output root directory + the outsubdir if not None
- Type:
- telescope
If None, then telescope is determined automatically from the filename (“jw*” and “hst*” for JWST and HST, respectively)
- Type:
- skip_if_exists
Skip doing the analysis of a given input image if the cal file already exists, assuming the full analysis has been already done
- Type:
- refcat_magcol
mag column of reference catalog. If None and not one of the default refcats like gaia, then 3rd column is used
- Type:
- refcat_colorcol
color column of reference catalog. If None, then not used
- Type:
str:
- refcat_pmflag
Apply the proper motion correction (only for catalogs it is applicable, e.g., gaia
- Type:
- refcat_pmmedian
Apply the MEDIAN proper motion correction (only for catalogs it is applicable, e.g., gaia
- Type:
- photfilename
photometry output filename. if “auto”, the fits in the image filename is substituted with phot.txt
- Type:
- load_photcat_if_exists
If the photometric catalog file already exists, skip recreating it.
- Type:
- rematch_refcat
if –load_photcat_if_exists and the photcat already exists, load the photcat, but rematch with refcat
- Type:
- objmag_lim
limits on mag, the magnitude of the objects in the image (iterable of length 2)
- refmag_lim
limits on refcat_mainfilter, the magnitude of the reference catalog (iterable of length 2)
- slope_min
minimum slope for linear correction applied to dx/dy. This effectively accounts for rotation. slopes go from slopemin to -slopemin
- Type:
- Nbright
Use only Nbright brightest objects in image that are matched to refcat for alignment
- Type:
- histocut_order
histocut_order defines whether the histogram cut is first done for dx or first for dy (choices are ‘dxdy’ or ‘dydx’)
- Type:
- xshift
added to the x coordinate before calculating ra,dec (only impacts ra,dec, not x). This can be used to correct for large shifts before matching!
- Type:
- yshift
added to the y coordinate before calculating ra,dec (only impacts ra,dec, not y). This can be used to correct for large shifts before matching!
- Type:
- iterate_with_xyshifts
After the first histogram fit, redo the match with refcat with x/yshift=median(dx/dy) and redo histofit. Use this if the offsets are big, since the second iteration will give you better matching with the refcat
- Type:
- showplots
showplots=1: most important plots. showplots=2: all plots (debug/test/finetune)
- Type:
- saveplots
saveplots=1: most important plots. saveplots=2: all plots (debug/test/finetune)
- Type:
- rough_cut_px_min
first rough cut: best d_rotated+-rough_cut_pix. This is the lower limit for rough_cut
- Type:
- rough_cut_px_max
first rough cut: best d_rotated+-rough_cut_pix. This is the upper limit for rough_cut
- Type:
- d_rotated_Nsigma
Nsigma for sigma cut of d_rotated. If 0.0, then 3-sigma cut is skipped
- Type:
simple_jwst_phot
Created on Wed Apr 27 09:21:15 2022
@author: arest, jpierel, mcorrenti
This is class wrapper around doing simple photometry on a single JWST image
- class jhat.simple_jwst_phot.hst_photclass(psf_fwhm=2, aperture_radius=None, verbose=0)[source]
The photometry class for HST images.
- aperture_phot(filt=None, pupil=None, radii_Nfwhm=None, radius_Nfwhm_sky_in=None, radius_Nfwhm_sky_out=None, radius_Nfwhm_for_mag=None, primaryhdr=None, scihdr=None)[source]
Aperture photometry routine for HST.
- Returns:
table_aper
- Return type:
astropy.table.Table
- match_refcat(max_sep=1.0, borderpadding=40, refcatshort=None, ixs_obj=None, ixs_refcat=None)[source]
Matches the photometry catalog to the reference catalog.
- Parameters:
max_sep (float) – Maximum separation between sources in arcseconds
borderpadding (float) – Pixel separation required from border of image
refcatshort (string, optional) – Short name of reference catalog that is used as prefix for the column names. The default is None. If None, then refcatshort is set to self.refcat.short
indices (list) – The indices to access the photometry catalog, default None (use the full catalog)
- Return type:
None.
- class jhat.simple_jwst_phot.jwst_photclass(verbose=0)[source]
The photometry class for JWST images.
- aperture_phot(filt=None, pupil=None, radii_Nfwhm=None, radius_Nfwhm_sky_in=None, radius_Nfwhm_sky_out=None, radius_Nfwhm_for_mag=None, primaryhdr=None, scihdr=None)[source]
Aperture photometry routine for HST.
- Returns:
table_aper
- Return type:
astropy.table.Table
- match_refcat(max_sep=1.0, borderpadding=40, refcatshort=None, ixs_obj=None, ixs_refcat=None)[source]
Matches the photometry catalog to the reference catalog.
- Parameters:
max_sep (float) – Maximum separation between sources in arcseconds
borderpadding (float) – Pixel separation required from border of image
refcatshort (string, optional) – Short name of reference catalog that is used as prefix for the column names. The default is None. If None, then refcatshort is set to self.refcat.short
indices (list) – The indices to access the photometry catalog, default None (use the full catalog)
- Return type:
None.
st_wcs_align_batch
Created on Mon Apr 25 09:39:07 2022
@author: arest