You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a problem where I have tens of millions of FITS files that I need to calculate the pixel positions of all satellites overhead in.
I currently do this as follows (stripped down example):
sat_objects = np.array(load.tle_file(tle_file))
for fits_file in fits_files: #len(fits_files) is >10,000,000
# extract wcs and datetime (dt) from fits file
for sat_obj in sat_objects:
difference = sat_obj - telescope_position
topocentric = difference.at(dt)
elev_tle_deg = topocentric.altaz()[0].degrees
if elev_tle_deg < 0:
continue
ra_tle, dec_tle, dist_tle = topocentric.radec()
x_loc_tle, y_loc_tle, _, _ = wcs.all_world2pix(ra_tle._degrees, dec_tle._degrees, 0, 0, 0)
# if the pixel locations are not NANs, the satellite is overhead and i process it further
Looping over every satellite in every image is necessary but inefficient. I have images of the full sky, meaning that if a satellite has an elevation greater than 0 degrees then I want its pixel position in the image. Only if a satellite has an elevation greater than 0 degrees do I calculate its pixel position (maybe this isn't the most efficient way to do it).
I have two questions:
Am I able to vectorise the satellite objects through the pixel position calculation?
Am I able to cheaply calculate if a satellite is overhead at a given time so that I don't need to waste computation on satellites which aren't visible? (most satellites in the TLE list won't be visible at a given time).
Thanks for your help. I really appreciate the skyfield library and community allowing me to do my research well!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I have a problem where I have tens of millions of FITS files that I need to calculate the pixel positions of all satellites overhead in.
I currently do this as follows (stripped down example):
Looping over every satellite in every image is necessary but inefficient. I have images of the full sky, meaning that if a satellite has an elevation greater than 0 degrees then I want its pixel position in the image. Only if a satellite has an elevation greater than 0 degrees do I calculate its pixel position (maybe this isn't the most efficient way to do it).
I have two questions:
Thanks for your help. I really appreciate the skyfield library and community allowing me to do my research well!
Cheers,
Dylan
Beta Was this translation helpful? Give feedback.
All reactions