c-proof / pyglider

glider software
https://pyglider.readthedocs.io/
Apache License 2.0
17 stars 25 forks source link

MNT: Factor out profile computation... #111

Open jklymak opened 2 years ago

jklymak commented 2 years ago

Currently, binary_to_timeseries or raw_to_timeseries (Sea explorer) both have the "profile" finding logic in them. Recent experience has shown that this step is often somewhat flaky, and causes the raw time series process to not complete.

I'd propose we break the "profile" logic into its own routine and ask users to call it after making the time series to add profile info. That will also allow more modularity with the "best" profile logic, which I find depends on the sampling frequency of the pressure sensor. It would also allow for taking advantage of any metadata sent up by the glider as well. So now users would do:

    outname = slocum.raw_to_timeseries(
        rawdir, l1tsdir, deploymentyaml)
    outname = ncprocess.get_profiles(outname, ...)