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

Event data #37

Closed mads-bertelsen closed 3 years ago

mads-bertelsen commented 3 years ago

Changes the McStasData class to be more general, but removes data from the class. Then McStasDataBinned and McStasDataEvent inherits from McStasData and handles binned data and event data respectively.

McStasDataBinned is identical to the old McStasData in functionality.

McStasDataEvent contains events, but also intensity which is used for plotting. No Errors are included. The Intensity array is usually only a subset of the Events data, since it will be difficult to see anything useful in a plot with large numbers. Monitor_nD sets the limit to 1 million events in the plot, which is already unreasonably large as it exceeds monitor resolution.

This update means event data can be properly loaded from McStasScript, before only the preview data was loaded which was limited to for example 1 million in the case of Monitor_nD.

Unit tests and manual updated.