Jump to content

  •  

CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.

Photo

AstroImageJ can't read ASIair FITS?

  • Please log in to reply
3 replies to this topic

#1 Tailspin45

Tailspin45

    Mariner 2

  • *****
  • topic starter
  • Posts: 204
  • Joined: 10 Mar 2012
  • Loc: Carlsbad CA, near San Diego

Posted 01 March 2021 - 10:28 AM

Has anyone else had a problem reading files created by ASIair Pro in Live mode with AstroImageJ (AIJ)?

 

I'm trying to learn AIJ and want to use some files I have captured but keep getting the following error. I do not get the error when loading sample files provided by AIJ and others I've found online.

 

java.lang.NumberFormatException: For input string: "1036."
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
at java.lang.Integer.parseInt(Integer.java:615)
at astroj.FitsJ.getCardIntValue(FitsJ.java:1160)
at astroj.WCS.process(WCS.java:224)
at astroj.WCS.<init>(WCS.java:144)
at astroj.AstroStackWindow.<init>(AstroStackWindow.java:580)
at Astronomy_Listener.imageOpened(Astronomy_Listener.java:46)
at ij.ImagePlus.notifyListeners(ImagePlus.java:2112)
at ij.ImagePlus.show(ImagePlus.java:403)
at ij.ImagePlus.show(ImagePlus.java:349)
at ij.plugin.FolderOpener.run(FolderOpener.java:331)
at ij.IJ.runPlugIn(IJ.java:159)
at ij.Executer.runCommand(Executer.java:127)
at ij.Executer.run(Executer.java:64)
at java.lang.Thread.run(Thread.java:748)



#2 han.k

han.k

    ASTAP Software

  • *****
  • Vendors
  • Posts: 525
  • Joined: 09 Mar 2015
  • Loc: the Netherlands

Posted 13 March 2021 - 03:02 AM

This can happen if the FITS standard is not followed strictly most likely by ASIair. In your list it mentions string "1036." This refers to a string value in the FITS header. You could fix it by correcting this keyword in an other fits reader and for a long term solution report it to the ASIAir team.

 

To test an image you could upload it to the FITS verifier from Nasa:

 

https://fits.gsfc.na...its_verify.html

 

 

Han



#3 Tailspin45

Tailspin45

    Mariner 2

  • *****
  • topic starter
  • Posts: 204
  • Joined: 10 Mar 2012
  • Loc: Carlsbad CA, near San Diego

Posted 13 March 2021 - 09:34 AM

Yup, they write floating pointing values for integer variables IMAGEW and IMAGEH.

 

I used a text editor to Seach and Replace the values in every FITS file and it still didn't load because apparently there's a character count and so I had to add a space before the value to make up for the decimal point I took out after it.

 

I've written to ZWO about the issue, but have received no response.

 

Worse, though, I've downloaded some sample Hubble data and AstroImageJ won't read it although it passes a check by FITS Verify.

 

AIJ complains about some padding after the image which I don't see and thus can't fix. I've contacted Karen Collins who minds the program via the AIJ forum so we'll see what's what on the issue.

 

Thank you for the your time and thoughts on this issue.



#4 MCinAZ

MCinAZ

    Mariner 2

  • *****
  • Posts: 263
  • Joined: 23 Jul 2011
  • Loc: Northern Arizona

Posted 18 March 2021 - 03:11 AM

I used a text editor to Seach and Replace the values in every FITS file and it still didn't load because apparently there's a character count and so I had to add a space before the value to make up for the decimal point I took out after it.

It's perhaps a better approach to use delhead and sethead from the WSCTools package if you need to modify records in FITS headers. Doing so will ensure that the edited header conforms to the FITS standard. More generally, any time you need to mess with FITS files, there's a good chance that WCSTools already provides support to make your life easier.

 

http://tdc-www.harvard.edu/wcstools/

 

Available as a package from many Linux repositories, so perhaps something you can install and run directly on an ASIair.




CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.


Recent Topics






Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics