Replies: 3 comments 2 replies
-
interpolation fixes it a little |
Beta Was this translation helpful? Give feedback.
0 replies
-
It looks like I might be ble to use this It is created for earth maps. But it looks like it can als be used for astronomy maps. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Got it to look better
You can find the code here |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
For fun i was trying to draw constellation borders on a starmap i created earlier.
Drawing and projecting stars is easier as they are just dots. So the projection is easier.
When i want to draw constellation borders i have edges of the lines in ra/dec but when i project these points
the line will be straight while in reality they should be curved lines after the projection.
As an example my starmap so far
![summer-triangle](https://private-user-images.githubusercontent.com/760615/283111458-db4cdcbf-9675-4df1-9862-8dfc6ce27fe6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NjE4MTQsIm5iZiI6MTczOTQ2MTUxNCwicGF0aCI6Ii83NjA2MTUvMjgzMTExNDU4LWRiNGNkY2JmLTk2NzUtNGRmMS05ODYyLThkZmM2Y2UyN2ZlNi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxM1QxNTQ1MTRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mNzdlNmEyYWY4ZGUzNmY3NjRhMWE0YmMyMDM5ZGE5MWE5NDlmMjUyZWIyMDcyZWExN2YyNGU3Zjc3NjBjODUzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.oVy0rI1WyCT9-QEDKihRdV_xLmbQ_TpmjtYyrCy2ack)
You can see that some of the borders do not touch as the lines are not drawn correctly.
So this happens because i do a projection of the edges of the constellation border.
`
from skyfield.api import Star, load, wgs84, N, S, W, E
from skyfield.projections import build_stereographic_projection
from datetime import datetime
from pytz import timezone
AMS = timezone('Europe/Amsterdam')
ts = load.timescale()
t = ts.from_datetime(AMS.localize(datetime(2023, 11, 15, 22, 0, 0)))
degrees = 0.0
amsterdam = wgs84.latlon(lat, lon, elevation_m=28).at(t)
position = amsterdam.from_altaz(alt_degrees=90, az_degrees=degrees)
projection = build_stereographic_projection(position)
cons_borders = earth.at(t).observe(Star.from_dataframe(constdata))
constdata['x'], constdata['y'] = projection(cons_borders)
`
Where i should be doing a projection of the line itself so that all points on the line are projected. But my understanding of the projection function is not good enough to know if that is possible.
Can anybody here help?
As i could do interpolation on the lines and divide it in smaller segments, but maybe there is a better solution.
Thanks,
Ronnie
Beta Was this translation helpful? Give feedback.
All reactions