astronexus / HYG-Database

Current version of the HYG Stellar database
http://www.astronexus.com/hyg
Other
747 stars 143 forks source link

Constellation incorrect for a few stars #21

Closed ghost closed 12 months ago

ghost commented 4 years ago

I wrote a program to compute constellation values and used hygdata to check my program's accuracy. In a few cases, my program gave a different constellation, so I used Stellarium to break the tie, and Stellarium agreed with my answer.

If you feel these corrections are valid, I'd be happy to run my program on the entire list and make corrections as needed, but I wanted to doublecheck first in case you think the existing values are valid. I realize that Stellarium may not be canonical.

In the three cases above, the stars are very close to a constellation boundary line.

The program I wrote uses CSPICE to precess to B1875 and then a "straight line" algorithm to compute constellation:

https://github.com/barrycarter/bcapps/tree/master/ASTRO/CONSTELLATIONS/bc-constell.c

My program is derived from an existing implementation I copied to my git (but isn't my work):

https://github.com/barrycarter/bcapps/tree/master/ASTRO/CONSTELLATIONS/constel.c

cosinekitty commented 4 years ago

I'm working on a project I call Astronomy Engine. I'm in the process of adding constellation support, and I'm also trying to use hygdata_v3.csv as my test input. For what it's worth, in my own test code, I'm seeing those same errors (the exact same 3 stars, with the same disagreeing constellations), plus 22 other disagreements:

Star   3865: expected And, found Psc at B1875 RA=  0.716814, DEC= 29.753848
Star   7751: expected Phe, found Eri at B1875 RA=  1.583497, DEC=-52.227220
Star  10342: expected Per, found And at B1875 RA=  2.089288, DEC= 50.478513
Star  19173: expected Hyi, found Ret at B1875 RA=  4.110955, DEC=-67.498972
Star  22400: expected Aur, found Per at B1875 RA=  4.691347, DEC= 37.268412
Star  27992: expected Ori, found Mon at B1875 RA=  5.833560, DEC= -8.641222
Star  29366: expected Lyn, found Dor at B1875 RA=  6.198119, DEC=-65.492354
Star  30112: expected Ori, found Mon at B1875 RA=  6.241878, DEC=  2.624997
Star  52886: expected Hya, found Crt at B1875 RA= 10.750184, DEC=-16.823213
Star  58221: expected Leo, found Com at B1875 RA= 11.866923, DEC= 27.534013
Star  59234: expected UMa, found CVn at B1875 RA= 12.083512, DEC= 49.190935
Star  67599: expected Aps, found Cha at B1875 RA= 13.666468, DEC=-79.651252
Star  72017: expected Vir, found Lib at B1875 RA= 14.666728, DEC= -0.920981
Star  74021: expected Boo, found Ser at B1875 RA= 15.083340, DEC= 25.919065
Star  84413: expected Her, found Oph at B1875 RA= 17.212259, DEC= 10.996214
Star  85957: expected Ara, found Aps at B1875 RA= 17.401194, DEC=-67.500718
Star  87694: expected Sco, found Sgr at B1875 RA= 17.833538, DEC=-31.524142
Star  89105: expected Aps, found Pav at B1875 RA= 18.000166, DEC=-70.775338
Star  91382: expected Ser, found Aql at B1875 RA= 18.583543, DEC= -3.236546
Star  92907: expected Sct, found Sgr at B1875 RA= 18.866741, DEC=-12.757064
Star  93308: expected Vul, found Sge at B1875 RA= 18.972321, DEC= 21.082870
Star  95468: expected Dra, found Cyg at B1875 RA= 19.440102, DEC= 57.999255
Star 100777: expected Tel, found Ind at B1875 RA= 20.333550, DEC=-55.531552
Star 101541: expected Cyg, found Cep at B1875 RA= 20.600095, DEC= 60.562686
Star 105623: expected Mic, found PsA at B1875 RA= 21.333436, DEC=-33.417234
ConstellationTest: 25 failures

I'm assuming that the RA/DEC values from the file are all J2000.0, and I'm converting them all to B1875.0. I have not been able to find the official definition of B1875.0, so I'm assuming it is noon on January 1, 1875. Is that correct? I included my calculated B1875 coordinates in the output above. @barrycarter Do my rotated coordinates match yours?

brandon-rhodes commented 4 years ago

@cosinekitty — I think there are two issues here. The first is that you are not applying the proper motion over the period 1875–2000, which moves the first star in your list (which I take as an example) much closer to the boundary:

from skyfield.api import Star, load
from skyfield.positionlib import Barycentric

ts = load.timescale(builtin=True)
t = ts.utc(1875, 1, 1)
barycenter = Barycentric([0,0,0], t=t)
star = Star(
    ra_hours=0.829133, dec_degrees=30.435941,
    ra_mas_per_year=21.84,
    dec_mas_per_year=-19.40,
)
pos = barycenter.observe(star)
ra, dec, distance = pos.radec(epoch=t)
print(ra.hours, dec.degrees)

The result:

0.716754211721423 29.75450842763005

The constellation boundaries file lists that western boundary as at 0.7167, nearly the same as the star's position. (I interpret 0.7167, by the way, as actually 0.71666666666667 but rounded to 4 digits when I use constellation boundaries.)

Is it possible that our estimate of this star's proper motion has changed since it was first cataloged, and that a slight change in our proper motion estimate now fails to carry it across the boundary? That would be my guess. In which case, there's no easy limit we can place on how many stars in the future will be found to actually have been on the other side of a boundary in 1875 that we didn't at first think that they had made it across. (Or vice-versa.)

cosinekitty commented 4 years ago

That is interesting about proper motion. So that means these stars were assigned to constellations in 1875 and they are stuck with those constellation names forever, even if they were outside the constellation's boundaries in 2000?

Also, it looks like you are using midnight 1 January 1875 as the B1875 epoch, where I'm using noon. I spent almost an hour searching online and in books to find which was right, but could not find the official answer. Because J2000 is based at noon, I'm guessing B1875 is noon also, not midnight. I tried an experiment where I changed it to midnight in my code. Those 12 hours make a difference of up to 0.00002 degrees of precession/nutation. But this didn't change any disagreements about constellations between my code and the star database.

I think you are right about the 0.7167 really being 0.7166666666.... It looks like many of the original boundaries must have been in degrees and minutes. I found one case in the original constel.c from http://cdsarc.u-strasbg.fr/viz-bin/ftp-index?VI/42 where it looks like the boundary was on a quarter arcminute:

{240.0000,246.3125,-42.0000,"Sco"}, 

The 246.3125 degrees right ascension = 14778.75 arcminutes. I'm going to try "snapping" all the boundaries to the nearest quarter arcminute and see what happens. I'll bet that was closer to the original definitions.

cosinekitty commented 4 years ago

@brandon-rhodes Thank you so much for your help, btw. I looked at some of your astronomy projects and they are amazing. My goal is to make something with much looser accuracy (1 arcminute) but very fast and tiny, and with no external dependencies, for C, C#, Python, and JS. Good enough for backyard astronomers, calendars, that sort of thing.

I tried applying proper motion backwards in time 125 years. The results got worse, LOL. The star you mentioned, id=3865, is closer to what you calculated, but not quite the same. At this point, I'm going to stash my proper motion changes and omit the 25 problem stars from my unit test data. I figure 25 out of 117958 stars isn't worth worrying about for what I'm trying to do.

Star   3865: expected And, found Psc at B1875 RA=  0.716763, DEC= 29.754520
Star   7751: expected Phe, found Eri at B1875 RA=  1.583738, DEC=-52.224490
Star   9820: expected Psc, found Cet at B1875 RA=  2.000028, DEC=  9.880759
Star  10342: expected Per, found And at B1875 RA=  2.088487, DEC= 50.484364
Star  15285: expected Ari, found Per at B1875 RA=  3.167007, DEC= 30.668647
Star  15563: expected Cam, found Cas at B1875 RA=  3.153712, DEC= 68.000169
Star  19173: expected Hyi, found Ret at B1875 RA=  4.110935, DEC=-67.499429
Star  22400: expected Aur, found Per at B1875 RA=  4.691438, DEC= 37.267091
Star  25364: expected Tau, found Aur at B1875 RA=  5.306365, DEC= 28.501692
Star  27992: expected Ori, found Mon at B1875 RA=  5.833548, DEC= -8.641192
Star  29366: expected Lyn, found Dor at B1875 RA=  6.198079, DEC=-65.497602
Star  30112: expected Ori, found Mon at B1875 RA=  6.241916, DEC=  2.625792
Star  52886: expected Hya, found Crt at B1875 RA= 10.750209, DEC=-16.823375
Star  58221: expected Leo, found Com at B1875 RA= 11.866896, DEC= 27.533948
Star  59234: expected UMa, found CVn at B1875 RA= 12.083495, DEC= 49.191788
Star  63028: expected Cru, found Cen at B1875 RA= 12.833353, DEC=-55.629468
Star  67599: expected Aps, found Cha at B1875 RA= 13.666496, DEC=-79.650980
Star  72017: expected Vir, found Lib at B1875 RA= 14.666761, DEC= -0.920443
Star  74021: expected Boo, found Ser at B1875 RA= 15.083444, DEC= 25.918169
Star  77230: expected Boo, found Her at B1875 RA= 15.750373, DEC= 46.169960
Star  84413: expected Her, found Oph at B1875 RA= 17.212243, DEC= 10.999609
Star  85957: expected Ara, found Aps at B1875 RA= 17.401177, DEC=-67.500307
Star  87694: expected Sco, found Sgr at B1875 RA= 17.833535, DEC=-31.523681
Star  89105: expected Aps, found Pav at B1875 RA= 18.000182, DEC=-70.774813
Star  91382: expected Ser, found Aql at B1875 RA= 18.583409, DEC= -3.236609
Star  92907: expected Sct, found Sgr at B1875 RA= 18.866728, DEC=-12.757079
Star  93308: expected Vul, found Sge at B1875 RA= 18.972287, DEC= 21.082900
Star  95468: expected Dra, found Cyg at B1875 RA= 19.440082, DEC= 57.999364
Star 100777: expected Tel, found Ind at B1875 RA= 20.333605, DEC=-55.534162
Star 101541: expected Cyg, found Cep at B1875 RA= 20.600080, DEC= 60.562602
Star 105623: expected Mic, found PsA at B1875 RA= 21.333352, DEC=-33.415712
ConstellationTest: 31 failures
brandon-rhodes commented 4 years ago

That is interesting about proper motion. So that means these stars were assigned to constellations in 1875 and they are stuck with those constellation names forever, even if they were outside the constellation's boundaries in 2000?

I don’t actually know the full protocol. If the star is part of their actual name or designation, I don’t know if they are re-named when they cross to another constellation. I suppose for most of these stars their actual designation is simply a constellation-less number, that will remain the same through the long ages that they wander between constellations.

I agree completely that the boundaries are arcminutes, I think that's how they were set up, yes.

I like the idea of a simple library that works across languages, and am surprised one doesn’t exist already. For simple arcminute precision, will you be using VSOP87 like the PyEphem library?

cosinekitty commented 4 years ago

I already have calculations for the moon and planets working in all 4 languages. And yes, I use a truncated version of VSOP87 for Mercury...Neptune, a truncated Chebyshev model for Pluto, and the Nautical Almanac Office's Improved Lunar Ephemeris of 1954 model for the moon. I wrote a source code generator that iteratively prunes the planet models to make them as small as possible without exceeding 1 arcminute error as seen from the Earth. Then it writes the data declarations in all 4 languages. I have a unit test that then runs the generated code and compares the calculations for the 4 languages against NOVAS C 3.1 to confirm less than 1 arcminute error in all cases. It also verifies that all 4 libraries calculate all numbers within 2.0e-12 of each other.

Especially for the JavaScript version, I wanted the code as small as possible, so a web page could do calculations and still load fast. Even after adding the constellation finder, my minified JS right now is 67771 bytes; there is no way I could do that with the full VSOP87 model! Of course it's also faster to use truncated series, but that was not nearly as important to me as small code.

brandon-rhodes commented 4 years ago

That sounds like a fun project! I hope it continues to go well :)

ghost commented 4 years ago
Star 3865: expected And, found Psc at B1875 RA= 0.716807, DEC= 29.753806
Star 7751: expected Phe, found Eri at B1875 RA= 1.583491, DEC= -52.227261
Star 10342: expected Per, found And at B1875 RA= 2.089281, DEC= 50.478473
Star 19173: expected Hyi, found Ret at B1875 RA= 4.110953, DEC= -67.499001
Star 22400: expected Aur, found Per at B1875 RA= 4.691339, DEC= 37.268388
Star 27992: expected Ori, found Mon at B1875 RA= 5.833554, DEC= -8.641234
Star 29366: expected Lyn, found Dor at B1875 RA= 6.198119, DEC= -65.492363
Star 30112: expected Ori, found Mon at B1875 RA= 6.241872, DEC= 2.624989
Star 52886: expected Hya, found Crt at B1875 RA= 10.750178, DEC= -16.823178
Star 58221: expected Leo, found Com at B1875 RA= 11.866916, DEC= 27.534053
Star 59234: expected UMa, found Cvn at B1875 RA= 12.083505, DEC= 49.190976
Star 67599: expected Aps, found Cha at B1875 RA= 13.666459, DEC= -79.651210
Star 72017: expected Vir, found Lib at B1875 RA= 14.666721, DEC= -0.920943
Star 74021: expected Boo, found Ser at B1875 RA= 15.083335, DEC= 25.919101
Star 80302: expected Sco, found Oph at B1875 RA= 16.323165, DEC= -18.848203
Star 80540: expected Sco, found Oph at B1875 RA= 16.374202, DEC= -18.405205
Star 84413: expected Her, found Oph at B1875 RA= 17.212253, DEC= 10.996234
Star 85957: expected Ara, found Aps at B1875 RA= 17.401182, DEC= -67.500701
Star 87694: expected Sco, found Sgr at B1875 RA= 17.833530, DEC= -31.524129
Star 89105: expected Aps, found Pav at B1875 RA= 18.000152, DEC= -70.775327
Star 91382: expected Ser, found Aql at B1875 RA= 18.583536, DEC= -3.236541
Star 92907: expected Sct, found Sgr at B1875 RA= 18.866734, DEC= -12.757062
Star 93308: expected Vul, found Sge at B1875 RA= 18.972316, DEC= 21.082870
Star 95468: expected Dra, found Cyg at B1875 RA= 19.440100, DEC= 57.999251
Star 100777: expected Tel, found Ind at B1875 RA= 20.333540, DEC= -55.531567
Star 101541: expected Cyg, found Cep at B1875 RA= 20.600093, DEC= 60.562669
Star 105623: expected Mic, found Psa at B1875 RA= 21.333428, DEC= -33.417257
Star 117789: expected And, found Peg at B1875 RA= 23.861182, DEC= 31.333313

