GithubHelp home page GithubHelp logo

recon3d_tests's Introduction

Recon3D

*** Still a work in progress ***

Recon3D is a set of algorithms developed to analyze data collected using dark field X-ray microscopy (DFXRM). DFXRM is a non-destructive technique which allows to select a single grain embedded in a polycrystalline sample and to reconstruct, in 3D, its shape and how crystal orientations are distributed in its interior. The technique has a spatial resolution of about 100 nm and an angular resolution superior to what provided by transmission electron microscopy (TEM).

From the images collected at different sample rotation angles $\omega$, and at different rocking and rolling angles $\phi$ and $\chi$, Recon3D returns

  1. A 3D reconstruction of the shape of the grain investigated using DFXRM
  2. A 3D map showing how crystal orientations and strain are distributed in the sample

The white paper outling the principles used for developing the softwrae can be found here.

Recon3D is designed to consider, as input, topo-tomo data sets from ID06 at ESRF. The program takes data where a sample is rotated around the diffrx and at every point, a mosaicity scan is done. This is done through a forward projection algorithm to calculate a given voxel's reflected spot position on the detector.

Future versions will be able to do reconstruction based on strain datasets.

Preliminaries

Running Recon3D requires having Miniconda2 and Fable on your Panda2 account. To install the packages, run the script available here. If you get an error message and need to change a permission path, check this tip.

Running parallelised code on Panda requires using mpi4py. The command to install it is conda install mpi4py

Reading data from .edf files to a NumPy array

The script getdata.py reads data from .edf files and outputs a NumPy array with the dimensions tilt1-steps x tilt2-steps x omega-steps x img_xlen x img_ylen, where tilt1 and tilt2 are the two top tilts in the LAB goniometer at ID06. Omega is the topo-tomo rotation stage. The command to create the array is the following:

$ python getdata.py [datadir] [dataname] [bgdir] [bgname] [poi] [imgsize] [outputpath] [outputdirname] [phi_0] [chi_0]

Arguments are the following:

Argument Description Example
datadir Directory of .edf files. /data/experiment1
dataname Name of data files. run1_
bgdir Directory of background .edf files. /data/background1
bgname Name of background files. bg1_
poi Center point for region of interest. 512,512
imgsize Size of region of interest. 200,200
outputpath Path to put the output directory. /analysis/output
outputdirname Name of output dir. exp1_array
phi_0 Initial phi (alpha) value 0.765
chi_0 Initial chi (beta) value -3.35

If MPI is available, the following command will run the script in 10 processes at the same time. This will vastly increase the speed. On Panda2, the recommended maximum number of getdata processes to run in parallel is 20.

$ mpirun -n 10 python getdata.py [datadir] [dataname] [bgdir] [bgname] [poi] [imgsize] [outputpath] [outputdirname] [phi_0] [chi_0]

Running the reconstruction algorithm on a data set

$ mpirun -n 10 python recon3d.py [initfile]

How to contribute

Check the wikipages on contribution and on suggested software.

recon3d_tests's People

Contributors

acjak avatar albusdemens avatar

Watchers

 avatar

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.