PaNOSC-ViNYL / McStasScript

McStas API for creating and running McStas instruments from python scripting
BSD 3-Clause "New" or "Revised" License
9 stars 11 forks source link

Mcstasscript on libpyvinyl #40

Closed mads-bertelsen closed 2 years ago

mads-bertelsen commented 2 years ago

Version of McStasScript that use libpyvinyl base classes, uses new syntax so breaks backward compatibility.

Parameters inherit from the libpyvinyl Parameter class ParameterContainer inherits from the libpyvinyl CalculatorParameters class McCode_instr (main class) inherits from libpyvinyl Calculator class

An example of the new syntax is shown in examples/libpyvinyl_example.ipynb

The work is not complete, there are still some tasks before a merge is possible

This pull request exists so that others can comment on the implementation and we can discuss how to best proceed in a way that aligns with the pyvinyl project.

mads-bertelsen commented 2 years ago

Updated to run on libpyvinyl 1.1.0 and documentation in good shape at https://mads-bertelsen.github.io. Ready to merge!