Return unique source positions in table.
ORIGIN produces a list of lines associated to various sources identified by the ID column. Some objects contain several lines found at slightly different positions.
This function computes the list of unique sources averaging the RA and Dec of each line using the flux as weight. The resulting table contains:
ID: the identifier of the source (unique);
ra, dec: the RA, Dec position in degrees
x, y: the spatial position in pixels,
n_lines: the number of lines associated to the source;
seg_label: the label of the segment associated to the source in the segmentation map;
comp: boolean flag true for complementary sources detected only in the cube before the PCA.
line_merged_flag: boolean flag indicating if any of the lines associated to the source was merged with another nearby line.
waves: a list of the first three wavelengths (comma separated), sorted by decreasing flux
Note: The n_lines contains the number of unique lines associated to the source, but for computing the position of the source, we are using all the duplicated lines as shredded sources may have identical lines found at different positions.
- table: astropy.table.Table
A table of lines from ORIGIN. The table must contain the columns: ID, ra, dec, x, y, flux, seg_label, comp, merged_in, and line_merged_flag.
Table with unique sources.