koenderinklab / OpenDDM

https://koenderinklab.github.io/OpenDDM/
Apache License 2.0
3 stars 2 forks source link

During the analysis output the intermediate data to text so you don't have to run the whole thing every time #43

Open mwakok opened 2 years ago

mwakok commented 2 years ago
mwakok commented 2 years ago

I have added functionality to export the ddmMatrix both as netcdf (default for xarray) and csv. Saving it as an xarray (netcdf) allows for the easy addition of dq, dtau, data_file, timestamp. Storing as a csv, now contains tau and q.

This will also allow the iterative calculation of the lag times as long as they are monotonically increasing.

Example:

  1. Calculate matrix for taus=np.arange(1,100)
  2. Export matrix
  3. Calculate matrix for taus=np.arange(100,200)
  4. Update exported matrix

Changes have been merged with develop. The functions can be found in ddm/data_handling/exporting.py and it is used in the example notebook.