Re: Challenge to convert a simple IDL code into Python

2014-08-24 Thread Steven D'Aprano
Cleo Drakos wrote: > Thanks for your response. > > The IDL code reads the given binary file, and prints out the data inside > it. The binary file structure is provided using the variable 'data' in the > IDL code. Then it print the only required data that in side the 'data > that is precip. > >

Re: Challenge to convert a simple IDL code into Python

2014-08-24 Thread Gary Herron
On 08/24/2014 08:38 AM, Cleo Drakos wrote: Here is IDL code: |pro read_binary_file file= "3B42RT.2014010318.7.bin" num_lon= 1440 num_lat= 480 data= {header: bytarr(num_lon*2), precip: intarr(num_lon,num_lat), precip_error: intarr(num_lon,num_lat), $ source_of_estimate: byt

Challenge to convert a simple IDL code into Python

2014-08-24 Thread Cleo Drakos
Here is IDL code: pro read_binary_file file = "3B42RT.2014010318.7.bin" num_lon = 1440 num_lat = 480 data = {header: bytarr(num_lon*2), precip: intarr(num_lon,num_lat), precip_error: intarr(num_lon,num_lat), $ source_of_estimate: bytarr(num_lon,num_lat), precip_uncal: intarr(num_lon,num_l