I wrote and ran https://github.com/barrycarter/bcapps/blob/9c1d66bb0dd74e1ac5ffc5d3b26c5bb4ac257409/ASTRO/bc-constell-star.c to generate the above. Notes:

cosinekitty commented 4 years ago

@barrycarter That is awesome, thanks. I looked at your C program and it makes sense. I would be very interested to read your j2000tob1875 function. Where is that? Did you use noon or midnight for the 1875 epoch? I used noon. If you used midnight, that would explain the discrepancy between our respective coordinate calculations.

brandon-rhodes commented 4 years ago

@cosinekitty — Happily, GitHub has a search bar hidden (it took me a while to learn to use it consistently) in the upper right corner of each repository. By scrolling to the top of the page at @barrycarter’s C program you can search his repository for “j2000tob1875” which brings up what I think is the routine he’s calling:

https://github.com/barrycarter/bcapps/blob/bf7c0193119e70d11cb7ec1666f2f839df836dfb/ASTRO/bclib.h#L911

My use of midnight for B1875 was simple laziness, because with something like proper motion it did not seem worth typing the extra decimal places beyond getting the right day. Here’s the official formula that Skyfield uses to generate the modern Julian Date for an epoch like “B1875”:

https://github.com/skyfielders/python-skyfield/blob/c3b83fa0a99ca171607d0f78d4648a52190d5e3b/skyfield/timelib.py#L721

