You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To add simple 1D sans data I think we could rewrite the save as follows (untested):
defsave(self, basename):
# type: (str) -> None""" Save the model parameters and data into a file. Not Implemented except for sesans fits. """ifself.data_type=="sesans":
np.savetxt(basename+".dat", np.array([self._data.x, self.theory()]).T)
elifself.data_type=="Iq":
data, index=self._data.data, self._data.indexx, y, dy, dx=data.x[index], self.theory(), data.dy[index], data.dx[index]
np.savetxt(basename+".dat", np.array([x, y, dy, dx]).T)
For now you can monkey-patch this into sasmodels at the start of your script:
… 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:
sasmodels/sasmodels/bumps_model.py
Lines 277 to 285 in 59f5bae
That's because the data object for sasmodels is messy:
sasmodels/sasmodels/direct_model.py
Lines 203 to 292 in 59f5bae
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:
The text was updated successfully, but these errors were encountered: