measure_coherence

sitelle.source.measure_coherence(source, argmax_map, segm_image=None)

Coherence is a measure of the credibility of a source as an emission line source. It checks if the hot pixels of a source are coming from ~the same frames of the cube by measuring the inverse of the variance around teh source in the detection pos frame. If the source is coherent, the max along the z axis is obtained in the same frame for every pixels of the source (i.e. the velocity is the same) and then the coherence measure is infinite.

Parameters:
  • source (Series) – Row of a DataFrame containing detected sources. Should have columns xpos and ypos, in classic convention (not astropy)
  • detection_pos_frame (2D ndarray) – map of the id along z axis of the max pixels