Open boada opened 7 years ago
Looking into this a bit more... I discovered another issue, maybe it contributes. The catalog search radius is really big.
query Vizier for PANSTARRS at xxxx/ +xxxx in a 3.18 deg radius MAST does currently not allow for PANSTARRS catalog queries with radii larger than 0.5 deg; clip radius to 0.5 deg
My fields aren't 3.18 degrees wide. That's a huge radius to look in.
If you have a field which lies just outside of a catalog footprint (see this example), PP can find stars that are near enough to the field, but not actually overlapping with your image. Basically, PP finds stars at the very edge (or just beyond) your FoV. This causes PP to "succeed" in downloading sources, but it fails to actually match any of them.
PP should then try another of the preferred catalogs, but the code isn't setup to do that right now. Line 67 of calibrate.py makes you think that it will try all of the preferred catalogs, but that isn't the case. Only a single catalog is returned, and the function is never called again.
This makes it hard to run PP in an automated fashion because it can't always find the right catalog.
In a perfect world, I'd like it to download a reference catalog, check to make sure there are enough sources, and then try to match sources. If that fails, only then, would I want it to download another reference catalog. No point in downloading a bunch of stuff you don't end up using.