Skip to main content

Module for loading, interpolating and plotting data taken at the SGM Beamline at the Canadian Light Source.

Project description

Helper module for working with data from the SGM Beamline


Using pip:

pip install sgm-data

or from source:

git clone ./sgmdata
cd sgmdata
python install


First import the package, and select data to load in.

import sgmdata 
data = sgmdata.SGMData(["file1.hdf5", "file2.hdf5", "..."])

This will identify the independent axis, signals and other data within the files listed. The file load list also works with hsds domains.

data = sgmdata.SGMData(["", "..."])

Useful functions:

data.scans  #contains a dictionary of the identified data arrays loaded from your file list
data.interpolate(start=270, stop=2000, resolution=0.5) #bin the data in scans dictionary and interpolates missing points
data.average(scans=[("file1.hdf5", "entry1"), ("file2.hdf5", "entry3")]) #TODO:  average interpolated data in scans dictionary. 

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for sgm-data, version 0.1b0
Filename, size File type Python version Upload date Hashes
Filename, size sgm_data-0.1b0-py3-none-any.whl (6.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size sgm-data-0.1b0.tar.gz (6.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page