Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend the export options for FitResult #414

Open
HKaras opened this issue Jan 6, 2023 · 1 comment
Open

Extend the export options for FitResult #414

HKaras opened this issue Jan 6, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@HKaras
Copy link
Member

HKaras commented Jan 6, 2023

Currently, the only supported export option from a completed DeerLab FitResult is to pickle. Whilst pickling works well when everything is contained inside a single Python enviroment or computer it is not as good when transfering data between computer and Python versions. I am often finding that DeerLab fits completed on a spectrometer computer are not readable by my laptop.

My proposal would be to expand the FitResult class to contain an export method, as an additional option alongside pickling.

Advantages:

  • This method would then export to some heirachial format that would be more easily shared and stored.
  • This would also be much better for data archiving as instead of just saving a plot, the associated fit meta-data can also be kept.
  • Most people in our community (for better or worse) use Matlab as their main data-processing and ploting method.

Disadvantages:

  • Methods are not saved
  • UQResult would not be saved (probably could still save the important info but would take more work)

Some potential data format options:

  • HDF5 (Widly used in science but requires an extra package/dependency)
  • Old-Matlab (Already included in the scipy package)
  • New-Matlab (This is just a HDF5 wrapper)
  • Numpy / .npz (Designed for multiple arrays, and only readable in Python)

What do other people think?

@HKaras HKaras added the enhancement New feature or request label Jan 6, 2023
@stestoll
Copy link
Collaborator

Something human-readable like TOML would be desirable. Python as an official TOML package as of version 3.11. Matlab doesn't natively support it, but there is at least one implementation available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants