Input records are ordered per date of observation, and the list of known (observed) sources is cleared.
Each record is compared in position to all the known sources. If the sky distance is less or equal to the specified one, the record is added to the list of observations for that source. If no known sources are within the specified radius, a new source is created, with the coordinates of the observation record. Only records with the rest frequency equal to the H2O 22 GHz line are considered.
It must be noted that some limit cases may occcur depending on the order of the records. For example, if records A,B,C are such that D(A,B)<r, D(B,C)<r, and D(C,A)>r, records A and C may, or may not belong to the same group according to what record is chosen as representative of the source. It is not guaranteed that an observation belongs to the closest source, only that two sources have a distance greater than specified, and distance of observations to sources is less than specified. There are no trivial ways to partition a set of points in a metric space, and this has the advantage of extreme simplicity.
Sky distance is computed as .
For each source, records distant less than the specified minimum interval are deleted. For each record, all subsequent records within the interval are deleted.
Sources are then sorted for decreasing number of independent observations, and sources with at least the specified observations are written in the output file.