Skip to content
This repository was archived by the owner on Feb 6, 2022. It is now read-only.

ad3ller/e11_analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

e11 analysis

Note. This project is no longer being developed and has been archived.

Python 3 tools for analyzing experimental data stored in hdf5 files.

Install

Requirements:
h5py, scipy, numpy, pandas, pyarrow, tqdm, pytest
Optional:
xarray

Install all dependencies then install e11_analysis using setuptools,

git clone https://github.com/ad3ller/e11_analysis
cd ./e11_analysis
python setup.py install

And run tests,

pytest

The package can now be imported into python as e11.

Quick Start

>>> from e11 import H5Scan
>>> # data file
>>> fil = ".\\example_data\\microwave_scan.h5"
>>> scan = H5Scan(fil)
>>> # list datasets
>>> print(scan.datasets())
['analysis', 'osc_0']
>>> # array data
>>> arr = scan.array('osc_0')
>>> print(arr.shape)
(140, 1000)
>>> # DataFrame data
>>> df = scan.df('analysis')
>>> print(df[['var', 'w0', 'f']].head())
                 var          w0         f
measurement
0            32.0500  777.950119 -0.006381
1            32.0505  777.950119 -0.006506
2            32.0510  777.950120 -0.006417
3            32.0515  777.950119 -0.006428
4            32.0520  777.950119 -0.006499

See example notebooks.

About

python analysis for hdf5 files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published