Analysis class #63

Analysis class #63 (closed). This MR also contains an example (heterodyne spectroscopy of a resonator) of how to use the analysis framework #103 (closed) .

Purpose of this MR

The purpose of this MR is to gather feedback on the design and concepts so that the eventual merge request will be more smooth given the size of this feature. At this point, I am not looking for detailed feedback/code review, but rather for starting conceptual discussions.

Contents of the MR

The design of the base analysis class is inspired by analysis_v2 of PycQED (https://github.com/DiCarloLab-Delft/PycQED_py3/tree/develop/pycqed/analysis_v2). The intent is to take the good lessons and concepts of the analysis_v2 code but avoid the spaghetti and pitfalls of that implementation.

The current functionality of the class (checkboxes what is there in some form)

  • provide a common structure for analysis
  • an example of how to use this analysis
  • Extracting the data
  • Performing fits and initial guesses
  • Plotting the data and storing the resulting figure.
  • Provide easy access to quantities of interest (QOI) resulting from the analysis.
    • Define format for saving quantities of interest
    • Define format for saving fit results (which is not necessarily a separate topic from the above)
  • Define how configuration options are passed into the analysis (think of fit range, fit guesses, plot ranges, etc.), [ @caenrigen: "I am a bit afraid of the old approach of an options_dict"]
  • ~~Documentation ~~ moved to #163 (closed)

S21

Current discussion points

Plotting/figure generating code

I am copying the "plot_dicts" format that was part of PycQED. I am making this more modular and manageable (see examples), but @caenrigen as someone who has used said framework pointed out that it is rather cumbersome to work with and hard to document. I'll try to see if I can come up with a good alternative.

Multi-file analyses and data "filtering" based on metadata

We now foresee this as implementing a different init and extract data method. It's worthwhile to think a bit about different ways of implementing this.

Storing of analysis outcomes

This is a discussion point raised by Pieter and Martin, we should think of how we make a clear distinction of data that is generated by an experiment, and the processed data, quantities of interest and figures that are generated by an analysis. Other issues are that an analysis will typically overwrite this. Currently this is a "feature not a bug", but this is worth a discussion.

Reusable code vs analysis scripts

We should have a clear answer to how this code should be used if users only want to run parts of their analysis, a rather common usecase. I have a decent understanding of how to deal with this, but it's tricky to properly define this use case.

Looking forward to your input! But please keep in mind that this is still in a prototyping phase.


Closes #63 (closed) #159 (closed)

Edited by Victor Negîrneac

Merge request reports

Loading