×

INDI Library v1.9.8 Released (29 Sep 2022)

Bi-monthly INDI Library released with new drivers and bug fixes.

Kstars 3.6.0 - NoFilter in FITS header

I just pushed some changes to INDI::CCD to enable more logging. So any drivers compiled from GIT now should have this logging information and if Filter Slot is unset for whatever reason, we'll at least have it logged so we can track down the issue. Not exactly a solution, but a step in the right direction.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
3 months 2 weeks ago #85304

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

  • Posts: 4
  • Thank you received: 0
Thanks. I'll try is in a next week, however I don't know what INDI::CCD means.
3 months 2 weeks ago #85331

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

It just means you need to compile from GIT. So

update_indi_core

then

update_indi_drivers
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
3 months 2 weeks ago #85334

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

  • Posts: 152
  • Thank you received: 10
KStars needs to allow the user to define the FITS header information. Having the driver read filter settings, color or mono, is very complex. The user knows the order the CFW filters are located. The user can define a camera as mono or color, Bayer pattern, and filter wheel definitions. KStars need only write this information to the image. Just a thought.
3 months 2 weeks ago #85342

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

  • Posts: 30
  • Thank you received: 8
Hello folks,

I also run into the same issue as you guys (Atik 314+, Atik FW2, kstars 3.5.8 on astroberry 2.0.4). I would also be pleased to have a fix for this issue.
Nevertheless, I wrote and use a python script as a workaround. It adds the FITS filter value in the header based on the file name writen by Ekos. I run this script on my astroberry after each session before downloading the files on my PC.
Hereafter is the code. You may want to modify the base directory path (base_dir) and the filters name for your particular case. Of course, the filter name must be present in the file name.
This works fine for me. Please, make some tests before on some copy of your files.
"""This python script fixes the FITS filter information based on the fits file
name. One need to install astropy python module before running
this script.
"""
from astropy.io import fits
from astropy.utils.data import get_pkg_data_filename
import os
 
#All the fits file inside this directory will be checked and fixed if needed
base_dir = "/home/astroberry/Pictures/Astronomy"
 
for root, dirs, files in os.walk(base_dir, topdown=False):
    for name in files:
        if os.path.join(root, name).endswith("fits"):
            #print(os.path.join(root, name))
            fits_file = os.path.join(root, name)
            d = dict(fits.getheader(fits_file))
            #print(d)
            # if the FILTER attribute is not present iht the header...
            if not "FILTER" in d:
                if 'Red' in name:
                    print("set Red for {}".format(name))
                    fits.setval(fits_file, 'FILTER', value='Red')
                elif 'Green' in name:
                    print("set Green for {}".format(name))
                    fits.setval(fits_file, 'FILTER', value='Green')
                elif 'Blue' in name:
                    print("set Blue for {}".format(name))
                    fits.setval(fits_file, 'FILTER', value='Blue')
                elif 'Luminance' in name:
                     print("set Luminance for {}".format(name))
                     fits.setval(fits_file, 'FILTER', value='Luminance')
                elif '_Ha_' in name:
                     print("set Ha for {}".format(name))
                     fits.setval(fits_file, 'FILTER', value='Ha')
                elif '_OIII_' in name:
                     print("set OIII for {}".format(name))
                     fits.setval(fits_file, 'FILTER', value='OIII')
                elif '_SII_' in name:
                     print("set SII for {}".format(name))
                     fits.setval(fits_file, 'FILTER', value='SII')
                else:
                    print("No changes in {}".format(name))

Cheers,
Sebastien
3 months 2 weeks ago #85344

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

Time to create page: 1.102 seconds