Closed AVB25 closed 6 months ago
Centralising our analysis tools is definitely a promising direction!
I think the best place for these to go would be in ndscan.results, as ndscan depends on oitg, not the other way round. That package already has functions for just quickly getting a matplotlib plot on the screen for a results file, but hasn't seen much love yet.
Now that we are no longer stuck on Python 3.5, we might want to use dataclasses (or at least named tuples) to make the API easier to use.
Some simple convenience functions that have been helpful to me, and I think may be helpful to others. They parse the results dictionary yielded by
load_results
to translate all PYON into python objects and make data more accessible. There are also functions to sort a multi-dimensional scan, possibly with missing entries (only tested for 2-D scans so far).Demo usage for loading and directly plotting a 2D scan with missing entries: