shapepipe.modules.spread_model_package.spread_model
shapepipe.modules.spread_model_package.spread_model¶
SPREAD MODEL.
Class to compute the spread model, criterion to select galaxies
- Author
Axel Guinot
- get_sm(obj_vign, psf_vign, model_vign, weight_vign)[source]¶
Get Spread Model.
This method compute the spread moel for an object.
- Parameters
obj_vign (numpy.ndarray) – Vignet of the object
psf_vign (numpy.ndarray) – Vignet of the gaussian model of the PSF
model_vign (numpy.ndarray) – Vignet of the galaxy model
weight_vign (numpy.ndarray) – Vignet of the weight at the object position
- Returns
Spread model and corresponding error values
- Return type
- get_model(sigma, flux, img_shape, pixel_scale=0.186)[source]¶
Get Model.
- This method computes
an exponential galaxy model with scale radius = 1/16 FWHM
a Gaussian model for the PSF
- Parameters
- Returns
Vignet of the galaxy model and of the PSF model
- Return type
- class SpreadModel(sex_cat_path, psf_cat_path, weight_cat_path, output_path, pixel_scale, output_mode)[source]¶
Bases:
object
The Spread Model Class.
- Parameters
Notes
For the
output_mode
:new
will create a new catalogue with[number, mag, sm, sm_err]
add
will output a copy of the input SExtractor with the columnssm
andsm_err
- save_results(sm, sm_err, mag, number)[source]¶
Save Results.
Save output catalogue with spread model and errors.
- Parameters
sm (numpy.ndarray) – Value of the spread model for all objects
sm_err (numpy.ndarray) – Value of the spread model error for all objects
mag (numpy.ndarray) – Magnitude of all objects (only for a new catalogue)
number (numpy.ndarray) – ID of all objects (only for a new catalogue)
- Raises
ValueError – For incorrect output mode