Matthew Kenworthy wrote:
> On 07/05/08 12:41 -0600, Derek Lamb wrote:
>   
>> I think the problem you have is that at Point Two you have a 2D piddle, 
>> but the header has 3 dimensions (NAXIS=3 and NAXIS3=100).  When rfits 
>> reads in the new file before Point Three, it sees NAXIS3 and allocates 
>> an appropriately sized piddle (ignoring NAXIS=2, which was probably 
>> corrected by wfits -- $PDL::Verbose = 1 will tell you about that I 
>> think).  If that is the case, then you should have a bunch of zeroes 
>> along that 3rd axis.
>>     
>
> Hi Derek,
>
> Ah, I see what you mean. This is what I get when I do
> strings cuma01-0003.fits:
>
> BITPIX  =                  -64 / Bits per pixel
> NAXIS   =                    2 / Number of axes
> NAXIS1  =                  320 / Axis length
> NAXIS2  =                  258 / Axis length
> NAXIS3  =                  100 / Axis length
> BUNIT   = 'Data Value'
>
> wfits appaerntly writes the correct number of axes, so the bug is that
> PDL rfits is ignoring NAXIS and allocating on the NAXIS1, NAXIS2,
> NAXIS3.
>
> What's the 'proper' way to delete a specific FITS header based on its
> keyword in the hash?
>
> Thanks,
>
> Matt
>
>   
There may be a way using the Astro::FITS::Header module, but I think 
using perl's 'delete' command would also suffice:
delete $image->hdr->{NAXIS3};

The patched version of wfits will prevent writing more numbered header 
fields ('CTYPE','CRPIX','CRVAL','CDELT','CROTA') than axes, and the 
patched version of rfits will guard against a poorly-written header of 
exactly the type encountered here.

cheers,
Derek

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to