-
Notifications
You must be signed in to change notification settings - Fork 0
/
astrometry_helper.py
36 lines (32 loc) · 1.07 KB
/
astrometry_helper.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import astrometry
solver = astrometry.Solver(
astrometry.series_5200.index_files(
cache_directory=".cache/astrometry_cache",
scales={6},
)
)
stars = [
[388.9140568247906, 656.5003281719216],
[732.9210858972549, 473.66395545775106],
[401.03459504299843, 253.788113189415],
[312.6591868096163, 624.7527729425295],
[694.6844564647456, 606.8371776658344],
[741.7233477959561, 344.41284826261443],
[867.3574610200455, 672.014835980283],
[1063.546651153479, 593.7844603550848],
[286.69070190952704, 422.170016812049],
[401.12779619355155, 16.13543616977013],
[205.12103484692776, 698.1847350789413],
[202.88444768690894, 111.24830187635557],
[339.1627757703069, 86.60739435924549],
]
solution = solver.solve(
stars=stars,
size_hint=None,
position_hint=None,
solution_parameters=astrometry.SolutionParameters(),
)
if solution.has_match():
print(f"{solution.best_match().center_ra_deg=}")
print(f"{solution.best_match().center_dec_deg=}")
print(f"{solution.best_match().scale_arcsec_per_pixel=}")