akleroy / galbase

Nearby galaxies database for use with multiwavelength image analysis.
6 stars 6 forks source link

Robustness to NGC0628 vs NGC628 kind of thing? #3

Closed karinsandstrom closed 10 years ago

karinsandstrom commented 10 years ago

If there's time at some point, it would be good to make the code work with small variations on the names like the leading 0 on 628.

akleroy commented 10 years ago

What rules? I'll add a bit of logic to the alias construction that adds an alias with a leading zero if the thing stars in NGC and has only six characters and then another if it starts in UGC and has only seven. Otherwise, I'm worried about possible duplications. But I may just be being spacey.

karinsandstrom commented 10 years ago

That seems fine to me. Another option is to by default remove leading zeros from everything with NGC/UGC/PGC and only have names in the list with no zeros? That would make it robust to accepting any version of 0628 or 628 or 0000628 since it'll just hack off the zeros in searching.

akleroy commented 10 years ago

I think that I have patched this at the alias stage. LEDA seems to always have 0s in it for the name, so I added an alias for every IC, UGC, and NGC that is the prefix + string (no leading zeros) of the catalog number. If it doesn't work let me know.