I get JD 2405889.258550475 for B1875 using that routine.

brandon-rhodes commented 4 years ago

@cosinekitty — I probably got that formula from https://en.wikipedia.org/wiki/Epoch_(astronomy)#Besselian_years which probably gets it from Meeus.

ghost commented 4 years ago

More later, but quick ugly answer: https://github.com/barrycarter/bcapps/blob/master/ASTRO/bclib.h#L911

(yes, I know you're not supposed to create functions in .h files)

I used the CSPICE library: https://naif.jpl.nasa.gov/naif/

cosinekitty commented 4 years ago

@brandon-rhodes That was helpful about the Besselian year definition on Wikipedia. I get the same JD value you did. That implies that the B1875 epoch was at

TT = 1874-12-31 18:12:18.761
UT = 1874-12-31 18:12:21.950

So I was almost 18 hours off! Like you said, it hardly matters, but I like to nail things down anyway.

@barrycarter Your constant of -3944592000 seconds corresponds to noon on 1875-01-01, just like what I was doing. Maybe our numbers were different because of using different formulas for precession and nutation. I think they are close enough that it doesn't really matter. I'll take it as a confirmation that what I'm doing is close enough for determining constellation boundaries.

Anyway, even after making the -18 hour correction for the epoch, I'm still seeing disagreement about constellations for 26 stars. My updated output is below. I'm not going to lose any sleep over 26 out of 117984 stars.

Star   3865: expected And, found Psc at B1875 RA=  0.716812, DEC= 29.753839
Star   7751: expected Phe, found Eri at B1875 RA=  1.583496, DEC=-52.227227
Star  10342: expected Per, found And at B1875 RA=  2.089285, DEC= 50.478508
Star  19173: expected Hyi, found Ret at B1875 RA=  4.110955, DEC=-67.498972
Star  22400: expected Aur, found Per at B1875 RA=  4.691345, DEC= 37.268413
Star  27992: expected Ori, found Mon at B1875 RA=  5.833559, DEC= -8.641217
Star  29366: expected Lyn, found Dor at B1875 RA=  6.198119, DEC=-65.492348
Star  30112: expected Ori, found Mon at B1875 RA=  6.241877, DEC=  2.625003
Star  52886: expected Hya, found Crt at B1875 RA= 10.750182, DEC=-16.823202
Star  58221: expected Leo, found Com at B1875 RA= 11.866922, DEC= 27.534022
Star  59234: expected UMa, found CVn at B1875 RA= 12.083511, DEC= 49.190945
Star  67599: expected Aps, found Cha at B1875 RA= 13.666463, DEC=-79.651245
Star  72017: expected Vir, found Lib at B1875 RA= 14.666726, DEC= -0.920977
Star  74021: expected Boo, found Ser at B1875 RA= 15.083339, DEC= 25.919068
Star  78313: expected Lib, found Sco at B1875 RA= 15.916669, DEC=-19.102109
Star  84413: expected Her, found Oph at B1875 RA= 17.212258, DEC= 10.996211
Star  85957: expected Ara, found Aps at B1875 RA= 17.401191, DEC=-67.500721
Star  87694: expected Sco, found Sgr at B1875 RA= 17.833537, DEC=-31.524147
Star  89105: expected Aps, found Pav at B1875 RA= 18.000163, DEC=-70.775343
Star  91382: expected Ser, found Aql at B1875 RA= 18.583541, DEC= -3.236553
Star  92907: expected Sct, found Sgr at B1875 RA= 18.866740, DEC=-12.757071
Star  93308: expected Vul, found Sge at B1875 RA= 18.972320, DEC= 21.082862
Star  95468: expected Dra, found Cyg at B1875 RA= 19.440101, DEC= 57.999247
Star 100777: expected Tel, found Ind at B1875 RA= 20.333548, DEC=-55.531562
Star 101541: expected Cyg, found Cep at B1875 RA= 20.600094, DEC= 60.562676
Star 105623: expected Mic, found PsA at B1875 RA= 21.333434, DEC=-33.417244
cosinekitty commented 4 years ago

@brandon-rhodes Oh yes, thanks for pointing out the GitHub search bar. That is really useful!

ghost commented 4 years ago
id,filecon,curcon,oldcon
003865,AND,PSC,PSC
007751,PHE,ERI,ERI
009820,PSC,PSC,CET
010342,PER,AND,AND
015285,ARI,ARI,PER
015563,CAM,CAM,CAS
019173,HYI,RET,RET
022400,AUR,PER,PER
025364,TAU,TAU,AUR
027992,ORI,MON,MON
029366,LYN,DOR,DOR
030112,ORI,MON,MON
052886,HYA,CRT,CRT
058221,LEO,COM,COM
059234,UMA,CVN,CVN
063028,CRU,CRU,CEN
067599,APS,CHA,CHA
072017,VIR,LIB,LIB
074021,BOO,SER,SER
077230,BOO,BOO,HER
080302,SCO,OPH,OPH
080540,SCO,OPH,OPH
084413,HER,OPH,OPH
085957,ARA,APS,APS
087694,SCO,SGR,SGR
089105,APS,PAV,PAV
091382,SER,AQL,AQL
092907,SCT,SGR,SGR
093308,VUL,SGE,SGE
095468,DRA,CYG,CYG
100777,TEL,IND,IND
101541,CYG,CEP,CEP
105623,MIC,PSA,MIC
117789,AND,PEG,AND

I wrote and ran:

https://github.com/barrycarter/bcapps/blob/691b607881df16840c8db14b34f26e03133e8192/ASTRO/bc-constell-star-2.c

to find discrepancies between the following:

The "029366,LYN,DOR,DOR" entry surprised me since Lynx and Dorado are nowhere near each other. However, the declination for this star, -65.531150, and the following URL:

http://server7.wikisky.org/starview?object_type=1&object_id=2328064&object_name=HIP+29439&locale=EN

have convinced me this is really in Dorado, not Lynx.

I didn't scan the other entries for possible obvious errors, however.

astronexus commented 1 year ago

Not sure how closely this is being followed, so just in case:

I am going to be revisiting constellation IDs for the new AT-HYG catalog, which adds Tycho-2 data to the HYG data set. The original constellation calculation was simpler than the process described by the original commenter and I will be looking at higher accuracy for the next revision. Exact method TBD but will likely be similar.

cosinekitty commented 1 year ago

I'm still using your star catalog for my Astronomy Engine project's automated test suite. Currently I'm using a frozen version of the file to make my tests immune to unexpected changes. However, I would be happy to experiment with your updated version when available, if it would be of any help.

astronexus commented 12 months ago

I've done an analysis of what the old constellation assignment did and see two issues:

1). Somewhat simplified approach to coordinate conversion (accounted for precession only, not any other effects) 2). The aforementioned precession calculation's main parameter (rate of change of ecliptic longitude) was slightly off, adding up to about 18" over the 125-year period needed to do constellation boundary checks easily.

