Recent Releases of eniius
eniius - v0.1.0
Initial release of eniius
- McStas to NeXus: Uses mcstasscript to parse a McStas
instrfile and write a NeXus representation (or optionally ajsonfile compatible with nexus-constructor
import eniius
wrapper = eniius.Eniius.from_mcstas('something.instr')
wrapper.to_json(f'mcstas_{wrapper.name}.json')
wrapper.to_icp(f'mcstas_{wrapper.name}.nxs')
The output NeXus file is designed to be read by the ISIS instrument control program (ISISICP) and the resulting instrument definition would then be included in the raw files produced by ISISICP
NeXus to McStas: Parses an input NeXus file and generates a McStas
instrfile. Note that the outputinstrfile is not guaranteed to compile or run! Users should check it and fix any unknown/undefined parameters before compiling. Also note that if the input NeXus file was not generated byeniiusfrom an inputinstr(e.g. a full loop: McStas->NeXus->McStas) theinstrfile may not have components in the correct order. The component order is determined from the positions as defined in theNXtransformationsfield so if this is missing, the components are ordered alphabetically.
wrapper = eniius.Eniius.from_nxs('something.nxs')
wrapper.to_mcstas().show_components()
wrapper.to_instr('something.instr')
- Predefined instrument definitions for LET, MAPS, MERLIN for use with Horace. ISIS spectrometers have specific definitions which can be read by Horace and used for resolution convolution calculations.
wrapper = eniius.Eniius(eniius.horace.let_instrument(ei=3.7), det_file='detector.dat')
wrapper.to_nxspe('let_data.nxspe')
- Python
Published by mducle almost 3 years ago