ldeo-glaciology / xapres

package for processing ApRES data using xarray
MIT License
3 stars 2 forks source link

replace core burst-loading code with calls to bas-apres #61

Open jkingslake opened 1 month ago

jkingslake commented 1 month ago

An improvement would be to replace the code used at the core of from_dats to load bursts from dat files with calls to a properly designed package which does this, bas-apres.

A good place to start would be here https://github.com/antarctica/bas-apres/blob/master/apres/read_apres.py

It would be a major rewrite and involve several methods in from_dats.

I would involve something like this

 with ApRESFile(args.infile) as f:
        for burst in f.read():
            header = burst.header
            data = burst.data

In place of any code where we extract bursts in the current version, e.g., _burst_to_3d_arrays. But it will require changes in many other places too.

jkingslake commented 4 days ago

67 does this