Read functions for REGO ASI PGM raw files
Project description
Redline All-Sky Imager Raw PGM Data Readfile (REGO)
Python library for reading REGO All-Sky Imager (ASI) stream0 raw PGM-file data. The data can be found at https://data.phys.ucalgary.ca.
Supported Datasets
- REGO raw: stream0 PGM files
Installation
The rego-imager-readfile library is available on PyPI:
$ python3 -m pip install rego-imager-readfile
Supported Python Versions
rego-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 rego_imager_readfile
Warning: On Windows, be sure to put any read
calls into a main()
method. This is because we utilize the multiprocessing library and the method of forking processes in Windows requires it. Note that if you're using Jupyter or other IPython-based interfaces, this is not required.
Read a single file
>>> import rego_imager_readfile
>>> filename = "path/to/data/2020/01/01/fsmi_rego-654/ut06/20200101_0600_fsmi_rego-654_6300.pgm.gz"
>>> img, meta, problematic_files = rego_imager_readfile.read(filename)
Read multiple files
>>> import rego_imager_readfile, glob
>>> file_list = glob.glob("path/to/files/2020/01/01/fsmi_rego-654/ut06/*6300.pgm*")
>>> img, meta, problematic_files = rego_imager_readfile.read(file_list)
Read using multiple worker processes
>>> import rego_imager_readfile, glob
>>> file_list = glob.glob("path/to/files/2020/01/01/fsmi_rego-654/ut06/*6300.pgm*")
>>> img, meta, problematic_files = rego_imager_readfile.read(file_list, workers=4)
Development
Clone the repository and install dependencies using Poetry.
$ git clone https://github.com/ucalgary-aurora/rego-imager-readfile.git
$ cd rego-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
Hashes for rego_imager_readfile-1.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d7e8a310199c3359b1dbfe611f8902f690b66ec010f2c8105a4346b9b05623f |
|
MD5 | 89fea3d5e520e039a8bf8803349aa263 |
|
BLAKE2b-256 | 608627469e279b363a274aa26e3e746ba39aa7b1bf6654415d7e9e4f10ccad7e |
Hashes for rego_imager_readfile-1.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8596ca321985d211d8a8e3073d2aae1823d544c027ad2908707092d7652c2d23 |
|
MD5 | 979de6c86879eda5ffcb66b0c6ec7000 |
|
BLAKE2b-256 | 9f84750f757bac1ea3707f8a28a161e7aba81d0fbdf78300815cfe25839eb5e6 |