Snooping, how to calculate object coordinates and how to get correct time #21
Replies: 2 comments 1 reply
-
Maybe you can ask the avtor of that library itself? |
Beta Was this translation helpful? Give feedback.
-
I found a solution for my 1st issue. As already guessed it needs only a few lines of code with astropy: from astropy.coordinates import SkyCoord,EarthLocation, AltAz, ICRS
from astropy import units as u
from astropy.time import Time
def calc_FITS(
ra, dec, UTC,
lon=13.75*u.deg, lat=51.05*u.deg, height=117.8*u.meter,
):
ObsLoc = EarthLocation(lon=lon, lat=lat, height=height)
#
c = SkyCoord(ra=ra, dec=dec, frame="icrs")
cAltAz = c.transform_to(AltAz(obstime = Time(UTC), location = ObsLoc))
#
print(f'AIRMASS = {cAltAz.secz}')
print(f'OBJCTAZ = {cAltAz.az/u.deg}')
print(f'OBJCTALT= {cAltAz.alt/u.deg}')
#
J2000 = cAltAz.transform_to(ICRS())
print(f'OBJCTRA = {J2000.ra.to_string(unit=u.hour)}')
print(f'OBJCTDEC= {J2000.dec.to_string(unit=u.deg)}')
print(f'RA = {J2000.ra.degree:f}')
print(f'DEC = {J2000.dec.degree:f}') For my first test image the driver sooped: ra=20.659287020031786852*u.hourangle
dec=90*u.deg
UTC='2023-03-30T13:13:51.616' The function above outputs:
while the header data in the FITS are:
The large deviation in the calculated J2000 RA caused me some headache. But then I realized that it is the same point on sky: with DEC=90° it is the north celestial pole, independent what RA says. Then I made a second test image more distant from the pole. Snooped values are: ra=4.6240856854862251168*u.hourangle
dec=16.688656799999993297*u.deg
UTC='2023-04-05T11:27:53.655' Calculated from that:
Compared to the metadata in the FITS:
The calculated coordinates and airmass still do not perfectly fit. There is about 0.5° difference in RA / AZ and about 0.2° difference in DEC / ALT. Possible reasons could be:
It will be tedious to find the reasons for these small differences. I will implement this calculation in the driver. |
Beta Was this translation helpful? Give feedback.
-
This is not an idea, it is a call for help!
I saw that the INDI CCD simulator writes object coordinates (Alt/Az and J2000 Ra/Dec) as metadata in the FITS. This is a cool feature for documentation, stacking and as starting point for field solving. Therefore I tried to implement the same in this driver.
An INDI feature "Snooping" is used to get the required site coordinates and the observation direction. With Snooping the camera driver can ask other drivers for information. I recorded the network traffic and compared it with the metadata in the FITS. For some of the metadata I already know how to calculate them. But for others I have no idea:
Metadata in FITS:
When this FITS picture was taken the CCD simulator snooped the following information over network:
Local time was 15:13. The UTC time can be found in FITS metadata.
My questions and issues are:
Okay, with a little bit more effort I certainly can find an answer to that. But the second issue is a killer:
The driver has no way to find out if the Raspberry Pi clock is correct or not. I have concerns to implement something that writes wrong information silently.
Beta Was this translation helpful? Give feedback.
All reactions