From 69b5b5c51e326edc22d60b005a38ddc29949afc6 Mon Sep 17 00:00:00 2001 From: Max Herzog <max.herzog@mailbox.tu-dresden.de> Date: Mon, 8 Jan 2024 12:37:28 +0000 Subject: [PATCH] Update README.md --- README.md | 52 ++++++++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 6edef16..c89499c 100644 --- a/README.md +++ b/README.md @@ -1,41 +1,45 @@ # TIE - transport of intensity equation calculator ## Description -This script calculates the transport of intensity equation +Transport of Intensity Equation (TIE) is an experiemental open source julia package that solves the so-called transport of intensity equation (i.e., continuity equation of the scalar paraxial wave equation) for the phase of a fast electron wave function pertaining to an electron beam in transmission electron microscope (with minor adaptions it also work with optical data,x-ray date, etc.). The solver is based on a finite difference scheme and incorporates an iterative determination of the unkown boundary conditions. Poisson-like approximations to the TIE are also solved for comparison. Input data are two or three slighly defocused images provided as numpy arrays and a json file containing some metadata. ## Installation -If you don't have julia installed on your Computer, download the language from https://julialang.org/downloads/. To install the package, you just start the julia REPL from the command line by typing "julia", type "]" to open the package manager and type "add https://gitlab.mn.tu-dresden.de/amem-group/tie". Alternatively, you download the repository from gitlab and replace the last command with "add <local file path ending with .../tie/>". TIE is now a local package of your julia environment. +The package can be installed into the local julia environment by calling +```bash +add https://gitlab.mn.tu-dresden.de/amem-group/tie" +``` +in the built in package manager "Pkg", available from the julia REPL by typing "]". ## Usage -To use the TIE package, a .json file is needed in which the file names of the out of focus images (in the same folder) are referenced and some metadata is given. You can find an example .json file and the corresponding out of focus images in the examples folder of the repository. The metadata include: -- Uacc: Acceleration voltage [V] -- dz: defocus [m] -- px and py: physical dimensions of the image in x- and y-direction [m] -- thick: thickness of the sample [m] -- reg: reciprocal wave vector regularization parameter [DIMENSION?] -- maxiter: maximum number of iterations of the optimization process -- bandlim: number of non-zero fourier coefficients of the boundary function that are considered -- save: whether or not the files are saved [boolean] -- poi: whether or not the poisson solution is also supposed to be calculated [boolean] - - You can then run the evaluation of the images by importing the script via "using TIE" and calling the function TIE.calculate_TIE(path::String, filename::String). The script saves the results into the folder with the .json file. +An illustrative test example containing a (de)focused images of a Landau pattern can be carried out via +```bash +calculate_TIE("path_to_input_files_folder","Py_on_C.json") +``` +that is in the test folder together with the numpy arrays of the (de)focused image intensities. The image intensity files and the json files should reside in the same path_to_input_files_folder. Output containing reconstructed phase and boundary function is also written into that folder. +In the json file, the following metadata has to be supplied: + +- Uacc: acceleration voltage of the electrons [V] +- dz: defocus magnitude between in-focus and over-focused images [m] +- px: pixel size in x-direction [m] +- py: pixel size in y-direction [m] +- Io: over-focused image intensity numpy array file name +- Iu: under-focused images intensity numpy array file name +- If: focused images intensity numpy array file name +- thick: sample thickness [m] +- maxiter: maximal number of iterations of global optimizer +- bandlim: number of refined Fourier componenents of boundary function +- save: saving data yes / no +- poi: computing poisson reference solutions yes / no ## Support -Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc. +Questions about the library and its use can be asked to a.lubk@ifw-dresden.de. ## Roadmap -A python implementation of this script is in progress, but has some complications at the moment. - -## Contributing -State if you are open to contributions and what your requirements are for accepting them. - -For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self. - -You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser. +A python implementation of this script is in progress. ## Authors and acknowledgment Show your appreciation to those who have contributed to the project. ## License -For open source projects, say how it is licensed. +TIE is licensed under an MIT licence. When publishing results obtained with the help of the package please cite -- GitLab