Data analysis package for MAXPEEM
Project description
Py4Uview: Tools for Uview images
Introduction
Py4Uview provides a set of tools for images saved by Uivew, which is used by SPEELEEM in MAXPEEM to save the user's data in format of .dat file. Py4Uview can read the image and metadata from the file saved by Uview software.
Quick start
Install
python -m pip install py4uview
import
>>> import py4uview
How to use?
- use
read_uv_dat()function to read the data and metadata.
In [1]: import py4uview as pu
In [2]: data = pu.read_uv_dat("./testfiles/LEEM.dat")
In [3]: data.metadata
Out[3]:
{'id': b'UKSOFT2001',
'size': 104,
'version': 8,
'bitsperpix': 16,
'width': 1024,
'height': 1024,
'noimg': 1,
'attachedRecipeSize': 0,
'isize': 288,
......
In [4]: data.data
Out[4]:
array([[3047, 2880, 2652, ..., 2716, 2630, 2562],
[2789, 2848, 2862, ..., 2549, 2485, 2655],
[2808, 2840, 2739, ..., 2640, 2602, 2747],
...,
[3054, 2675, 2656, ..., 1926, 2017, 2021],
[2885, 2949, 2705, ..., 1907, 1886, 1945],
[2810, 2688, 2807, ..., 2009, 2025, 2641]], dtype=uint16)
- Use
Uviewclass methodread_dat()to read the dat file
In [1]: import py4uview as pu
In [2]: data = pu.Uview.read_dat("./testfiles/LEEM.dat")
In [3]: data.attrs
Out[3]:
{'id': b'UKSOFT2001',
'size': 104,
'version': 8,
'bitsperpix': 16,
'width': 1024,
'height': 1024,
'noimg': 1,
'attachedRecipeSize': 0,
'isize': 288,
......
In [4]: data.data
Out[4]:
array([[3047, 2880, 2652, ..., 2716, 2630, 2562],
[2789, 2848, 2862, ..., 2549, 2485, 2655],
[2808, 2840, 2739, ..., 2640, 2602, 2747],
...,
[3054, 2675, 2656, ..., 1926, 2017, 2021],
[2885, 2949, 2705, ..., 1907, 1886, 1945],
[2810, 2688, 2807, ..., 2009, 2025, 2641]], dtype=uint16)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
py4uview-0.0.4.tar.gz
(11.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
py4uview-0.0.4-py3-none-any.whl
(11.0 kB
view details)
File details
Details for the file py4uview-0.0.4.tar.gz.
File metadata
- Download URL: py4uview-0.0.4.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3430fd53ef8ffea671299d4aa160cbf6bff53d341922d186476242c2936dc998
|
|
| MD5 |
8379a1f218d8ee1969180e24d04355ce
|
|
| BLAKE2b-256 |
511f56065a5a6c551b7a3903ba6bed6a4e957d42daec1840ff85241110e9cd04
|
File details
Details for the file py4uview-0.0.4-py3-none-any.whl.
File metadata
- Download URL: py4uview-0.0.4-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8c9d1d476b528e7799b132c6cd66d002bc0bb948c7f2beb71e32e5854097202
|
|
| MD5 |
86df57e5248d43d66faac0c042e1ac8a
|
|
| BLAKE2b-256 |
4047b3fc8a28fdd4675e8bbeb6a50b2fbd98996ffa00d0baca74ab77db58764a
|