Recent Releases of eniius

eniius - v0.2.0

Updates to Horace, McStas and Nexus-Constructor support

  • Horace routines now support multirep and MARI
  • Improve support for McStas-to-NeXus and vice versa conversions
  • Improve support for output for nexus-constructor JSON files

- Python
Published by mducle almost 2 years ago

eniius - v0.1.1

Bugfix release

  • Fix bug in JSON output function
  • Fix error in Euler rotation matrix calculation
  • Can now handle McStas PREVIOUS keyword for RELATIVE component position
  • Update horace instrument routines to accept chopper speed and types

- Python
Published by mducle almost 3 years ago

eniius - v0.1.0

Initial release of eniius

  • McStas to NeXus: Uses mcstasscript to parse a McStas instr file and write a NeXus representation (or optionally a json file 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 instr file. Note that the output instr file 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 by eniius from an input instr (e.g. a full loop: McStas->NeXus->McStas) the instr file may not have components in the correct order. The component order is determined from the positions as defined in the NXtransformations field 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