shapepipe.modules.make_cat_package.make_cat
shapepipe.modules.make_cat_package.make_cat¶
MAKE CATALOGUE.
This module contains a class to create a shear catalogue.
- Author
Axel Guinot
- prepare_final_cat_file(output_path, file_number_string)[source]¶
Prepare Final Catalogue File.
Create a
FITSCatalogue
object for the current file.- Parameters
- Returns
Output FITS file
- Return type
- remove_field_name(arr, name)[source]¶
Remove Field Name.
Remove a column of a structured array from the given name.
- Parameters
arr (numpy.ndarray) – A numpy strucured array
name (str) – Name of the field to remove
- Returns
The structured array with the field removed
- Return type
- save_sextractor_data(final_cat_file, sexcat_path, remove_vignet=True)[source]¶
Save SExtractor Data.
Save the SExtractor catalogue into the final one.
- Parameters
final_cat_file (file_io.FITSCatalogue) – Final catalogue
sexcat_path (str) – Path to SExtractor catalogue to save
remove_vignet (bool) – If
True
will not save theVIGNET
field into the final catalogue
- save_sm_data(final_cat_file, sexcat_sm_path, do_classif=True, star_thresh=0.003, gal_thresh=0.01)[source]¶
Save Spread-Model Data.
Save the spread-model data into the final catalogue.
- Parameters
final_cat_file (file_io.FITSCatalogue) – Final catalogue
sexcat_sm_path (str) – Path to spread-model catalogue to save.
do_classif (bool) – If
True
objects will be classified into stars, galaxies, and other, using the classifier \({\rm class} = {\rm sm} + 2 * {\rm sm}_{\rm err}\)star_thresh (float) – Threshold for star selection; object is classified as star if \(|{\rm class}| <\)
star_thresh
gal_thresh (float) – Threshold for galaxy selection; object is classified as galaxy if \({\rm class} >\)
gal_thresh
- class SaveCatalogue(final_cat_file)[source]¶
Bases:
object
Save Catalogue.
Class to save catalogue.
- Parameters
final_cat_file (str) – Final catalogue file name
- _update_dict(key_string, value)[source]¶
Update Dictionary.
Update dictionary with value for all keys matching key string.
- Parameters
key_string (str) – Key string
value (numpy.ndarray) – Value to be assigned to the keys
- _add2dict(key, value, index=None)[source]¶
Add to Dictionary.
Add key, value pair to output dictionary.
- _save_ngmix_data(ngmix_cat_path, moments=False)[source]¶
Save NGMIX Data.
Save the NGMIX catalogue into the final one.
- Parameters
ngmix_cat_path (str) – Path to NGMIX catalogue