The updated rate (per year): 50.28796" + 0.002210897 t + higher-order terms (generally negligible for t on the order of a few centuries) -- as in N. Capitaine et al. 2003, p. 581 -- the value given there is the total precession over the interval, so the first derivative of that is the rate.

Problem 2) was easily fixed once identified: when I used that better expression above, it fixed the 3 stars in the initial bug report as well as most of the others reported later on, but not all. There were residual differences from other people's reported calculations in this bug report, on the order of 5-10 arcseconds, and a few stars remained inconsistent with the reports already in this issue page. As noted above, this seems overwhelmingly likely to be from additional effects beyond the main precession component.

So rather than try to revise the old calculation process further, I am going to find a module/application/etc I can use that already implements a more comprehensive calculation. I'll update HYG first as a new version and then AT-HYG once HYG looks ok.

astronexus commented 12 months ago

As part of this initial analysis, I found 4 stars whose constellation designations are definitely incorrect or obsolete, and which likely came from importing an update to the Flamsteed designations many years ago to add ones that were not in the original YBSC.

HYG 10342: Flamsteed designation is "6 Per", but is now in Andromeda. HYG 22400: Flamsteed "1 Aur", but is now in Perseus. HYG 29366: Flamsteed "9 Lyn", but is actually in the far southern sky (Dorado) and that ID is simply wrong (it's not at all clear where it came from) HYG 84413: Flamsteed "66 Her", but is now in Ophiuchus.

Established modern conventions are to drop Flamsteed designations that correspond to the wrong (modern) constellation (e.g., 10 UMa, which is now one of the brighter stars in Lynx and has no traditional ID anymore).

The next minor version release of HYG and AT-HYG will correct these 4 stars by removing the Flamsteed numbers and updating the constellations. The next significant release after that will add the constellations obtained from more accurate coordinate conversion, as described above.

astronexus commented 12 months ago

HYG v3.5.1 with the 4 minor fixes described above has been released.

astronexus commented 12 months ago

One other thing: Stars HYG 80302 and HYG 80540 really are in Sco, not Oph, and do not need to be changed. There is an error in the original reference (https://iopscience.iop.org/article/10.1086/132034) -- the entry in Table 1 for B1875 declination -19.25 degrees should have a Con of "Sco", not "Oph". Without that change, a small protrusion of Scorpius eastward into Ophiuchus will incorrectly be treated as part of Ophiuchus).

An application that uses this reference's constellation-finding algorithm and data unchanged will make this mistake.

cosinekitty commented 12 months ago

Thanks @astronexus for all the work you do to provide this amazing resource!

For what it's worth, I updated to HYG v3.5.1 and re-ran the original Astronomy Engine unit tests, and the disagreement goes from 25 stars down to 22 stars:

Star   3865: expected And, found Psc at B1875 RA=0.7168112401985951, DEC=29.753835588303886
Star   7751: expected Phe, found Eri at B1875 RA=1.5834954140087947, DEC=-52.22723054721186
Star  19173: expected Hyi, found Ret at B1875 RA=4.110954811299822, DEC=-67.49897530217278
Star  27992: expected Ori, found Mon at B1875 RA=5.8335580586040825, DEC=-8.641218440982476
Star  30112: expected Ori, found Mon at B1875 RA=6.241876194349014, DEC=2.6250016436536825
Star  52886: expected Hya, found Crt at B1875 RA=10.750181743647408, DEC=-16.823199233215146
Star  58221: expected Leo, found Com at B1875 RA=11.866920975399243, DEC=27.53402592032908
Star  59234: expected UMa, found CVn at B1875 RA=12.083510720071475, DEC=49.190948561760905
Star  67599: expected Aps, found Cha at B1875 RA=13.666462427836938, DEC=-79.65124138251578
Star  72017: expected Vir, found Lib at B1875 RA=14.66672548759527, DEC=-0.9209729804587347
Star  74021: expected Boo, found Ser at B1875 RA=15.083338621325765, DEC=25.919071364829822
Star  78313: expected Lib, found Sco at B1875 RA=15.916668137755112, DEC=-19.102106014518707
Star  85957: expected Ara, found Aps at B1875 RA=17.401189879643557, DEC=-67.50071953170895
Star  87694: expected Sco, found Sgr at B1875 RA=17.83353580619274, DEC=-31.524145229668683
Star  89105: expected Aps, found Pav at B1875 RA=18.000161758125657, DEC=-70.77534207853729
Star  91382: expected Ser, found Aql at B1875 RA=18.58354068261782, DEC=-3.236551968836422
Star  92907: expected Sct, found Sgr at B1875 RA=18.866739182014573, DEC=-12.757070807818243
Star  93308: expected Vul, found Sge at B1875 RA=18.972319711616493, DEC=21.082862871561822
Star  95468: expected Dra, found Cyg at B1875 RA=19.440101272768143, DEC=57.999247072188176
Star 100777: expected Tel, found Ind at B1875 RA=20.333546820263987, DEC=-55.531563128281675
Star 101541: expected Cyg, found Cep at B1875 RA=20.60009400280326, DEC=60.56267481660984
Star 105623: expected Mic, found PsA at B1875 RA=21.333433549863397, DEC=-33.41724606042011
ConstellationTest: 22 failures

This is not at all a problem for what I'm doing; I just add these 22 star identifiers to my unit test's exclusion list and everything's happy. I'm reporting here just in case it is useful for testing/verification for anyone else.

However, if there is something obvious I'm doing wrong, it would be nice to know, so I can improve my code. I'm guessing most of these are my lack of correcting for proper motion for stars near a constellation border.

astronexus commented 12 months ago

I don't think you're doing anything wrong ATM:

  1. I'm completely ignoring proper motions in all this, because each star in HYG has J2000 coordinates (including any proper motion from their base catalog's epoch), so the HYG constellation field for a star should correspond to the J2000 position as well. Finding out where some of these stars were in 1875 would be historically interesting, but doesn't matter much to assigning their correct constellation now.
  2. I replaced the somewhat simplified process I used with (a) the astropy module's SkyCoord object to transform coordinates from J2000 to B1875, which uses a more detailed precession model, and (b) a somewhat simplified correction for nutation (not present in either my original version or the astropy module's transformations) that is accurate to about 1".

