AutoStarnetFITS.py Script Error

I’m not a Python guy but I think there is an error in the script for Starnet. When I drag my .FIT file onto the script it runs and creates the files as expected. Then when it hands off to Astropy, Astropy is looking for a .FITS (not .FIT) file, which doesn’t exist. I believe the script may need an additional variable that identifies the the file extension of the input file. I worked around the issue by changing the 2 places in the script where it specifies .FITS, and changed it to ,FIT. Now the script runs without error. The 2 lines where I made the change are below. Thanks

    sl_name=starless_filename+'.fit'
    stars=stars+'.fit'
1 Like

Thanks for posting, this helped me. I just encountered this using the script for the first time on a stack of comet images. Had a feeling something was wrong with the expected extensions, but lacking energy to debug the script tonight. I get enough of that at my job.

1 Like

Welcome!
You can change the FITS file extension that Siril uses in the preferences, or using the setext command.

Ha I hear ya! Glad it helped!

Thanks, but how would that help? My input file is a .FIT, my preferences setting is already .FIT, and the script still looks for the .FITS output file.

Having another issue using the script. I wanted to use the generated starless files, which is comet data, and register/stack those images. The script generated the starless and star masks as expected. When I load the starless up in a sequence and select comet/asteroid registration, I get a message that says “There is no timestamp stored in the file. Siril cannot perform the registration without date information in the file.” when I click the “Pick object in #1” button. I’m sure I’m probably missing something, but I can’t figure out what. Thanks

Images tiff from starnet have lost timestamp. So you cannot align comet. You need to perform that before starnet.

Ok I’m missing something here, sorry. If I do the comet registration first, where is that data kept? It doesn’t create new files and sequence like a global star alignment does, so which files would I run through the script? I’ve tried comet alignment and then run the files in the sequence through the script, then create a new sequence with the starless images, verified the registration data for the 1st/last points are still shown, then tried to stack, but that doesn’t appear to be correct. Thanks

Another question. Is it the date in the DATE-OBS field of the FITS header that it’s looking for? If so, I’m curious as to how it’s missing from the starless files but it’s there in the star mask files that are created by the script?

I believe (and that’s what I want to do in the next days) that when you have a sequence aligned on the comet, you apply starnett on all of them and then proceed to stack them like a new sequence without registering.

That’s what I tried to do too. Aligned the sequence to the comet, put those files through the script for starnet, created a new sequence with the starless files, and then stacked. It didn’t align.

You need to export (sequence tab) the comet aligned sequence first.
Then to starnet this sequence.

That was what I was missing. Thank you!
Any more thoughts on my original question about needing to change the file extension in the script for Astropy from FITS to FIT. I’m using FIT files and that’s what is set in the preferences. Thanks again. Appreciate the help!

Hello,
would it be possible to modify the AutoStarnetFITS.py script such that the starless fits file inherits the header of the original file ? I am myself not sufficiently knowledgable about handling headers with the astropy functions , but it looks feasible ?
I understand that for the comet alignement , one should run the star removal on the comet aligned sequence to avoid the loss of the DATE_OBS value. But the header contains other useful information for the stacking process ( like duration). Thanks, Jan

Hello

This script will become deprecated very soon as starnet will be trigged from Siril.

Great news ! Thanks for your very quick reply.
I’ll try to fiddle with the script to copy the header from the orig into the starless file.
Jan

I am trying to use this workflow now, I have all the elements but Siril.org has been down for several days. Is there another copy of ASFITS.py otherwise available? TIA
Pls disregard, I found the code via a YouTube by DeepSpaceAstro, if anybody else is looking.

I actually have a copy of it hosted on my website since I released a video about using it and needed a way for the viewers to get a copy.

Here’s the script: https://raczbarbequeandgrill.com/siril.html
…and here’s my video if you’re interested: Remove the Stars First and then Stack the Comet in Siril - YouTube

Yes, pixls host a temporary copy of our website: https://siril.pixls.us/

2 Likes

(it’s the same website, just a different address :wink: )

1 Like