Submit a Story  :  IRAF Links  :  Past Polls  :  Calendar  :  Advanced Search  
     iraf.net
FAQ
 Forum FAQForum FAQ   Forum SearchForum Search   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

INHERIT issue causes ERROR: Pixel storage file is truncated

 
Post new topic   Reply to topic    iraf.net Forum Index -> Systems
View previous topic :: View next topic  
Author Message
emma
Active IRAF User


Joined: 23 Jan 2006
Posts: 98
Location: Chile

PostPosted: Thu Oct 22, 2009 9:05 pm    Post subject: INHERIT issue causes ERROR: Pixel storage file is truncated Reply with quote

Hello,

I'd like to report an issue I have discovered when changing the INHERIT keyword in MEF fits files. When I set the value of the INHERIT keyword in the DQ extension from "F" to "T" and then back to "F" again, I get an "ERROR: Pixel storage file is truncated" error when I try to copy / display / etc the DQ extension.

I have put a short script (script.cl) and a fits file (flat.fits.tar.gz) that can be used to reproduce the problem at ftp.gemini.edu:/pub/.

It appears that when the value of INHERIT is set to "T" in the DQ extension, the keywords from the PHU are actually copied into the header of the DQ extension, but when INHERIT is set back to "F", the keywords remain in the header of the DQ extension. I think that maybe when INHERIT is set back to "F", the header size is decreased, but because the keywords remain, they no longer "fit" in the header. So, some of the pixel data is taken up with the header, which then causes the "Pixel storage file is truncated" error.

There are more detailed comments in script.cl.

I am using v2.14 of IRAF on redhat.

If you need any more information, please let me know Smile

Many thanks,

Emma Smile
Back to top
View user's profile Send private message
emma
Active IRAF User


Joined: 23 Jan 2006
Posts: 98
Location: Chile

PostPosted: Thu Oct 22, 2009 9:24 pm    Post subject: Reply with quote

Sorry, that wasn't supposed to be a link, that was supposed to be "ftp into ftp.gemini.edu and then cd to /pub and get the files from there" Smile

Thanks!
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3257
Location: Tucson

PostPosted: Fri Oct 23, 2009 1:34 pm    Post subject: Reply with quote

The gemini ftp archive might not be publicly visible, I can get to it but it appears empty. Could you instead post your script to the anonftp archive at ftp://iraf.noao.edu/pub so I can look?

Otherwise, the preferred method to change the inherit behavior is by using it in the kernel extension. The FITS kernel does read the file to get the various offsets and structure information and changing the value may affect the way the file is written out when done. I'd have to see how you were doing this to comment further but I'm not sure whether changing the INHERIT keyword is a bug or just a bad idea.

-Mike
Back to top
View user's profile Send private message
emma
Active IRAF User


Joined: 23 Jan 2006
Posts: 98
Location: Chile

PostPosted: Fri Oct 23, 2009 1:39 pm    Post subject: Reply with quote

Hi Mike,

You can't list the contents of /pub at ftp.gemini.edu ... all the files are hidden. You just need to know the names of the files (script.cl and flat.fits.tar.gz) to be able to "get" them ... they are there, promise Smile

Emma Smile
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3257
Location: Tucson

PostPosted: Fri Oct 23, 2009 1:42 pm    Post subject: Reply with quote

Sneaky. Anyway, got the files, will get back to shortly.
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3257
Location: Tucson

PostPosted: Sat Oct 24, 2009 5:03 am    Post subject: Reply with quote

Emma,

I can reproduce the problem, but is there a real-world reason why you're manually changing the INHERIT keyword rather than simply copying/referring to the extension using e.g.

Code:
cl> imcopy foo.fits[DQ,inherit-] bar.fits


The problem with changing inherit from 'F' to 'T' manually is that there's no reliable way to automatically know which keywords belong in the PHU such that they still apply to the other extensions correctly. I agree the kernel shouldn't choke the way it does with a pixel truncation error, but it's a bit like manually changing the NAXIS keywords to resize the image, and the least of your problems if you're corrupting the headers.

Can't you use the 'inherit' kernel parameter to do what you need? If not, why not?

-Mike
Back to top
View user's profile Send private message
emma
Active IRAF User


Joined: 23 Jan 2006
Posts: 98
Location: Chile

PostPosted: Tue Oct 27, 2009 5:06 pm    Post subject: Reply with quote

Hi Mike,

Thank you for your quick reply. I had already changed the code to what you had suggested Wink I just thought that getting the "Pixel storage file is truncated" error was a horrible bug and that you should know about it Smile

Comparing the INHERIT keyword to the NAXIS keyword has made me understand why we shouldn't change the INHERIT keyword Wink

Thank you for your help!

Emma Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    iraf.net Forum Index -> Systems All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2009 phpBB Group
 Copyright © 2005-2011 iraf.net
 All trademarks and copyrights on this page are owned by their respective owners.
Powered By Geeklog 
Created this page in 0.16 seconds