Given a higher resolution input segmentation map, this function calculates how the original segments are split across a lower resolution segmentation map (segim_warp). The output of this will be used to run profoundProFound using a new target segmention map, and the outputs from this photometry run and the sharemat provided will then be passed to profoundShareFlux to create fluxes for sources that are not present in segim_warp but exist in the original segim_in.
profoundSegimShare(segim_in = NULL, header_in = NULL, header_out = NULL, pixcut = 1,
weights = NULL)Integer matrix; required, the segmentation map we want to remap. If segim_in is a list as created by readFITS, read.fits of magcutoutWCS then the image part of the list is parsed to segim_in and the correct header part is passed to header_in.
Full FITS header in table or vector format. This should be the header WCS that matches segim_in. Legal table format headers are provided by the read.fitshdr function or the hdr list output of read.fits in the astro package; the hdr output of readFITS in the FITSio package or the header output of magcutoutWCS. If header_in is provided then key words will be taken from here as a priority. Missing header keywords are printed out and other header option arguments are used in these cases.
Full FITS header in table or vector format. This is the target WCS projection that segim_in will be mapped onto. Legal table format headers are provided by the read.fitshdr function or the hdr list output of read.fits in the astro package; the hdr output of readFITS in the FITSio package or the header output of magcutoutWCS. If header_out is provided then key words will be taken from here as a priority. Missing header keywords are printed out and other header option arguments are used in these cases.
Integer scalar; the number of pixels required to identify an object on the new low resolution segmentation map.
Numeric vector; additional weights to modify fluxes by. If provided must be the same length as dim(sharemat)[2] (i.e. the original list of segment properties, not the input segstats).
A list containing:
Vector, the input segment IDs present insegim_in.
Vector, the output segment IDs present insegim_warp.
Integer matrix; the remapped image using the target WCS.
Numeric matrix; the sharing matrix which will have dimenstion length(segID_warp) x length(segID_in).
Numeric vector; the fraction of non-sky segim_in pixels that match the output segim_warp, so if near 1 then segim_warp segment should be quite clean of subpixel contaminants.