add_bpm

ndmapper.lib.cosmetics.add_bpm(*args, **kwargs)[source] [edit on github]

Incorporate an existing bad pixel mask into the corresponding flags attributes of the input DataFile instances.

Parameters:

inputs : DataFileList or DataFile

Input images to which the bad pixel mask is to be added (via logical OR with any existing flags information).

bpm : DataFileList or DataFile

Bad pixel mask, as produced by init_bpm, with integer data quality flags stored in the main data array of each constituent NDLater instance. The length (number of NDLater instances) and shape of each constituent array must match the inputs.

out_names : convertible to str, optional

Output filenames. If None (default), the names of the DataFile instances returned will be constructed from those of the input files, prefixed with ‘k’.

Returns:

DataFileList

Copies of the inputs, with the bad pixel mask values included in the flags attribute of each constituent NDLater instance.