Skip to main content

Rainbow All-Sky Imager Raw PGM Data Readfile (GO-Canada AGO/CGSM Rainbow)

Github Actions - Tests PyPI version MIT license PyPI Python versions

Python library for reading Rainbow All-Sky Imager (GO-Canada AGO/CGSM Rainbow) stream0 raw PGM-file data. The data can be found at https://data.phys.ucalgary.ca.

Installation

The rainbow-imager-readfile library is available on PyPI:

$ python3 -m pip install rainbow-imager-readfile

Supported Python Versions

rainbow-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 rainbow_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 rainbow_imager_readfile
>>> filename = "path/to/data/2015/01/01/fsmi_rainbow-11/ut06/20150101_0600_fsmi_rainbow-11_full.pgm.gz"
>>> img, meta, problematic_files = rainbow_imager_readfile.read(filename)

Read multiple files

>>> import rainbow_imager_readfile, glob
>>> file_list = glob.glob("path/to/files/2015/01/01/fsmi_rainbow-11/ut06/*full.pgm*")
>>> img, meta, problematic_files = rainbow_imager_readfile.read(file_list)

Read using multiple worker processes

>>> import rainbow_imager_readfile, glob
>>> file_list = glob.glob("path/to/files/2015/01/01/fsmi_rainbow-11/ut06/*full.pgm*")
>>> img, meta, problematic_files = rainbow_imager_readfile.read(file_list, workers=4)

Read with no output

>>> import rainbow_imager_readfile, glob
>>> file_list = glob.glob("path/to/files/2015/01/01/fsmi_rainbow-11/ut06/*full.pgm*")
>>> img, meta, problematic_files = rainbow_imager_readfile.read(file_list, workers=4, quiet=True)

Read only the first frame of each file

>>> import rainbow_imager_readfile, glob
>>> file_list = glob.glob("path/to/files/2015/01/01/fsmi_rainbow-11/ut06/*full.pgm*")
>>> img, meta, problematic_files = rainbow_imager_readfile.read(file_list, first_frame=True)

Exclude reading the metadata

>>> import rainbow_imager_readfile, glob
>>> file_list = glob.glob("path/to/files/2015/01/01/fsmi_rainbow-11/ut06/*full.pgm*")
>>> img, meta, problematic_files = rainbow_imager_readfile.read(file_list, no_metadata=True)

Development

Clone the repository and install dependencies using Poetry.

$ git clone https://github.com/ucalgary-aurora/rainbow-imager-readfile.git
$ cd rainbow-imager-readfile/python
$ make install

Testing

$ make test
[ or do each test separately ]
$ make test-flake8
$ make test-pylint
$ make test-pytest

Release files for rainbow-imager-readfile 1.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rainbow-imager-readfile 1.3.1
File Size Uploaded
rainbow_imager_readfile-1.3.1.tar.gz 6.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rainbow-imager-readfile 1.3.1
File Interpreter ABI Platform
rainbow_imager_readfile-1.3.1-py3-none-any.whl Python 3 none any Details

Total release size:12.7 kB

Release files / rainbow_imager_readfile-1.3.1.tar.gz

Download URL rainbow_imager_readfile-1.3.1.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
36b22732e72a5a77fc780ca7a2f7a13e570ce9a4d6ac643c7c05fd1925448ea1
BLAKE2b-256 checksum
How to use checksums
ee475b264a6c174e91916edfde3f4b1bcf3a310e5ae3da238ef43a6d78a28781
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.7 Linux/6.2.0-39-generic

Release files / rainbow_imager_readfile-1.3.1-py3-none-any.whl

Download URL rainbow_imager_readfile-1.3.1-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
256b5e31ce1bf6f0cf199b38ed9cbe77ca79814287e4fcbdb79e7aaba8793fe1
BLAKE2b-256 checksum
How to use checksums
d28a5eec9f0ef0a4b1dcabe0ce675e74649b6b8922d997734fa43b31ad400a41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.7 Linux/6.2.0-39-generic

Release history Release notifications | RSS feed

This release

1.3.1 This release

2 release files

1.3.0

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page