save_binned_data_fits#
- niriss_tools.sed.save_binned_data_fits(bin_labels, out_path, filter_keys, signal_paths, var_paths, crop=None, header=None, overwrite=True)[source]#
Create a binned photometric catalogue from a segmentation map.
Unlike
save_binned_data_arr, this uses as input multiple FITS files containing the signal and variance arrays.- Parameters:
- bin_labels
ArrayLike A 2D
intarray, containing the bin label assigned to each element of the input arrays.- out_path
PathLike The path to save the output.
- filter_keys
list The names of the filters corresponding to each of the signal and variance image pairs. These will be used as column names in the photometric catalogue.
- signal_paths
list A list containing the locations of the direct images.
- var_paths
list A list containing the locations of the associated variance images.
- crop
tuple|None, optional A crop to be applied to the images before applying the binning scheme, by default None.
- header
fits.Header|None=None If supplied, this will be used to generate a header for the segmentation map in the output file. If
None, a header will be taken from the first image insignal_paths.- overwritebool, optional
If a catalogue already exists at
out_path, this determines if it should be written over. By defaultTrue.
- bin_labels