Giter VIP home page Giter VIP logo

pymatchseries's Introduction

Actions Status PyPI Coverage Status Code style: black DOI

Description

This is a tool for non-rigid registration, primarily for atomic resolution STEM images, and is a python wrapper of the match-series code developed by B. Berkels. When using this tool, please cite the papers mentioned in that repository and the Zenodo reference at the top of this repo.

The goal of match-series is to remove slow and fast scan noise in STEM image stacks by comparing the various images against each other. The output of the code are X and Y deformation fields for each image in the stack. These deformations can then be applied to stacks of images or to EDX/EELS spectum maps that were acquired frame by frame. The goal of pymatchseries is to facilitate the set-up of the calculation and to work with the results in python. It is intended to use this tool mainly semi-interactively in a Jupyter notebook, see the example.

Try it out here: Binder

To install, simply pip install:

$ pip install --user pyMatchSeries

Note that, since it directly tries to call the matchSeries binary in a subprocess, you must compile and/or install match-series on your own. The program is available via conda install:

$ conda install -c conda-forge match-series

Usage

The tool is intended to work well with hyperspy and relies on it to some extent. The simplified workflow would be:

import hyperspy.api as hs
from pymatchseries import MatchSeries

data = hs.load("path/to/data/file")             # load the image stack
calculation = MatchSeries(data)                 # initialize the calculation
calculation.configuration["lambda"] = 20        # edit configuration
calculation.run()                               # start the calculation
defdata = calculation.get_deformed_images()     # get the "corrected" image stack

Supported data inputs are numpy arrays, dask arrays and hyperspy Signal2D objects, both lazy and non-lazy loaded. The deformations can also be loaded in as a Hyperspy dataset (ComplexSignal2D), and can also be applied to other image datasets and even spectral map time series. For more details check out the example.

Changelog

v0.1.0

  • Significantly simplified the API and made code more future proof
  • Trying out CI/CD pipelines

pymatchseries's People

Contributors

din14970 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pymatchseries's Issues

Consult some problems

Thanks for your help. I am just a beginner. So I have some problems want to consult you. Thanks for your answer yesterday. I can run the pyMatchSeries in my computer. However, the final output is a file with hSpy format. I do not know how to open the file and what I can get from it.

Next I want to run the examples code in the https://github.com/berkels/match-series. However, I meet a new problem as illustrated in the following figure.
image

To be honest, I want to find a software or code to deal with STEM data. For example, In ferroelectric materials, I want to get the atmoic displacement map, as shown in the following figure.
image
DOI: 10.1103/PhysRevLett.125.047601

Finally, thanks your great job again. And if I have expressed wrong, please forgive me.

How to install pyMatchSeries on Mac?

Hi, thanks very much for this package.
Recently, I wanted to install pyMatchSeries on my Macbook via Anaconda, but always failed.
When I run "conda install -c conda-forge match-series" after "pip install --user pyMatchSeries", it always told me as follows:
image

Is there any way to solve this problem?
My machine is MacBook Air with Apple M1 and the macOS Sonoma of 14.2.1

A Error when running "calculation"

Hi,
I met a problem when running the "calculation", please see below:
image

The operating system of my computer is 'Windows 10 Pro Education (64-bit)' and regional format is 'English (United States)'.
I do not know what would cause this problem above.
Any reply will be appreciated very much.

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.