×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Is there a FITS format for a stream ?

  • Posts: 349
  • Thank you received: 107
Yes SER does contain timestamps for each frame. Looking at code QHY driver does decode GPS info from camera but this doesn't seems to be passed down when recording SER stream. Only current PC time is used. Maybe "StreamManager" class could be modified that it scoop up this GPS timestamp.

Are you doing asteroid occulatations timing? I was experimenting with that and when I recorded GPS LED blink with my camera I found out that timestamp in SER file was within 5ms of blink start. I used chrony NTP client to keep my clock in sync. Also doesn't that QHY camera burn timestamp into image? So maybe just read timestamp from image?
Last edit: 1 year 1 month ago by nou.
1 year 1 month ago #90070

Please Log in or Create an account to join the conversation.

  • Posts: 1009
  • Thank you received: 133
The more interesting question would be whether saving stuff as FITS would use that GPS time of the camera. My strong suspicion there is 'NO'.
1 year 1 month ago #90071

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 0
I am in fact doing asteroid occultations, yes! Thanks for sharing what you did, I will see if it applies.
I saw from the QHYCCD SDK documentation that "the camera records the GPS information and insert into each frame's head." So it would seem that the images the camera sends to INDI contains the exact GPS timing, but INDI then overwrites it (or simply ignores it) in favor of the PC timestamp. If I understand correctly, when INDI saves the images, the GPS timing isn't saved with it because the header is changed to INDI's. So I don't think I could read the original timestamp on the image ://

I am not all that familiar with C++, unfortunately so I can't be trusted with modifying the StreamManager class.. If anyone were to look into it I'd be super grateful.
1 year 1 month ago #90076

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 0
As for the FITS format having the same problem, I have no idea.
Since the problem could come from the fact that the StreamManager class does not include a part where the GPS timestamp is retrieved, it seems to be linked only to the stream. I could imagine it possible that that functionality was already included in the "one-time" pictures equivalent of StreamManager.
1 year 1 month ago #90078

Please Log in or Create an account to join the conversation.

  • Posts: 349
  • Thank you received: 107
This line github.com/indilib/indi/blob/431869ffe40...serrecorder.cpp#L256 gets current computer time and write frame data to SER file.

On this line it is called new frame is pushed to Streamer github.com/indilib/indi-3rdparty/blob/da...hy/qhy_ccd.cpp#L2596
I think it would be quite straightforward put decodeGPSHeader() before call to Streamer->newFrame(buffer, w * h * bpp / 8 * channels, GPSHeader.start_sec + GPSHeader.start_us / 1000000.0);
1 year 1 month ago #90079

Please Log in or Create an account to join the conversation.

  • Posts: 349
  • Thank you received: 107
Ok it was quite easy. I pushed changes that will now pass GPS start timestamp to SER recoder so if I didn't do any mistake it should work. So if you know how to compile INDI you can test it.

github.com/nouspiro/indi/tree/feature/qhy_gps_timestamp
github.com/nouspiro/indi-3rdparty/tree/f...re/qhy_gps_timestamp
The following user(s) said Thank You: Julie
Last edit: 1 year 1 month ago by nou.
1 year 1 month ago #90083

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 0
I will try this asap, thank you so much for your help!
1 year 1 month ago #90116

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 0
Hello!

I finally had the chance to compile. I first had an issue when trying to execute the make command, but I added the mentions of the OpenCV librairies in the branch's CMakeLists.txt file (github.com/nouspiro/indi-3rdparty/blob/f...i-qhy/CMakeLists.txt), like they are in the master's (github.com/indilib/indi-3rdparty/blob/ma...i-qhy/CMakeLists.txt). And then I was able to compile.

However, I now have an issue with the timestamp. Where I used to have the timestamp of the Raspberry Pi, the timestamp of the SER file now dates back to October 10th 1995. Any idea how to fix this? Could the problem come from my CCD's GPS that I would need to reconfigure somehow?

Thanks in advance!
1 year 1 month ago #90715

Please Log in or Create an account to join the conversation.

  • Posts: 349
  • Thank you received: 107
That sounds like camera return 0 as timestamp. Because October 10 1995 is 2450000.5JD which is what QHY is using as epoch. Did you enabled GPS header in INDI panel and it is locked? Also try capture preview FITS and check what date is there.
The following user(s) said Thank You: Julie
Last edit: 1 year 1 month ago by nou.
1 year 1 month ago #90716

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 0
I had indeed forgotten to check that the GPS was locked. I tried it again today making sure the GPS was locked, and the timestamps, both on FITS files and SER files, are the GPS's!

Thank you so much for your help!!
1 year 1 month ago #90777

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 0
Hello all,

I am facing another issue with the SER format, in that I can't seem to record streams with a higher resolutions than 8 bits per pixel. Even when I try "forcing" an 16 bit resolution in my python script, the SER file is 8 bit. The FITS file, however, is 16 bits so I'm sure the setting is correct. Can SER files created with INDI not support 16 bit resolution?
1 year 1 month ago #90958

Please Log in or Create an account to join the conversation.

  • Posts: 349
  • Thank you received: 107
INDI can produce 16-bit SER file. Make sure you set 16 bit output in INDI control panel.
1 year 1 month ago #90961

Please Log in or Create an account to join the conversation.

Time to create page: 1.321 seconds