neutronimaging / ToFImaging

Tool package for neutron time of flight analysis
GNU General Public License v3.0
7 stars 2 forks source link
bragg-edge data-reduction tof

Time of Flight neutron Imaging

Status: Build Status

This package includes modules for data reduction and analysis of various Time Of Flight (TOF) neutron imaging data. Initially designed to reduce MCP/Timepix data, most of the modules are compatible with post-processed 3D matrixes with dimension (x,y,lambda/TOF). Currently implemented packages:

For a detailed guide of how to use this package please visit https://neutronimaging.github.io/ToFImaging/.

For questions please contact matteo.busi@psi.ch or anders.kaestner@psi.ch or use the issue box https://github.com/neutronimaging/ToFImaging/issues

How to Install

The package can be installed via pip using the command:

pip install tofimaging

Then the modules can be imported using e.g. the commands:

import tofimaging.EdgeFitting as efit
import tofimaging.PhaseFitting as pfit
import tofimaging.ReductionTools as rt

Alternatively, the package can be cloned via git or downloaded from the website to the local machine, then loaded by the commands:

import sys  
sys.path.insert(0, "path-to-repository\\src")
import tofimaging.EdgeFitting as efit
import tofimaging.PhaseFitting as pfit
import tofimaging.ReductionTools as rt

Make sure to update the "path-to-repository" with the path to this downloaded package in the local machine and appending the "\src" as shown. This procedure, may require further installation of external modules, listed in requirements.txt

How to Use

The functions can inspected in the documentation and called in the command prompt or jupyter notebook. E.g. if you installed using the above:

import tofimaging.EdgeFitting as efit
efit.GaussianBraggEdgeFitting2D(ToFdata,spectrum)

For the software documentation please visit https://neutronimaging.github.io/ToFImaging/