When I did that, it looks like most of the discrepancies went away. I'm seeing 1 or 2 where the star in question is so close to a boundary (well within 1 arcsecond) that it's not entirely clear who is wrong, and even if one of us is wrong, it's almost unmeasurably so, to the point I'm not super worried.

I'll probably have a second update to HYG in the next day or so with whatever changes this updated calculation produces.

astronexus commented 12 months ago

OK, I've rerun the constellation label identifier with the improvements I describe above. For the final run, I improved the nutation calculation to include all terms with an amplitude of 0.2" or higher. This should improve the overall accuracy to about +/- 0.25".

The updated version is version v3.6.

Here are the results:

The stars that had their constellation labels changed are:

With one exception, this addresses all stars discussed in this issue, apart from the 4 fixed in v3.5.1 recently, and 2 others (HYG 80302 and HYG 80540) that were correctly labeled in the first place.

The one exception is HYG ID 78313. My calculations kept it in Libra. The B1875 position found by cosinekitty a few days ago, which does change its constellation to Scorpius, is one of the closest of the bunch to a boundary line. The RA is 238.750022 degrees, which is 79 milliseconds away from the boundary (neglecting cos(declination) error, which would make the true angle a little smaller in fact). As a result it's not entirely clear that it does need to change at all.

I will probably close this issue in a few days if I don't discover anything else odd.

brandon-rhodes commented 12 months ago

One other thing: Stars HYG 80302 and HYG 80540 really are in Sco, not Oph… There is an error in the original reference (https://iopscience.iop.org/article/10.1086/132034) …

As a note to myself in case I'm reading through this issue again someday: the version of the table at

http://cdsarc.u-strasbg.fr/ftp/VI/42/data.dat

— which Skyfield uses, seems to already include the fix for declination -19.25°, so Skyfield already reports 'Sco' for the two stars in question. I'll add a test to make sure the old table is never used by accident.

astronexus commented 12 months ago

The mystery of how a star in Dorado -- far too southerly to have ever gotten a Flamsteed number -- got an ID of "9 Lyn" is resolved!

I pulled a lot of supplemental Flamsteed numbers from a fantastic but somewhat obscure publication ("Flamsteed's Missing Stars", M. Wagman, JHA xviii (1987), p 210-223).

The entry this reference has for "9 Lyn" is HD 43618 (visual mag 6.5). This is the star in Dorado that was assigned a constellation of Lyn (as well as the Flamsteed number of 9). For the purpose of that update, I just created a big SQL query with lots of "UPDATE ... SET con = .... WHERE hd=...." statements, and I didn't validate all the HD numbers individually.

I am still tracking down what the actual "9 Lyn" is. It might be HD 43619 instead, but its visual magnitude from SIMBAD (+7.7) seems too dim. Once I can ID it more definitively, and assuming the star is still in Lyn as of J2000, I will add the correct Flamsteed number to it.

astronexus commented 12 months ago

"9 Lyn" = HD 46318. Dr. Wagman swapped two digits. I will update HYG accordingly shortly.

astronexus commented 12 months ago

HYG v3.6.1 is out, with HD 46318 given the label "9 Lyn". Otherwise it is identical to the recently released HYG v3.6, with the updated constellation labels for multiple stars.

cosinekitty commented 12 months ago

I updated to v3.6.1, and now the discrepancies in my testing go down to only two stars, both of which you mentioned above as marginal cases. This is great to have only two entries in my exclusion list!

Star  78313: expected Lib, found Sco at B1875 RA=15.916668137755112, DEC=-19.102106014518707
Star 117789: expected Peg, found And at B1875 RA=23.861185789899164, DEC=31.333339989198937
astronexus commented 12 months ago

HYG 78313 and 117789 were two of the closest stars to a boundary line in my tests, and are the closest to a boundary line in your original list of discrepant stars in HYG.

The figures you quote for them work out to:

These are both small enough that, without further knowledge of the details of the calculation, I'm inclined to ignore the discrepancies. (My calculations have an error of up to about 200 milliarcsec in nutation and whatever error is present in the precession model recent versions of astropy use, which I do not know off the top of my head.)

cosinekitty commented 12 months ago

For runtime efficiency, I am using a VERY truncated version of IAU2000b for my nutation formula, so I'm inclined to agree that these discrepancies are to be expected. I think this thing is in really good shape.

astronexus commented 12 months ago

Closed as all discrepancies were either resolved or regarded as not significant after some more detailed review.

The current scheme I used for assigning constellations in HYG v3.6+ will be used in the same form for adding them to AT-HYG, sometime in the near future.