Skip to main content

Read functions for THEMIS ASI PGM raw files

Project description

THEMIS All-Sky Imager Raw PGM Data Readfile

Github Actions - Tests PyPI version MIT license PyPI Python versions

Python library for reading THEMIS All-Sky Imager (ASI) stream0 raw PGM-file data. The data can be found at https://data.phys.ucalgary.ca or http://themis.igpp.ucla.edu/index.shtml.

Supported Datasets

  • THEMIS ASI raw: stream0 PGM files

Installation

The themis-imager-readfile library is available on PyPI:

$ python3 -m pip install themis-imager-readfile

Supported Python Versions

themis-imager-readfile officially supports Python 3.8+.

Examples

Example Python notebooks can be found in the "examples" directory. Further, some examples can be found in the "Usage" section below.

Usage

Import the library using import themis_imager_readfile

Warning: On Windows, be sure to put any read calls into a main() method. This is because we utilize the multiprocessing library and the method of forking processes in Windows requires it. Note that if you're using Jupyter or other IPython-based interfaces, this is not required.

Read a single file

>>> import themis_imager_readfile
>>> filename = "path/to/data/2020/01/01/atha_themis02/ut06/20200101_0600_atha_themis02_full.pgm.gz"
>>> img, meta, problematic_files = themis_imager_readfile.read(filename)

Read multiple files

>>> import themis_imager_readfile, glob
>>> file_list = glob.glob("path/to/files/2020/01/01/atha_themis02/ut06/*full.pgm*")
>>> img, meta, problematic_files = themis_imager_readfile.read(file_list)

Read using multiple worker processes

>>> import themis_imager_readfile, glob
>>> file_list = glob.glob("path/to/files/2020/01/01/atha_themis02/ut06/*full.pgm*")
>>> img, meta, problematic_files = themis_imager_readfile.read(file_list, workers=4)

Development

Clone the repository and install dependencies using Poetry.

$ git clone https://github.com/ucalgary-aurora/themis-imager-readfile.git
$ cd themis-imager-readfile/python
$ make install

Testing

$ make test
[ or do each test separately ]
$ make test-flake8
$ make test-pylint
$ make test-pytest

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

themis_imager_readfile-1.2.2.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

themis_imager_readfile-1.2.2-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file themis_imager_readfile-1.2.2.tar.gz.

File metadata

  • Download URL: themis_imager_readfile-1.2.2.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.9.16 Linux/5.14.0-284.11.1.el9_2.x86_64

File hashes

Hashes for themis_imager_readfile-1.2.2.tar.gz
Algorithm Hash digest
SHA256 92ea23022dca3948ee4427c76bfaefdaf7adeb1b2e56c51ed0ccda331232e477
MD5 3b89839be5495a4a9e947cf940f34c57
BLAKE2b-256 8e5d96ada2f21535a998784be6ba76ebe5d2aa6f164a2b9002b388821d6b6dbd

See more details on using hashes here.

File details

Details for the file themis_imager_readfile-1.2.2-py3-none-any.whl.

File metadata

  • Download URL: themis_imager_readfile-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.9.16 Linux/5.14.0-284.11.1.el9_2.x86_64

File hashes

Hashes for themis_imager_readfile-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c60ad030b32843a81b2b8201054d4cd5e84f4ca3fdfa7b65a7c4164f6dfb8ac7
MD5 ce04291a850272bf82788792b43cad36
BLAKE2b-256 a6ed6820aff89718c8d53ede37c104f0bd9ad0505ea09b5e45ff52f5df36bfe5

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