Python script to generate target acquisition.csv file from image files in a format suitable for upload using AstroBin's upload csv dialogue Stefan Berg Nighttime Imaging 'N' Astronomy (N.I.N.A. / NINA) · Steve Greaves · ... · 36 · 2081 · 2

SteveInColorado 1.43
...
· 
·  1 like
Thanks again for your work, much appreciated!!
Like
fbitto 0.00
...
· 
·  1 like
Hi Steve,

That’s a wonderful script. It will save me a lot of time.

I noticed that some filters have 5-digit numbers in Astrobin, so I changed the value in  line 914 from 9999 to 99999 so the filter number is not rejected.

Do you think it’s possible to extract darks and biases information from Pixinsight ‘Master Dark’ and ‘Master Bias’ file types?

I use a master dark library and a master bias library containing XISF files already integrated by Pixinsight, in order to save disk space. But, so far, the script cannot extract info from them.

Thanks a lot for your work.

Francisco
Edited ...
Like
AstroBadger 6.02
...
· 
Francisco Bitto:
Hi Steve,

That’s a wonderful script. It will save me a lot of time.

I noticed that some filters have 5-digit numbers in Astrobin, so I changed the value in  line 914 from 9999 to 99999 so the filter number is not rejected.

Do you think it’s possible to extract darks and biases information from Pixinsight ‘Master Dark’ and ‘Master Bias’ file types?

I use a master dark library and a master bias library containing XISF files already integrated by Pixinsight, in order to save disk space. But, so far, the script cannot extract info from them.

Thanks a lot for your work.

Francisco

Hi Francisco,
Thanks very much for your comment.
I am working on a few bug fixes and other mods so I will look at it.
It looks like there is a field in the Pixinsight Master header that gives the number of integration images, so it is possible.

CS
Steve
Like
airscottdenning 1.43
...
· 
·  1 like
Hi Steve,

Sorry to report, I am still getting errors running this on a big directory full of images. Different error now though!

Full output is attached.

Hope this helps!
Scott
errors.txt
Like
AstroBadger 6.02
...
· 
Scott Denning:
Hi Steve,

Sorry to report, I am still getting errors running this on a big directory full of images. Different error now though!

Full output is attached.

Hope this helps!
Scott
errors.txt

Hi Scott,
Thanks.
It seems the problem was how the .csv files were being read in.
Have replicated it and fixed it here and with one other user. I have decided to make a few other requested mods before I release the next version
Explicit support for SGP, beyond using the defaults.csv
Support for Pixinsight master calibration frames. I pass the pre-release to you to test it you have time.
Thanks again for your help
Steve
Like
airscottdenning 1.43
...
· 
·  1 like
Wonderful! I will be more than happy to be a beta tester as long as you wish. 

Great work!
Like
AstroBadger 6.02
...
· 
·  1 like
Update 10th December 2023

I have just released the latest version of the script. 
There are quite a few stability and some feature changes, these are listed below.
I am currently working to include Pixinsight generated Master files. 
Looking at how to be able to deal with these I decided to make major changes to my coding approach.
Once released, what started as a hack for me, now carries quite a responsibility to get it right!
The next release will include quite major changes and quite a bit of testing and I wanted this more stable release to be available.

Many thanks all who commented and tested the script, particularly Ken Bates and Scott Denning.

Please let me if you like the script, find any issues or have feature requests.  

CS
Steve

The script can be found here

https://github.com/SteveGreaves/AstroBinUploader 

The release bundle can be found here
https://github.com/SteveGreaves/AstroBinUploader/releases/tag/v1.0.4

Version 1.0.4
6th December 2023 changes

1.No longer required to manually create configuration csv files.
   Checks if csv files exist and creates them if they do not exist.
   Default values can still be edited in csv files but also in the configurations dictionary at the start of the code. 
   Default keywords changed to lower case
   To ensure csv edits don't cause issues the data read from files is:
    stripped of leading and trailing spaces
    keywords are converted to upper case to match FITS header keywords
    column names are converted to lower case to ensure code can work with them
    corrected data frames are saved back to csv files to format issues are resolved
2. Improved extract header function
    converts floats to 4 decimal places
    converts dates to format %Y-%m-%d, rounds input to microseconds to ensure conversion works
    creates a subset of the header data that matches AstroBin requirements
3.Sites.csv file latitudes and longitudes saved with 4 decimal places but processed to 2 decimal
   places to ensure the same site is not recorded multiple times.
4. Corrected issue with Bortle and SQM values not being updated correctly
5. Corrected issue with Keywords from .XISF files not being read correctly
6. Improved code to correct file data reading and saving logic
7. Runtime option to stop program if new csv files are created to edit them.
8. Corrected program logic related to import, access and storage of external parmeters.
9. Refactored code to improve readability
10. Updated docstrings
11. Works with files generated by both Sequence Generator Pro (SGP) and NINA (.FITS, .FIT, .FTS, .XISF)
12. Looks for filter in FITS headers and converts them to 5 digit codes used by AstroBin ( used to be four digit codes)
Like
AstroBadger 6.02
...
· 
·  1 like
New release of this script that contains major changes and bug fixes can be found here:

https://github.com/SteveGreaves/AstroBinUploader/releases/tag/v1.3.3

CS
Steve
Like
fbitto 0.00
...
· 
Hi Steve,

Thanks a lot for continuing improving your script. I've been getting some errors with the last versions, including V1.3.3. But that only happens in some folders, the ones that have only Light frames work OK.

I've attached the .csv debug files to see if it can be of any help.

LBN 535 180mm.zip

Best regards,

Francisco
Edited ...
Like
AstroBadger 6.02
...
· 
Francisco Bitto:
Hi Steve,

Thanks a lot for continuing improving your script. I've been getting some errors with the last versions, including V1.3.3. But that only happens in some folders, the ones that have only Light frames work OK.

I've attached the .csv debug files to see if it can be of any help.

LBN 535 180mm.zip

Best regards,

Francisco

Hi Fransisco,
Could you also send me the .log file from the run.
Thanks and best regards
Steve
Like
fbitto 0.00
...
· 
Steve Greaves:
Francisco Bitto:
Hi Steve,

Thanks a lot for continuing improving your script. I've been getting some errors with the last versions, including V1.3.3. But that only happens in some folders, the ones that have only Light frames work OK.

I've attached the .csv debug files to see if it can be of any help.

LBN 535 180mm.zip

Best regards,

Francisco

Hi Fransisco,
Could you also send me the .log file from the run.
Thanks and best regards
Steve

Yes of course, please find it attached.

AstroBinUploader.log

Thanks a lot
Like
AstroBadger 6.02
...
· 
Francisco Bitto:
Steve Greaves:
Francisco Bitto:
Hi Steve,

Thanks a lot for continuing improving your script. I've been getting some errors with the last versions, including V1.3.3. But that only happens in some folders, the ones that have only Light frames work OK.

I've attached the .csv debug files to see if it can be of any help.

LBN 535 180mm.zip

Best regards,

Francisco

Hi Fransisco,
Could you also send me the .log file from the run.
Thanks and best regards
Steve

Yes of course, please find it attached.

AstroBinUploader.log

Thanks a lot

Hi Francisco,
Can you send your e-mail address to [email protected]. I can then send you a version of the code that I think resolves your issues. If it works I will then make a wider release.
Best regards
Steve
Like
 
Register or login to create to post a reply.