×

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

Bi-monthly release with minor bug fixes and improvements

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.
1 year 7 months ago #85304

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

  • Posts: 5
  • Thank you received: 0
Thanks. I'll try is in a next week, however I don't know what INDI::CCD means.
1 year 7 months 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
1 year 7 months ago #85334

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

  • Posts: 155
  • 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.
1 year 7 months ago #85342

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

  • Posts: 34
  • Thank you received: 9
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
1 year 7 months ago #85344

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

Time to create page: 1.182 seconds