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.
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
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.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28e4e945a2c39d2d69f799db61e63eefbe363da35fc3b9a95c0f82a97353a1eb |
|
MD5 | 5c0a88fd8cf8397540794e063c6f07c3 |
|
BLAKE2b-256 | d02eb3918d3dc35b99f402f49e5931034c9b98e4642d673fd51f82058e68a73c |
Close
Hashes for themis_imager_readfile-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc203dbbc4c3fd2b927641bf5be6d4dc5b005d77f8bc8006f8b01ae1007bb9bf |
|
MD5 | d65e7cc497d603bc616dfd8b47506349 |
|
BLAKE2b-256 | 89990b29be9854da4bd76a22382d87eb51a45b801d374ff2b894eb2ab5c61ce9 |