shapepipe.modules.sextractor_package.sextractor_script
shapepipe.modules.sextractor_package.sextractor_script¶
SEXTRACTOR SCRIPT.
This module builds the SExtractor command line.
- Author
Axel Guinot, Martin Kilbinger
- get_header_value(image_path, key)[source]¶
Get Header Value.
This function reads a value from the header image.
- make_post_process(cat_path, f_wcs_path, pos_params, ccd_size)[source]¶
Make Post Processing.
This function will add one HDU for each epoch to the SExtractor catalogue. Note that this only works for tiles.
The columns will be:
NUMBER
: same as SExtractor NUMBEREXP_NAME
: name of the single exposure for this epochCCD_N
: extension where the object was detected
- class SExtractorCaller(path_input_files, path_output_dir, number_string, path_dot_sex, path_dot_param, path_dot_conv, use_weight, use_flag, use_psf, use_detection_image, use_detection_weight, use_zero_point, use_background, zero_point_key=None, background_key=None, check_image=None, output_prefix=None)[source]¶
Bases:
object
The SExtractor Caller.
This class constructs the command line to call SExtractor based on the input files and parameters.
- Parameters
path_input_files (list) – List with all the paths for the input files
path_output_dir (str) – Path for the output directory
number_string (str) – Pipeline internal file numbering
path_dot_sex (str) – Path to the
.sex
config filepath_dot_param (str) – Path to the
.param
config filepath_dot_conv (str) – Path to the
.conv
kernel fileuse_weight (bool) – Specify if a weight is profided for the measurement
use_flag (bool) – Specify if a flag is provided for the measurement
use_psf (bool) – Specify if a psf is provided for the model
use_detection_image (bool) – Specify if a detection image is provided
use_detection_weight (bool) – Specify if a detection weight is provided
use_zero_point (bool) – Specify whether or not to use a zero point from the input image
use_backgroud (bool) – Specify whether or not to use a background value form the input image
zero_point_key (str, optional) – Header key corresponding to the zero point
background_key (str, optional) – Header key corresponding to the background value
check_image (str, optional) – If provided, add SExtractor check image to the output
output_prefix (str, optional) – If provided, add a prefix to the output file names
- set_input_files(use_weight, use_flag, use_psf, use_detect_img, use_detect_weight)[source]¶
Set Input Files.
Set up all of the input image files.
- Parameters
use_weight (bool) – Specify if a weight is profided for the measurement
use_flag (bool) – Specify if a flag is provided for the measurement
use_psf (bool) – Specify if a psf is provided for the model
use_detect_img (bool) – Specify if a detection image is provided
use_detect_weight (bool) – Specify if a detection weight is provided
- Raises
ValueError – For invalid detection weight
- get_zero_point(use_zp, zp_key=None)[source]¶
Get Zero Point.
Use a zero point from an input image header.
- get_background(use_bkg, bkg_key=None)[source]¶
Get Background.
Use a background value from an input image header.
- get_check_image(check_image)[source]¶
Get Check Image.
Handle the check images if any are requested.
- Parameters
check_image (list) – List of SExtractor keys corresponding to check images
- make_command_line(exec_path)[source]¶
Make Command Line.
This method constructs the command line to run SExtractor.