shapepipe.modules.psfex_interp_package.psfex_interp
shapepipe.modules.psfex_interp_package.psfex_interp¶
PSFEX INTERPOLATION SCRIPT.
This module computes the PSFs from a PSFEx model at several galaxy positions.
- Authors
Morgan Schmitz and Axel Guinot
- interpsfex(dotpsfpath, pos, thresh_star, thresh_chi2)[source]¶
Interpolate PSFEx.
Use PSFEx generated model to perform spatial PSF interpolation.
- Parameters
dotpsfpath (str) – Path to
.psf
file (PSFEx output)pos (numpy.ndarray) – Positions where the PSF model should be evaluated
thresh_star (int) – Threshold of stars under which the PSF is not interpolated
thresh_chi2 (int) – Threshold for chi squared
- Returns
Array of PSFs, each row is the PSF image at the corresponding position requested
- Return type
- class PSFExInterpolator(dotpsf_path, galcat_path, output_path, img_number, w_log, pos_params=None, get_shapes=True, star_thresh=20, chi2_thresh=2)[source]¶
Bases:
object
The PSFEx Interpolator Class.
This class uses a PSFEx output file to compute the PSF at desired positions.
- Parameters
dotpsf_path (str) – Path to PSFEx output file
galcat_path (str) – Path to SExtractor-like galaxy catalogue
output_path (str) – Path to folder where output PSFs should be written
img_number (str) – File number string
w_log (logging.Logger) – Logging instance
pos_params (list, optional) – Desired position parameters, ff provided, there should be exactly two, and they must also be present in the galaxy catalogue; otherwise, they are read directly from the
.psf
file.get_shapes (bool) – If
True
will compute shapes for the PSF modelstar_thresh (int) – Threshold of stars under which the PSF is not interpolated
thresh_chi2 (int) – Threshold for chi squared
- _get_position_parameters()[source]¶
Get Position Parameters.
Read position parameters from
.psf
file.
- _get_galaxy_positions()[source]¶
Get Galaxy Positions.
Extract galaxy positions from galaxy catalogue.
- _interpolate()[source]¶
Interpolate.
Run Sheldon and Rykoff’s PSFEx interpolator method at the desired positions.
- process_validation(psfex_cat_path)[source]¶
Process Validation.
Process validation steps.
- Parameters
str – Path to PSFEx catalogue
- _get_starshapes(star_vign)[source]¶
Get Star Shapes.
Compute shapes of stars at stars positions using HSM.
- Parameters
numpy.ndarray – Array containing the star’s vignets.
- _get_psfexcatdict(psfex_cat_path)[source]¶
Get PSFEx Catalogue Dictionary.
Get data from PSFEx
.cat
file.
- _write_output_validation(star_dict, psfex_cat_dict)[source]¶
Write Output Validation.
Save computed PSFs and stars to fits file.
- process_me(dot_psf_dir, dot_psf_pattern, f_wcs_path)[source]¶
Process Multi-Epoch.
Process the multi-epoch.