Read functions for TREx ASI PGM raw files
Project description
TREx All-Sky Imager Raw PGM Data Readfile
Python library for reading Transition Region Explorer (TREx) All-Sky Imager (ASI) stream0 raw PGM-file data. The data can be found at https://data.phys.ucalgary.ca.
Installation
The trex-imager-readfile library is available on PyPI:
$ python3 -m pip install trex-imager-readfile
Supported Python Versions
trex-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 trex_imager_readfile
Read a single file
>>> import trex_imager_readfile
>>> filename = "path/to/rgb_data/2020/01/01/fsmi_rgb-01/ut06/20200101_0600_fsmi_rgb-01_full.pgm.gz"
>>> img, meta, problematic_files = trex_imager_readfile.read_rgb(filename)
Read multiple files
>>> import trex_imager_readfile, glob
>>> file_list = glob.glob("path/to/files/2020/01/01/fsmi_rgb-01/ut06/*full.pgm*")
>>> img, meta, problematic_files = trex_imager_readfile.read_rgb(file_list)
Read using multiple worker processes
>>> import trex_imager_readfile, glob
>>> file_list = glob.glob("path/to/files/2020/01/01/fsmi_rgb-01/ut06/*full.pgm*")
>>> img, meta, problematic_files = trex_imager_readfile.read_rgb(file_list, workers=4)
Development
Clone the repository and install dependencies using Poetry.
$ git clone https://github.com/ucalgary-aurora/trex-imager-readfile.git
$ cd trex-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 trex-imager-readfile-1.0.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ce1e1ce9d333d37691c6287b3cc65ed22bd2e001bbca2db082291155e46b217 |
|
MD5 | bc81393d69c43b207e13506d41bfe003 |
|
BLAKE2b-256 | 91047a91dac3f94c611efce729cae2c6edb8abc568f13665c0fa980f3476b3ef |
Close
Hashes for trex_imager_readfile-1.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65379bd10a64e57b26c758c5421ed353f53b0f6db1700e9c84e23ff63eaff1a7 |
|
MD5 | 4bba061e7f5ec682da19323148923d0a |
|
BLAKE2b-256 | 25d75085704a4621c60c5fceb3ab5474969c78024fe92dc580fed50cd532d569 |