Open pkienzle opened 1 week ago
… and extend this for the other data types return by sasdata.
Particularly messy is the adhoc masking I do within the _interpret_data method, which means the Iq returned by the theory calculation doesn't align with the measured q or (qx,qy) values.
Related: the complexity required for save already lives in the sasmodels plotting routines.
We could have a method to set set up the data structures needed for save/plot in one function so that they only need to render the data to a file in save or to a graph in plot.
It looks like I didn't implement problem.save() for all sasdata types in the sassmodels bumps wrapper:
https://github.com/SasView/sasmodels/blob/59f5bae160cf928aa80a65b7636432749f413a93/sasmodels/bumps_model.py#L277-L285
That's because the data object for sasmodels is messy:
https://github.com/SasView/sasmodels/blob/59f5bae160cf928aa80a65b7636432749f413a93/sasmodels/direct_model.py#L203-L292
To add simple 1D sans data I think we could rewrite the save as follows (untested):
For now you can monkey-patch this into sasmodels at the start of your script: