save_binned_data_arr#

niriss_tools.sed.save_binned_data_arr(bin_labels, data_path, out_path, signal_hdu_idxs, noise_hdu_idxs=None, var_hdu_idxs=None, crop=None)[source]#

Create a binned photometric catalogue from a segmentation map.

Realistically, this needs to be better thought out. Unlikely that the input will be MEF, highly likely that it’ll be combined from multiple single FITS files.

Parameters:
bin_labelsArrayLike

A 2D int array, containing the bin label assigned to each element of the input arrays.

data_pathPathLike

The multi-extension fits file containing the data to be binned.

out_pathPathLike

The path to save the output.

signal_hdu_idxsArrayLike

The indices of the HDUs containing the direct images.

noise_hdu_idxsArrayLike | None, optional

The indices of the HDUs containing the noise images. One of noise_hdu_idxs and var_hdu_idxs must be given.

var_hdu_idxsArrayLike | None, optional

The indices of the HDUs containing the variance images.

croptuple | None, optional

A crop to be applied to the images before applying the binning scheme, by default None.