Read functions for NASCAM ASI raw files
Project description
NASCAM All-Sky Imager Raw PGM Data Readfile
Python library for reading NASCAM All-Sky Imager (ASI) stream0 raw PNG-file data. The data can be found at https://data.phys.ucalgary.ca.
Supported Datasets
- NASCAM ASI raw: stream0.png PNG files
Installation
The nascam-imager-readfile library is available on PyPI:
$ python3 -m pip install nascam-imager-readfile
Supported Python Versions
nascam-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 nascam_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 nascam_imager_readfile
>>> filename = "path/to/data/2010/01/01/atha_nascam-iccd04/ut06/20100101_0600_atha_nascam-iccd04.png.tar"
>>> img, meta, problematic_files = nascam_imager_readfile.read(filename)
Read multiple files
>>> import nascam_imager_readfile, glob
>>> file_list = glob.glob("path/to/files/2010/01/01/atha_nascam-iccd04/ut06/*.tar")
>>> img, meta, problematic_files = nascam_imager_readfile.read(file_list)
Read using multiple worker processes
>>> import nascam_imager_readfile, glob
>>> file_list = glob.glob("path/to/files/2010/01/01/atha_nascam-iccd04/ut06/*.tar")
>>> img, meta, problematic_files = nascam_imager_readfile.read(file_list, workers=4)
Development
Clone the repository and install dependencies using Poetry.
$ git clone https://github.com/ucalgary-aurora/nascam-imager-readfile.git
$ cd nascam-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 nascam_imager_readfile-1.3.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c453bce89b1708a7238be4943258e1b5af1540f99abeefda5affbcc0211fdee |
|
MD5 | fa3efa21e41c6cd5996b0def7d0744dd |
|
BLAKE2b-256 | 8d664cb80643b54f02476fd428ae6d011792016b19730aff1c487bd98d762be3 |
Hashes for nascam_imager_readfile-1.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1a08915d34570dc2ff91475d4f8ce047b653e2d95b05b1414ae635ea50df308 |
|
MD5 | e94f0b1f1f3e7af5988cf311f7a8c3ec |
|
BLAKE2b-256 | 94d6ba87e4ff318f29e22926cbd255f31bea7de5661028f17497c45e73f3c4d7 |