nanomax-analysis-utils


A set of Python tools and widgets for handling and visualizing scanning imaging data at the NanoMAX (MAX IV) beamline.

Website https://github.com/maxiv-science/nanomax-analysis-utils
Licenses MIT License
Categories Data analysis Utilities XRF Imaging
Software Requirements Python, silx
Hardware Requirements -
Platforms There are no platforms associated to this software.
Languages Python
Input Formats HDF5
Output Formats GIF PNG
How-to

Installation

Follow general installation instructions with conda or pip on github.com/maxiv-science/nanomax-analysis-utils.

Using ScanViewer

scanViewer

You can also specify the file/folder directly on the command line.

scanViewer (path or file)

Using the library directly

Directly using the library allows easy loading of beamline data for direct manipulation in python. The following is a commented example.

from nmutils.core import nanomaxScan_stepscan_april2017
import matplotlib.pyplot as plt
import numpy as np

# Create an instance of the appropriate Scan subclass.
myScan = nanomaxScan_stepscan_april2017()

# Add a set of data to the scan. The specific Scan subclass takes
# options for how to do this, for example which motors and which
# detector to read. A scan can have several data sets, for example from
# different detectors or counters.
myScan.addData(filename='path-to-sardana-file.h5', scannr=4)

# We can now directly act on the scan's data and positions and do any
# operations or slicing that we like.
print myScan.listData()           # list the added data sets
print myScan.data['data0'].shape  # this is the raw array for data set 'data0'
print myScan.positions.shape      # this is the array of positions for the whole scan

# The Scan base class contains various useful methods for visualizing
# and slicing the data. For example, here's how to make a regularly
# spaced map from the arbitrary positions. First we specify what to map
# out, perhaps some ROI on the detector. Here we'll use the total
# detector average.
average = np.mean(myScan.data['data0'], axis=(1,2))
x, y, z = myScan.interpolatedMap(values=average, oversampling=1)
plt.imshow(z)
plt.show()

# There are other convenience methods as well, see the source code.
Documentation / Tutorials
There are no tutorials or documentation for this software.
References
No references have been added for this software.
Instruments This software is not associated to any instruments.
No screenshots have been uploaded for this software.
There are no institutes associated to this software
No example datasets have been uploaded for this software.