Package: neutronpy
NeutronPy is a python library with commonly used tools for neutron scattering measurements, primarily for Triple Axis Spectrometer data, but easily applied to other types of data, including somereducedTime of Flight data. Below is a non-exhaustive list of Neutronpy’s features:Triple Axis Spectrometer resolution function calculation (Translated from ResLib), includingResolution ellipsesInstrument visualizationConvolutionTime of Flight Spectrometer resolution function calculation (based on Violini et aldoi:10.1016/j.nima.2013.10.042), includingResolution ellipsesStructure factor calculation, includingStructure factors with support forMass NormalizationDebye-Waller factorUnit cell visualizationSingle-ion magnetic form factor calculationLeast-Squares fitting (custom interface for scipy.optimize.leastsq using lmfit features), includingBuilt-in physical modelsBasic data operationsBinningNormalization (time/monitor)Calculated peak integrated intensity, position, and widthPlottingSlicingLoading from common TAS file types, includingSPICEICEICPMADSeeRoadmapfor panned future features.David M Fobes started development of NeutronPy while in theNeutron Scattering Group, part of the Condensed Matter Physics & Materials Science Department (CMPMSD) atBrookhaven National Laboratory, and has continued within theMPA-CMMSand A-1 groups ofLos Alamos National Laboratory. Both areUS Department of Energy, Office of Basic Energy Sciencesfunded laboratories.NeutronPy is a work-in-progress (see theRoadmapin the wiki for indications of new upcoming features) and as such, still has many bugs, so use at your own risk; see Disclaimer. To report bugs or suggest features see Contributions.RequirementsThe following packages are required to install this library:Python >= 3.6numpy >= 1.10.0scipy >= 1.0.0lmfit >= 0.9.5matplotlib >= 2.0.0h5pyThe following package is required to use theneutronpyentry-point gui optional featurepyqt5 >= 5.4.1The following packages are required to test this library:pytest >= 3mockInstallationIt is recommended that you useanacondaorpipto install NeutronPy:conda install -c neutronpy neutronpyor:pip install neutronpySee Installation for more detailed instructions.DocumentationDocumentation is available atneutronpy.github.io, or can be built using sphinx by navigating to the doc/ folder and executingmake html; results will be in thedoc/_build/folder.To ask questions you may eitherrequest accessto theNeutronpy Slack Team, or create aGithub issue.Building documentation requires the following additional packages:sphinx>=1.4releases>=1.5.0numpydoc>=0.8.0neutronpy_rtd_sphinx_themeContributionsContributions may be made by submitting a pull-request for review using the fork-and-pull method on GitHub. Feature requests and bug reports can be made using the GitHub issues interface. Please read thedevelopment guidefor details on how to best contribute.To discuss development you mayrequest accessto theNeutronpy Slack Team.Copyright & LicensingCopyright (c) 2014-2018, David M. Fobes, Released under terms in LICENSE.The source for the Triple Axis Spectrometer resolution calculations was translated in part from theResLib3.4c (2009) library released under the terms in LICENSE.RESLIB, originally developed by Andrey Zheludev at Brookhaven National Laboratory, Oak Ridge National Laboratory and ETH Zuerich. email:zhelud@ethz.ch.DisclaimerTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.