reflectivity / orsopy

http://www.reflectometry.org/orsopy/
MIT License
0 stars 8 forks source link

Model language implementation #83

Closed aglavic closed 1 year ago

aglavic commented 2 years ago

Implement the ORSO header classes for the draft simple model language. The classes include the logic for resolving names and layers to be used easily by other programs.

The examples folder includes YAML from the website examples, a script that plots reflectivity and SLD from a given sample model, a conversion script showcasing the export of GenX models to the sample model and an estimator for measurement uncertainties based on a sample model string.

Some usage of the examples:

jfkcooper commented 2 years ago

Am I being slow, or is there a unit difference in the thicknesses between the examples 1/3 and 4? The total thicknesses don't seem to add up for me without 1/3 being in nm and 4 being in A?

aglavic commented 2 years ago

@jfkcooper What you are seeing is the newly added automatic unit conversion in combination with the globals-length_unit arguments. So example 1 is the default, which is nm, and 3+4 should be in angstrom.

But I noticed now a bug in the example 3, where the attribute is called length_units instead of length_unit, will correct that.

aglavic commented 1 year ago

According to @jochenstahn it was decided to merge these developments. Will create another PR for the revision that will include the documentation and proper review.