Updated star database to HYG v 3.5.1.

This change affects internal unit testing only.
It does not affect developers who use Astronomy Engine.
Upgraded the HYG database used for verification of
constellation calculations to v 3.5.1.

See conversation at:
https://github.com/astronexus/HYG-Database/issues/21
This commit is contained in:
Don Cross
2023-09-19 15:08:49 -04:00
parent 054985606e
commit f4405e390c
7 changed files with 14 additions and 11 deletions

View File

@@ -25,7 +25,7 @@ if __name__ == '__main__':
# the given observer at the specified time.
moon_vec = GeoMoon(time) - ObserverVector(time, observer, False)
with open('../../generate/hygdata_v3.csv') as starfile:
with open('../../generate/hyg_v35_1.csv') as starfile:
reader = csv.DictReader(starfile)
lnum = 0
for row in reader:

2
generate/.gitignore vendored
View File

@@ -3,7 +3,7 @@ issue_103.txt
disable_generate_c_docs
generate
lnxp1600p2200.405
hygdata_v3.csv
hyg_v35_1.csv
pluto_*.csv
TOP2013.dat
temp/

View File

@@ -0,0 +1 @@
110dadd61120f8e220f72e6f833dfd701ea5d510db4f28fce8a8f1a1582e8d2c hyg_v35_1.csv

View File

@@ -1 +0,0 @@
07a62fdcab86f319e65cb8f9bfdc5beccbae1f43a29baf55b1b937367351e299 hygdata_v3.csv

View File

@@ -8,14 +8,17 @@
import sys
import re
def Unquote(s):
return s.replace('"', '')
def Translate(inFileName, outFileName):
# Ignore disagreements with hygdata_v3.
# Ignore disagreements with HYG v3.5.1.
# See: https://github.com/astronexus/HYG-Database/issues/21
ignore = set([
3865, 7751, 10342, 19173, 22400, 27992, 29366,
3865, 7751, 19173, 27992,
30112, 52886, 58221, 59234, 67599, 72017, 74021, 78313,
84413, 85957, 87694, 89105, 91382, 92907, 93308,
85957, 87694, 89105, 91382, 92907, 93308,
95468, 100777, 101541, 105623
])
@@ -27,12 +30,12 @@ def Translate(inFileName, outFileName):
lnum += 1
token = line.strip().split(',')
if lnum == 1:
columns = dict((key, col) for (col, key) in enumerate(token))
columns = dict((Unquote(key), col) for (col, key) in enumerate(token))
else:
id = int(token[columns['id']])
ra = float(token[columns['ra']])
dec = float(token[columns['dec']])
sym = token[columns['con']]
sym = Unquote(token[columns['con']])
if sym != '':
if not re.match(r'^[A-Z][a-zA-Z]{2}$', sym):
print('make_constellation_data: bad symbol "{}" in {} line {}'.format(sym, inFileName, lnum))
@@ -45,4 +48,4 @@ def Translate(inFileName, outFileName):
return 0
if __name__ == '__main__':
sys.exit(Translate('hygdata_v3.csv', 'constellation/test_input.txt'))
sys.exit(Translate('hyg_v35_1.csv', 'constellation/test_input.txt'))

View File

@@ -70,7 +70,7 @@ Download()
Download https://github.com/cosinekitty/ephemeris/raw/master/lnxp1600p2200.405 lnxp1600p2200.405 ephemeris.sha256
Download https://github.com/cosinekitty/ephemeris/raw/master/top2013/TOP2013.dat TOP2013.dat top2013.sha256
Download https://raw.githubusercontent.com/astronexus/HYG-Database/f09e144652f61ca8dfd473ddf5c3c708977cb3b5/hygdata_v3.csv hygdata_v3.csv hygdata_v3.sha256
Download https://raw.githubusercontent.com/astronexus/HYG-Database/f6439fb5ae08640d7c2b19fc67fdb3f094ce78d3/hyg/v3/hyg_v35_1.csv hyg_v35_1.csv hyg_v35_1.sha256
rm -f constellation/test_input.txt
./make_constellation_data.py || Fail "Error creating constellation test data."

View File

@@ -3,7 +3,7 @@ setlocal EnableDelayedExpansion
call :Download https://raw.githubusercontent.com/cosinekitty/ephemeris/master/lnxp1600p2200.405 lnxp1600p2200.405 ephemeris.sha256 || exit /b 1
call :Download https://raw.githubusercontent.com/cosinekitty/ephemeris/master/top2013/TOP2013.dat TOP2013.dat top2013.sha256 || exit /b 1
call :Download https://raw.githubusercontent.com/astronexus/HYG-Database/f09e144652f61ca8dfd473ddf5c3c708977cb3b5/hygdata_v3.csv hygdata_v3.csv hygdata_v3.sha256 || exit /b 1
call :Download https://raw.githubusercontent.com/astronexus/HYG-Database/f6439fb5ae08640d7c2b19fc67fdb3f094ce78d3/hyg/v3/hyg_v35_1.csv hyg_v35_1.csv hyg_v35_1.sha256 || exit /b 1
cd ..
set copyright=