Closed dehoni closed 2 years ago
Will this break backward compatibility with old projects? Does it require some translations for that compatibiltiy?
To keep backward compatibility with old save projects saved with old parameter names you will need to update sasmodels/conversion_table.py. The python file houses a dictionary that maps the previous SasView version to the changes made after that version was released. This can accommodate model name and parameter name change.
General usage, but more information is given in the file documentation:
: { : [ , { : , ... : } ] }
Tested to save a project and analysis after fitting with some test data from the PR and load it to the Release version, and vice versa. The parameters are passed on correctly and files are read smoothly.
@krzywon to look at work required to resolve [Sasview#1902]. @butlerpd will check what happens for users who might encounter this problem
sasmodels ready for testing on Win
Made a fit using broad_peak
fitting the test/1d/hSDS_D2O_2p0percent.xml
and saved as a project in versions 4.2.2; 5.0.4; 5.0.5a1 main branch build of 13 Oct 2021. Then installed the sasmodels Jenkins PR build of PR #458.
Results
19:22:58 - WARNING: ER(...) function ignored. Using radius_effective(mode, ...) instead if it exists.
19:22:58 - ERROR: Error while reading the project file: No module named 'sas.sascalc.dataloader.readers.cansas_reader_HDF5'
19:22:58 - ERROR: Error while converting the project file: local variable 'datasets' referenced before assignment
Conclusion:
I think we agreed that this could be merged to main once the release branch is created? The SasView Issue, SasView #1902, to fix the problem with loading project has already been listed as a blocker.
The model "broad_peak" can be generalized to cover Lorentz like behavior and Debye-Anderson-Brumberger by introducing a outer power term with "exponent_p". The commit does the necessary changes.