×

INDI Library v1.8.9 Released (01 Mar 2021)

INDI monthly update. In addition to driver improvements, major code refactoring is in progress by @pawel-soja to modernize and improve INDI aging code.

New forum users, please go here first: indilib.org/forum/new-forum-users.html

Capturing Flats Alters the "Use FITS Viewer" Setting

  • Posts: 7
  • Thank you received: 0
Greetings!

KStars/Ekos has been crashy on my Pi 4 and I have been trying to track down the cause. I do not have hard evidence (yet), but I suspect that the FITS Viewer may be at least partially to blame. When I disable the FITS Viewer, things seem to run much more reliably (though not all crashes are solved).

The two conditions that seem to trigger crashes with the FITS Viewer are when I zoom in significantly, and lots of images coming in quickly. Taking flats fits into the second category. In order to combat this, I run with the "Use FITS Viewer" option unchecked.

---

The point of this thread is that when I take images with "Flat" selected for the Type in Ekos:
  • Ekos displays all flat images in the KStars FITS Viewer despite the "Use FITS Viewer" setting being unchecked
    • This includes the initial calibration images taken to determine the flat duration, as well as the actual final flats
  • The "Use FITS Viewer" setting checkbox is automatically changed to checked by the application

I have attached a screen recording demonstrating the behaviour so you can see what it looks like / how to reproduce it. The short version is: queue up some "Flat" shots; ensure "Use FITS Viewer" is unchecked; start the capture process; get an unwanted KStars FITS Viewer pop-up; re-open the config window to see that "Use FITS Viewer" is now checked.

I presume this is not expected behaviour, but before I log an issue I want to make sure I've covered all my bases. I don't *think* that I'm missing any settings in any other areas that might affect this, but there are a lot of settings, and they are all in different places.

Is the software doing the wrong thing, or am I just doing something silly?

---

I have experienced this behaviour both in the KStars version released with Astroberry (whatever the latest build was in December/January just gone), as well as KStars compiled from source as of a few days ago (which I am using to attempt to track down the root cause of these issues).

Not that it should matter, but for what it's worth, the images in question are large (8288x5644 @ 16 bit mono), but I do also have a Raspberry Pi 4 with 8GB of memory and a 128GB high-speed SD card, so it's barely making a dent in terms of the throughput and capacity that I have available.

Thanks in advance!

---

Hardware
  • Raspberry Pi 4
    • 8GB Memory
    • 128GB High Speed SD Card
  • ZWO ASI294MM Pro CCD (Imaging)
  • ZWO ASI120MM-Mini CCD (Guiding)
  • HEQ5 Pro Mount (using EQMod Driver)
  • ZBlox GPS Dongle (using GPSD Driver)

Software
phd2@master (cd1d6a8e / 2021-02-19 17:16:21 -0500)
stellarsolver@master (820befc / 2021-02-13 17:05:49 -0500)
indi@master (4c3f1c60 / 2021-02-28 17:48:55 +0300)
indi-3rdparty@master (4d4b6f4 / 2021-03-02 10:41:28 +0300)
kstars@master (4194cd472 / 2021-03-01 14:41:22 +0300)
1 month 6 days ago #68181
Attachments:

    UseFITSVie...lats.mp4

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

Thanks for the report. Unless you're using a 64bit OS, then you're not really using the full 8GB RAM. Do you have "Adaptive Sampling" turned on in FITS Viewer options?
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
1 month 6 days ago #68198

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

  • Posts: 7
  • Thank you received: 0
Hey @knro,

Memory
That's a very good point. I can't believe that didn't even occur to me.
You're absolutely right. I ran kstars up with gdb and set it to take 20 flats, and got this...



:( :( :( :( :( :(


I can't solve that problem, but I guess that just gives me more reason to want to stop the KStars FITS Viewer from appearing when the setting is unchecked.


Adaptive Sampling
Yep, it was on by default and is set to '4'.
1 month 6 days ago #68201
Attachments:

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

  • Posts: 7
  • Thank you received: 0
Raspberry Pi 4 Memory
Apparently 64-bit Raspberry Pi OS is a thing . The forum post seems quite old and has no mention of it going out of beta, but the latest build is as recent as August of last year.

I might give it a go to see if I can build everything against it to squeeze that extra memory into userland processes. Hopefully it doesn't wind up being a waste of time...!



Use FITS Viewer Setting

At the risk of misunderstanding the way things work, I had a dive into the KStars source last night.
On Line 6298 of kstars/ekos/capture/capture.cpp , I found the following chunk (some bits removed for brevity):
// Check if we need to do flat field slope calculation if the user specified a desired ADU value
if( ..... ) {
    if (Options::useFITSViewer() == false)
    {
        Options::setUseFITSViewer(true);
        qCInfo(KSTARS_EKOS_CAPTURE) << "Enabling FITS Viewer...";
    }
    ....

So it appears that the "Use FITS Viewer" option is intentionally automatically enabled by the application.

At the risk of severely misunderstanding the reasons behind this operation, I can only assume that this is *required* in order for the software to process/gain access to the flat frames that are being captured, or the features of the software that allow it to perform operations against the captured flat frames (e.g., calculation of ADU peaks, and so on?)

If that block of code is literally just there to show the flats as they are being captured, can it just be removed? I suggest this change as the application currently alters the user-configured options without "consent", and also does not restore the state after it is done.

I don't really know anything about the internals of KStars so if anyone has anything to add on this front it would be appreciated!
1 month 5 days ago #68254

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

FITSViewer is required for capturing flats in order to perform calculations for ADU. However, this is not really necessary in recent versions in KStars where it's possible to open the file in FITSData and perform such calculations. But the corresponding flag code was not updated to take care of this, and hence it was left to rely on the FITS Viewer being always available to perform ADU calculations.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
The following user(s) said Thank You: Vector
1 month 5 days ago #68273

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

  • Posts: 7
  • Thank you received: 0
Hello again!

The 64-bit install of Raspberry Pi OS was successful. After building everything from source, I don’t seem to get out of memory crashes anymore. Yay! One less problem to deal with.

If the FITS Viewer is only used because the code hasn’t been updated to allow the use of the new non-ui method, it might be worth revisiting/updating at some point. I’m guessing it probably won’t be high on the list, but I think it would make the UX and App behaviour more consistent. I might have a crack at some point but at the moment I’m really unfamiliar with the source and mechanisms involved.

Thanks for your help @knro!
1 month 3 days ago #68368

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

Time to create page: 0.247 seconds