dstndstn / astrometry.net

Astrometry.net -- automatic recognition of astronomical images
http://astrometry.net
Other
671 stars 188 forks source link

Only annotate each object once, to help avoid overlapping text #300

Open nealmcb opened 3 months ago

nealmcb commented 3 months ago

As noted in the google group at Annotation needs some optimization, sometimes multiple annotations are shown for a single object, resulting in overlapping unreadable text.

dwhogg noted, "This is because we have duplicate names in the catalog we use for labeling."

As @dstndstn noted, the code which does the annotations is at https://github.com/dstndstn/astrometry.net/blob/main/plot/plotann.py and "this is a hard problem".

Some more hints on the causes of the problem and possible solution approaches might help produce a pull request.

Many thanks for an amazing program and service!

dstndstn commented 3 months ago

Hi,

Are you trying to solve the specific problem the original poster mentioned, or make general progress on improving the annotations?

The former might be relatively easy. It's probably because there is an entry in the bright star catalog, and a duplicate entry in the HD catalog, and both get labelled. One could check whether an object within N pixel had already been labelled.

The more general problem - how do you annotate a good number of objects without making a huge mess - is harder. The density of objects varies greatly across the sky, so you can't use simple rules like 'label stars if the image is less than a degree across' - that's more-or-less what the current code does. I think what one wants to do is label objects in some brightness ordering, and stop labeling when they start colliding, or a certain number have been labelled. Or something like that. It would take some experimenting. I don't know that we have all the information we would need (brigthness orderings) in the input catalogs, so one would have to gather that too.

cheers, dustin

On Sat, Jul 13, 2024 at 12:19 PM Neal McBurnett @.***> wrote:

As noted in the google group at Annotation needs some optimization https://groups.google.com/g/astrometry/c/VqFO17KXUyg/m/EKoO2w_eAwAJ, sometimes multiple annotations are shown for a single object, resulting in overlapping unreadable text.

dwhogg noted, "This is because we have duplicate names in the catalog we use for labeling."

As @dstndstn https://github.com/dstndstn noted, the code which does the annotations is at https://github.com/dstndstn/astrometry.net/blob/main/plot/plotann.py and "this is a hard problem".

Some more hints on the causes of the problem and possible solution approaches might help produce a pull request.

Many thanks for an amazing program and service!

— Reply to this email directly, view it on GitHub https://github.com/dstndstn/astrometry.net/issues/300, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIEH7IGQA3TH5CCQ7SSQGLZMFHRRAVCNFSM6AAAAABK2MP6V6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGQYDOMBUGMYDCNY . You are receiving this because you were mentioned.Message ID: @.***>

nealmcb commented 3 months ago

Many thanks for the additional background! The annotation that started me on this journey is https://nova.astrometry.net/user_images/10361523#annotated I presume that it is most similar to the original poster's problem: the same star (T Coronae Borealis) is well-known and has names in multiple catalogs. Given the challenges you note, providing website visitors with some additional information would be helpful. If it had a tab providing a list of the provided annotations and their locations, I'd be able to at least figure out what names are being overlaid. I'd also enjoy a tab for a list of all available annotations, including those that the algorithm decided to omit.

dstndstn commented 3 months ago

Something like that is available in the API: eg, for your example, https://nova.astrometry.net/api/jobs/10935053/annotations

nealmcb commented 3 months ago

Cool - great to see how easy the API is to use! In fact it inspired me to give a shot at an PR to clarify that: #301 API key not always required

If, as I suggest there, a further step was taken to create an API menu URL, linking to all other API options for given object, and add another tab with a link to that URL for the current object, then these very handy features would be much more discoverable.