Read functions for THEMIS ASI PGM raw files
Project description
THEMIS All-Sky Imager Raw PGM Data Readfile
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.
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.6+.
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
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for themis-imager-readfile-1.0.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d47a323cb058e6e3083da5b14c7d7c5a9ca9a3f6cbe9ffe1b806f8593229bc2 |
|
MD5 | 93da1f84e288d62c61084ca24b32117a |
|
BLAKE2b-256 | 5ad14d3e7caa6cc9bcd054c046771d2d35541c944c0167f45237392d636bf4d9 |
Close
Hashes for themis_imager_readfile-1.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7ffdcb30ad448839f7e9a7a8d63c0e7290baf4ca5500de0459cfc37483f510f |
|
MD5 | bd97f41cd420500fe0f3f1630a95759d |
|
BLAKE2b-256 | a30a71e0a2c092444482ecb77c37c1c723ea4c613528c79bd96ee59a3c8d6f0a |