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.
Supported Datasets
- Blueline: stream0 PGM files
- Near-infrared: stream0 PGM files
- RGB: stream0 single-channel PGM files, stream0.colour 3-channel PNG files, stream0.burst 3-channel PNG files
- Spectrograph: stream0 PGM files
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.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6b3848790f84af8721de96eba6c40930b24afd34a2bd8af8a35e5030c5b51a6 |
|
MD5 | 2935e5bd9eb638e6a07728f110ee0748 |
|
BLAKE2b-256 | f476f52c5663366921a701ec2502f7ae9319ce5b946e999013be9b0e3b439d37 |
Close
Hashes for trex_imager_readfile-1.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85756c5d042990b195d7fc45e44474d13c9d7001c5d9ccad11dfabdb788a6959 |
|
MD5 | 5ce62a7b8b5a0c795ebab4a6a23789ae |
|
BLAKE2b-256 | 85802cbc6681887c5ae728f181194dccf8767ca0c235804d92d6e142346f8185 |