#1  
Old 22-08-2013, 10:31 AM
LewisM's Avatar
LewisM
Novichok test rabbit

LewisM is offline
 
Join Date: Aug 2012
Location: Somewhere in the cosmos...
Posts: 10,388
FITS headers

Having an issue with pixinsight not being able to read fits images recorded with the starlight express capture software. Maxim and DSS have no issue with them, but PI rejects them.

Any work around?
Reply With Quote
  #2  
Old 22-08-2013, 11:38 AM
mithrandir's Avatar
mithrandir (Andrew)
Registered User

mithrandir is offline
 
Join Date: Jan 2009
Location: Glenhaven
Posts: 4,161
Lewis, have you tried fitsverify on the file? http://heasarc.gsfc.nasa.gov/docs/so...ls/fitsverify/
You'll need the cfitsio dll for which there is a link on that page, but FYI the link you want is http://heasarc.gsfc.nasa.gov/fitsio/

It is possible that SX is writing a bad or incorrectly ordered header, or that PI doesn't like some perfectly valid entry.

EDIT: Make sure fitsverify.exe was built with the same version of code as cfitsio.dll. I had to rebuild it because the dll was newer than the one the prebuilt version used.
Reply With Quote
  #3  
Old 22-08-2013, 12:04 PM
LewisM's Avatar
LewisM
Novichok test rabbit

LewisM is offline
 
Join Date: Aug 2012
Location: Somewhere in the cosmos...
Posts: 10,388
Thanks Andrew. Interesting. Testing the FITS throws this back:

File name: IMG83.FIT
Run Number 13294

fitsverify 4.16 (CFITSIO V3.320)
--------------------------------


1 Header-Data Units in this file.

=================== HDU 1: Primary Array ===================

*** Error: checking data fill: tried to move past end of file

1 | SIMPLE = T /
2 | BITPIX = 16 /
3 | NAXIS = 2 /
4 | NAXIS1 = 3040 /
5 | NAXIS2 = 2024 /
6 | OBJECT = '1'
7 | TELESCOP= ''
8 | INSTRUME= 'Starlight Xpress CCD'
9 | OBSERVER= ''
10 | ORIGIN = ''
11 | DATE-OBS= '2013-08-09'
12 | TIME-OBS= '22:28:58'
13 | HISTORY = 'Fullframe Image ''
14 | HISTORY = ''
15 | HISTORY = ''
16 | HISTORY = ''
17 | HISTORY = ''
18 | HISTORY = ''
19 | HISTORY = ''
20 | HISTORY = ''
21 | HISTORY = ''
22 | HISTORY = ''
23 | HISTORY = ''
24 | HISTORY = ''
25 | HISTORY = ''
26 | HISTORY = ''
27 | HISTORY = ''
28 | HISTORY = ''
29 | HISTORY = ' '
30 | HISTORY = ' '
31 | HISTORY = ' '
32 | HISTORY = ' '
33 | COMMENT = ' '
34 | COMMENT = ' '
35 | COMMENT = ' '
36 | COMMENT = ' '
37 | BZERO = +3.2768000000E+04
38 | BSCALE = +1.0000000000E+00
39 | PIXWIDTH= 7.8000000000E-03
40 | PIXHEIGH= 7.8000000000E-03
41 | SATURATE= 32768
42 | EXPTIME = 1.2000000000E+02
43 | FOCALLEN= 0.0000000000E+00
44 | APERTURE= 0.0000000000E+00
45 | FILTER = 'None'
46 | END

46 header keywords

16-bit integer pixels, 2 axes (3040 x 2024),

++++++++++++++++++++++ Error Summary ++++++++++++++++++++++

HDU# Name (version) Type Warnings Errors
1 Primary Array 0 1

**** Verification found 0 warning(s) and 1 error(s). ****


So, SX software is inducing unreadable errors!!! I just tried opening them in the SX capture software, and they won't open there either! Geez Louise! Yet, FITS Liberator still opens them.

Any ideas?
Reply With Quote
  #4  
Old 22-08-2013, 12:30 PM
mithrandir's Avatar
mithrandir (Andrew)
Registered User

mithrandir is offline
 
Join Date: Jan 2009
Location: Glenhaven
Posts: 4,161
Quote:
Originally Posted by LewisM View Post
...

So, SX software is inducing unreadable errors!!! I just tried opening them in the SX capture software, and they won't open there either! Geez Louise! Yet, FITS Liberator still opens them.

Any ideas?
Nope. I'd say take it up with SX. It would be nice if verify said what for it was looking when it hit EOF.
You could try the Perl Astro::FITS::CFITSIO module to rewrite the header. It's not that much work - at least in CygWin.
Reply With Quote
  #5  
Old 22-08-2013, 02:48 PM
Geoff45's Avatar
Geoff45 (Geoff)
PI rules

Geoff45 is offline
 
Join Date: Jul 2006
Location: Sydney
Posts: 2,631
Quote:
Originally Posted by LewisM View Post
Having an issue with pixinsight not being able to read fits images recorded with the starlight express capture software. Maxim and DSS have no issue with them, but PI rejects them.

Any work around?
Have you checked on the PI forum? There's quite a lot of stuff there on this very issue.
Geoff
Reply With Quote
  #6  
