Giter Site home page Giter Site logo

neutronimaging / tofimaging Goto Github PK

View Code? Open in Web Editor NEW
7.0 5.0 3.0 97.34 MB

Tool package for neutron time of flight analysis

License: GNU General Public License v3.0

Python 5.34% Jupyter Notebook 93.97% QMake 0.05% C++ 0.63% C 0.01%
tof data-reduction bragg-edge

tofimaging's People

Contributors

anderskaestner avatar jeanbilheux avatar matteobsu avatar thomasholmrod avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

tofimaging's Issues

TOF - adapt BB module

adapt the BB module to handle TOF imaging dataset.

  • OB normalization should be done one-by-one with projection
  • handle the absence of dark current (not existing for the MCP)

Restructuring modules and cleanup

Towards an alpha release the following items:

  • code cleanup
  • restructuring / renaming of the modules for more consistency
  • Pdf with guides to the utilization of functions.

Implement running average

That is very often applied to process the data before fitting, the running average is done along the wavelength axis.

  • on the data
  • or on the signal?

Add list of requirements

We need to have a requirements.txt, and a requirements_dev.txt that will list the python packages needed to be able to use that library.

Normalization should be optional in the UI

User should have the option to normalize or not the data. If flag is off, the data loaded will be used directly. If flag is on, user will have to load the sample and the ob data.

ToF to wavelength spectrum calibration with refrence using 2 edges

It is often required to calibrate ToF spectra from tof to wavelength, when the instrumental parameters are not known but the material is. Add a simple function that asks which edges to use for calibration and automatically match experimental and reference edges to perform calibration.

Implement the model and fitting function in C++.

Bring the model and fitting function in C++

  • implement different options for edge shape (transmission, attenuation and options for functions before and after the edge)
  • implement the gaussian of the gradient option, this is now issue #9
  • implement L-M fitting for all cases and tests the result
  • define strategies for parameter intialization

Kernel size should be customized in ui

The kernel selection should have the following options:

  • Selection using a combo box
  • Box (Moving average), parameters box size in different directions or uniform
  • Gauss, parameters sigma in different directions or uniform
  • Custom-designed, the user provides kernel... is it needed?

ToFImaging scripts refinements

Following refinements are required for scripts:

  • edgefitting_2D: change calibration parameters into dictionary, check outputs, the width is not assigned (check line 135), change est_parameters into dictionary and rename them initial_guess, add a check for saving data
  • TOFCalibration, check for smarter solution for ROI extraction

FOBI algorithms

Implement a module for FOBI analysis.
Must include:

  • chopper time delay models
  • spectrum overlap merging
  • Wiener decorrelation

Optional:

  • full data reduction routine (from tifs)
  • moving average options
  • spectrum calibration (non manual)

ToFImaging - edge fitting in 2D

Write the routine to perform edge fitting in all chosen pixels in an image.

  • ROI selection of the area to be fitted
  • fitting parameters to be saved
  • images with edge position
  • evaluate performance and speed

Bragg Edge fitting - fit in attenuation

Update the code and make it flexible in order to switch smoothly the fitting routine from attenuation to transmission and back.
The Kropff model has to be updated accordingly

Create a python binding for NXS lib

  • Implement a C++ version if the NXS library
  • Implement python bindings for NXS lib using PyBind11
  • Implement CMake file to compile the lib
  • Test on different python interpreters
    • MacOS
    • Linux Ubuntu
    • Windows
  • Create PIP installer

Reference spectra database

Untill the NCrystal can be integrated in the software package for accurate modeling of reference Bragg pattern, it would be useful to add reference spectra of commonly used elements and alloys with specific crystal structures.

TOF - normalization module

Add a usual normalization module: divinding by the OB and dose correcting for TOF imaging dataset.
This could be a special case of the BB module for TOF datasets (withouth BB correction)

Move clean up code into the TOFImaging repository.

Clean up the code of ToF_notebooks and bring the cleaned files with history into the TOFImaging respository

  • TOF calibration from IMATexperiment branch in scripts
  • TOFBinImages from IMATexperiment branch in scripts
  • CalculateSummedImgs from IMATexperiment branch in scripts
  • ShutterFileGen_IMAT from IMATexperiment branch in scripts
  • RunMuhrec from IMAT_TOF_tomography in scripts
  • WriteXMLConfigFiles from IMAT_TOF_tomography in scripts
  • LSP_data_analysis from LSP_edgefitting branch in scritps, to be renamed in something like 2D_edgefitting

Normalization mode

Flag should be present to allow 2 normalization:

  • normalize pixel by pixel
  • normalize by ROI (mean of ROI counts)

TOF - multi-edge fitting

Implement a simplified version of multi-edge fitting. Parameters to be fitted: lattice parameter

parsing more than one spectrum in a directory

Dear developer(s),

it is often the case that in one directory we have more than one ToF radiography (for example to split a long exposure time). These files are normally named with a _00x at the end of their given name (e.g. test_000_0nnnn.fits and test_001_0nnnn,fits). It would be great if with your program one would be able to correct each of them with its own spectrum file.
Thanks a lot and keep up with the great work

M

Try total variation as spectrum ID

Total variation seems to be a useful scalar metric to compare different pixels and to identify regions with different spectra. I tried with different smoothing and noise levels and it looks promising.

Eq id=log(abs(sum(s(lambda))/N))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.