Skip to main content

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?

  1. 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)
  1. Use Uview class method read_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.6.tar.gz (5.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py4uview-0.0.6-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file py4uview-0.0.6.tar.gz.

File metadata

  • Download URL: py4uview-0.0.6.tar.gz
  • Upload date:
  • Size: 5.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.0

File hashes

Hashes for py4uview-0.0.6.tar.gz
Algorithm Hash digest
SHA256 c7bdc1f695d45fccf16fd7693d53659ffa3e87b53ea8af308e99834bb728d444
MD5 f3cea12b37a4d10d31bff50773d108c0
BLAKE2b-256 4405fc7e4c2badb64760c2dc10764e988161b72273eda4838032a73e82821f95

See more details on using hashes here.

File details

Details for the file py4uview-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: py4uview-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.0

File hashes

Hashes for py4uview-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 604b9b4d77627fb2a9f1c93cce420a5971f275e5e50d74093830cd5e21ec3713
MD5 e49994be5489fa2288c5d2683bd59221
BLAKE2b-256 4bdc1b473be160b2a77ce86033f228a8b4aa022ac0306e98d7fa9b6155d71a84

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page