Skip to content

Simple Python library for computing structure function stuff.

License

Notifications You must be signed in to change notification settings

exalearn/image_structure

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

Python tools for structure function computation/analysis on 2d/3d images.

Example Scripts

To see an example, run the repository as a Python package. Assuming the package is located in /path/to/topdir/image_structure, first edit the input file located in image_structure/scripts/ to reflect the filepaths on your machine. Then, do the following:

cd /path/to/topdir

python3 -m image_structure.scripts.driver image_structure/scripts/inputs.dat

This example computes the following:

(1) Load the image image_structure/data/signal_gaussian_2d.npy

(2) Compute the 2d Fourier transform of the image

(3) Compute the radial average of the Fourier magnitude

(4) Fit a Gaussian about the peak magnitude

(5) Output the pair of numbers (mean, sigma) corresponding to the mean and standard deviation of the Gaussian fit

Caveats

(1) This software has not yet been tested on a 3d image (although it should work on one)

(2) The Gaussian fit computed by the Fourier structure function fits a Gaussian to the spectrum directly, using scipy.optimize (nonlinear curve fitting). This is slightly different than enforcing that the Gaussian be centered exactly at the peak magnitude value, which might be important if there are nontrivial subharmonics present.

About

Simple Python library for computing structure function stuff.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.3%
  • Makefile 0.7%