How to control the number of matches when do astrometry?

Hi Yuanyu,

Thanks a lot for the updates.

I don’t think that we’d recommend hacking the pipeline code.

According to this forum post, the sorting by magnitude happens in a file called matchPessimisticB.py (though at this level of detail I suppose the source could have changed over the last year plus).

It seems to me based on your final quiver plot that the maxRefObjects config parameter approach is working as intended?

As part of the single-frame processing, there can be outputs called srcMatch generated that summarize the reference catalog matches found. Those may be interesting to have a look at, as far as assessing spatial uniformity of your reference selections.

I’m not immediately concerned that you ended up with only 260 matches when specifying maxRefObjects=500 — I can check this in more detail later, but I think that the capping of number of reference stars may happen before the cross-match (not after).

Another option you could consider is somehow modifying/trimming your input reference catalogs to only have e.g., a certain range of magnitudes or spatial density.

Lastly, the same forum topic I’ve mentioned previously has some interesting suggestions about making use of the astrometry.referenceSelector and astrometry.sourceSelector tasks. I have not personally worked with those, but they do seem potentially relevant here.