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.7+.
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
File details
Details for the file trex_imager_readfile-1.0.8.tar.gz
.
File metadata
- Download URL: trex_imager_readfile-1.0.8.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.9.15 Linux/5.19.0-32-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba45817ff3582b8fa8f62c23ff0b2c522b5aecddceaae6779b42bdcfe6bbfa0b |
|
MD5 | 73dae323557b0bda1cb5a12b590c42d2 |
|
BLAKE2b-256 | 10e4e0a9b388f2380049c7d5ab9a6c19f4d926f94643289ec6c786d63b12942d |
File details
Details for the file trex_imager_readfile-1.0.8-py3-none-any.whl
.
File metadata
- Download URL: trex_imager_readfile-1.0.8-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.9.15 Linux/5.19.0-32-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77a49361dbae7a91faa565cc99c092b3044c8707e18f1ae284654fa2359392eb |
|
MD5 | 2d3e96407f284bd58754072d34ee5fd1 |
|
BLAKE2b-256 | c2cab92fbd1c15ebfdeec16cc063980361c6d674377a29c7ce74cf92793be0ee |