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 think it would be great to reproject all-sky images (FITS files) onto a polyhedron. Do you see a possibility to add that to this code? Or would it require a totally different approach?
To answer my own question: I took a map of 720x360 pixels (representing latitude and longitude), from http://vizier.cfa.harvard.edu/viz-bin/Cat?VIII/76 . The following code makes an entry in stars.dat for each pixel in the image:
from astropy.io import fits
import astropy.units as u
from astropy.coordinates import Longitude, Latitude
data=fits.open("lab.fit")[0].data[445,:,:]
(ymax, xmax) = data.shape
f = open('mystars.dat', 'w')
for (y, x), val in np.ndenumerate(data):
ra_deg = x/(xmax-1)*360 * u.deg
dec_deg = (y/(ymax-1)*180-90) * u.deg
ra, dec = Longitude(ra_deg), Latitude(dec_deg)
print("{},{},{}".format(ra.to_string(sep=" ", unit=u.hour),
dec.to_string(sep=" ", alwayssign=True, unit=u.deg),
val),
file=f)
f.close()
Also, I made some changes to color stars according to magnitude, I'll create a PR for that.
I think it would be great to reproject all-sky images (FITS files) onto a polyhedron. Do you see a possibility to add that to this code? Or would it require a totally different approach?
For inspiration, see how Earth can be projected onto different foldable polyhedra: http://www.progonos.com/furuti/MapProj/Normal/ProjPoly/Foldout/foldout.html
The text was updated successfully, but these errors were encountered: