Thanks for catching this one!  (The 32mb fraction). Perhaps I should have
written the conversion from scratch instead of copying lofar.py.

I like all your suggestions, especially removing unnecessary dependencies.

I'll push by tonight!


On Wed, Nov 20, 2013 at 2:56 PM, Marten van Kerkwijk <
notifications@github.com> wrote:

> In scintellometry/lofar/digitize.py:
>
> > +                open(fraw_out, 'wb', recsize*itemsize_o) as fh1out,\
> > +                h5py.File(fnew, 'a') as h5:
> > +
> > +            # create dataset used to convert back to floats from int8's
> > +            if drctn == 'f2i':
> > +                h5[sap][beam][stokes].attrs['DATATYPE'] = 'int8'
> > +                diginfo = h5[sap][beam].create_dataset("%s_i2f" % stokes, (0, nchan), maxshape=(None, nchan), dtype='f')
> > +                diginfo.attrs['%s_recsize' % stokes] = recsize
> > +                diginfo.attrs['%s_nsig' % stokes] = nsig
> > +            elif drctn == 'i2f':
> > +                diginfo = h5[sap][beam]["%s_i2f" % stokes][...]
> > +
> > +            idx = 0
> > +            while True:
> > +                try:
> > +                    raw1 = fromfile(fh1, dtype, recsize).reshape(-1,nchan)
>
> What happens for an incomplete record? Is the full file converted, or can
> a <32MB fraction be lost?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/mhvk/scintellometry/pull/10/files#r7803386>
> .
>



-- 
     - - - - - - - - - - - - - - - - - - -
University of British Columbia Postdoctoral Fellow
Physics and Astronomy Department

Email: berndsen@phas.ubc.ca
     - - - - - - - - - - - - - - - - - - -