On Nov 22, 2011, at 4:39 PM, Robert Young wrote:

> It looks like your files have 16 bit short integers (NBITS 16), not
> bytes.  Try replacing "byte" with "short" in your header.


Thanks Robert. The above info, plus a little bit of fiddling got me the 
following working header

        short
        2
        43200 18000

There were two other things that were confounding me... one, I was trying 
everything in the pdl shell, but seems like the shell is not very chatty, and 
pretty forgiving to boot... it doesn't seem to complain if there are errors, so 
I wasn't really getting any notification of errors of my ways. Two, my test 
file was name foo.bil, so I was naming the header file foo.hdr. It actually 
should be foo.bil.hdr.

Fixing the above two, gave me the helpful error that 

> Probably false alloc of over 1Gb PDL! (set $PDL::BIGPDL = 1 to enable) at 
> /opt/local/lib/perl5/vendor_perl/5.14.1/darwin-multi-2level/PDL/Core.pm line 
> 521.

So, with the above setting, I can now read these files without any further 
transformation. First step conquered. On to the next 100 steps.

Many thanks again.


> 
> Best,
> Robert
> 
> On Tue, Nov 22, 2011 at 4:44 PM, Puneet Kishor <[email protected]> wrote:
>> 
>> I have to figure out what information to extract from the above to create a 
>> FlexRaw compatible header the way readenvi.pl does, but am a loss for now. I 
>> have tried something like the following, but with no luck
>> 
>>        byte
>>        3
>>        43200 18000 1
>> 
>> 


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

Reply via email to