Giter VIP home page Giter VIP logo

pyinterferometry's Introduction

pyInterferometry - Python Bragg Interferometry Code

Python code for performing Bragg Interferometry, a data analysis technique for 4D-STEM of moiré materials as described in Refs [1,2]. Implemented for and used in Ref [2]. Some further considerations and a more detailed description of the method are at [3].

Citation

Please see the following manuscripts for a description of the method.

1: Nathanael P. Kazmierczak* & Madeline Van Winkle*, et al. Nature Materials 20.7 (2021): 956-963.

2: Madeline Van Winkle* & Isaac M. Craig*, et al. Nat Commun 14, 2989 (2023). (In particular, the SI of this work described many details of this codebase)

3: Isaac M. Craig, et al. J. Appl. Phys. 136, 074301 (2024). (Has some additional considerations and numerical details)

The code can also provide more qualitative color-coded virtual dark fields as seen in Nature Nanotechnology (2024): 1-7 and Nature Materials 23.3 (2024): 323-330. Although precise virtual aperture definition for materials with multiple moiré patterns is not yet automated.

Contact

Please contact me with any questions, issues, or requests. Isaac M. Craig - craigi[at]berkeley[dot]edu

Quick Usage

format your 4d-stem data (gatan dm4 and/or py4dstem formatted h5 accepted) in accordance with the example input directory. Then place a Diffraction_SI.dm4 or dp.h5 in each folder. You can then run the code from the driver script "main.py" which will guide you through the analysis workflow, asking for user input when needed. All processed data and images will be saved in the corresponding data/Material_Name/dsN directories (where N is the dataset number).

Examples

An example of a processed dataset is given in data/MoS2_P/ds3. A raw Diffraction_SI.dm4 and processed diskset.pkl files used in Ref [2] are available on https://zenodo.org/record/7865970

Common Issues

If you see a runtime error saying main thred is not in the main loop, its from matplotlib's backend not being thread safe. Please adjust the backend in the import statements. I had included matplotlib.use('Qt5Agg') when running in serial and showing plots with user input and matplotlib.use('Agg') when running in parallel and saving plots. Can be architecture specfic.

pyinterferometry's People

Contributors

isaaccraig avatar bediakolab avatar

Stargazers

 avatar Zhou Xu avatar Colin Ophus avatar  avatar Philipp Pelz 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.