Old 22-08-2013, 02:58 PM
malclocke (Malc)
Registered User

malclocke is offline
 
Join Date: Jun 2012
Location: Christchurch, New Zealand
Posts: 183
NAXIS values seem a bit odd, according to the specs for the camera shouldn't the resolution be 3024 x 2016?
Reply With Quote
  #7  
Old 22-08-2013, 05:11 PM
mithrandir's Avatar
mithrandir (Andrew)
Registered User

mithrandir is offline
 
Join Date: Jan 2009
Location: Glenhaven
Posts: 4,161
Quote:
Originally Posted by malclocke View Post
NAXIS values seem a bit odd, according to the specs for the camera shouldn't the resolution be 3024 x 2016?
Sounds like it is including the border pixels in the count but not putting them in the data. If that's the case, Astro::FITS::CFITSIO can fix it easily. I can whip you up a bit of code to try if you like, but you'll need CygWin or *nix to run it.
Reply With Quote
  #8  
Old 22-08-2013, 06:20 PM
LewisM's Avatar
LewisM
Novichok test rabbit

LewisM is offline
 
Join Date: Aug 2012
Location: Somewhere in the cosmos...
Posts: 10,388
Andrew et al, Ian Bruce - the software writter for SX - is onto it. I sent him one of the files.

The images are totally unbinned, so the size is odd. SX software allows it. If I capture with Maxim, the pixel size is indeed 3024 x 2016. Perhaps this is what PI is finding problematic, as all the 3024 x 2016 files integrate,calibrate, debayer, stack etc just fine in PI.

Andrew, would love to try it but I have neither of those programs, nor would I know what to do with them CMD Line stuff is not my forte FITS Liberator cannot assist with it???
Reply With Quote
  #9  
Old 22-08-2013, 09:03 PM
LewisM's Avatar
LewisM
Novichok test rabbit

LewisM is offline
 
Join Date: Aug 2012
Location: Somewhere in the cosmos...
Posts: 10,388
Ian and I have been in email discussion for the past couple hours. I have sent him some files etc, and he is experiencing the same issues. Only seems to be PI not accepting the padding (whereas other programmes will). The odd thing is I cannot load the just created FITS back into the self-same SX capture software.

He is working on a fix for it now, so will post it when he finds out more.
Reply With Quote
  #10  
Old 22-08-2013, 11:40 PM
mithrandir's Avatar
mithrandir (Andrew)
Registered User

mithrandir is offline
 
Join Date: Jan 2009
Location: Glenhaven
Posts: 4,161
Quote:
Originally Posted by LewisM View Post
Ian and I have been in email discussion for the past couple hours. I have sent him some files etc, and he is experiencing the same issues. Only seems to be PI not accepting the padding (whereas other programmes will). The odd thing is I cannot load the just created FITS back into the self-same SX capture software.

He is working on a fix for it now, so will post it when he finds out more.
Do you mean padding or lack of padding?

The header says 3040x2024 but the camera is supposed to generate 3024x2016. If there are 3024x2016 pixels in the data but the header says there should be 3040x2024 then that explains the "*** Error: checking data fill: tried to move past end of file" since it should have another 56576 pixels of data.

If PI believes the header it can't work without fixing the header. Otherwise Ian will have to provide some means for you to tell PI what the correct NAXIS1 and NAXIS2 are.

Any chance of getting SX to fix their software?

There's a program from ESO to replace a header line. http://archive.eso.org/saft/replacekey/ with a link to the doco.
It compiles under CygWin (and would require some work to compile with MSVC) so I could send you the program and the DLL it needs.

replacekey my.fits "NAXIS1 = 3024" "NAXIS1"
replacekey my.fits "NAXIS2 = 2016" "NAXIS2"
Reply With Quote
  #11  
Old 23-08-2013, 07:07 AM
LewisM's Avatar
LewisM
Novichok test rabbit

LewisM is offline
 
Join Date: Aug 2012
Location: Somewhere in the cosmos...
Posts: 10,388
I am pleased to reply that Ian at SX rewrote the SXVR M25C software scripts, and sent it to me as version 3.8a (dated yesterday ). They work flawlessly, and now save the FITS with the CORRECT header.

Thanks guys for your suggestions, and Andrew, that is precisely what he did
Reply With Quote
  #12  
Old 23-08-2013, 10:21 AM
LewisM's Avatar
LewisM
Novichok test rabbit

LewisM is offline
 
Join Date: Aug 2012
Location: Somewhere in the cosmos...
Posts: 10,388
In the latest update created by Ian to cover this issue, you must, in the default settings, check the box that says Pad FIT files.

Now, EVERY file I create with the SX software opens in PI without issue. Happy days.
Reply With Quote
  #13  
Old 31-12-2013, 09:41 AM
RobC (Rob)
Registered User

RobC is offline
 
Join Date: Apr 2012
Location: Woodford , Queensland , Australia
Posts: 218
Where is The Pad Setting in The Capture Dialog

Lewis,

Cannot find the setting in the SX capture dialog to pad out the Fits image files. Where is it or do we need to get another update.

Thanks

Rob
Reply With Quote
Reply

Bookmarks

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +10. The time is now 11:35 AM.

Powered by vBulletin Version 3.8.7 | Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Advertisement
Bintel
Advertisement
Testar
Advertisement