rainbow-imager-readfile


Namerainbow-imager-readfile JSON
Version 1.3.1 PyPI version JSON
download
home_pagehttps://github.com/ucalgary-aurora/rainbow-imager-readfile
SummaryRead functions for Rainbow ASI PNM raw files
upload_time2024-02-05 21:40:30
maintainer
docs_urlNone
authorDarren Chaddock
requires_python>=3.8.1,<4.0.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Rainbow All-Sky Imager Raw PGM Data Readfile (GO-Canada AGO/CGSM Rainbow)

[![Github Actions - Tests](https://github.com/ucalgary-aurora/rainbow-imager-readfile/workflows/tests/badge.svg)](https://github.com/ucalgary-aurora/rainbow-imager-readfile/actions?query=workflow%3Atests)
[![PyPI version](https://img.shields.io/pypi/v/rainbow-imager-readfile.svg)](https://pypi.python.org/pypi/rainbow-imager-readfile/)
[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/)
[![PyPI Python versions](https://img.shields.io/pypi/pyversions/rainbow-imager-readfile.svg)](https://pypi.python.org/pypi/rainbow-imager-readfile/)

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:

```console
$ 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

```python
>>> 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

```python
>>> 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

```python
>>> 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

```python
>>> 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

```python
>>> 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

```python
>>> 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.

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

## Testing

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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ucalgary-aurora/rainbow-imager-readfile",
    "name": "rainbow-imager-readfile",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8.1,<4.0.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Darren Chaddock",
    "author_email": "dchaddoc@ucalgary.ca",
    "download_url": "https://files.pythonhosted.org/packages/ee/47/5b264a6c174e91916edfde3f4b1bcf3a310e5ae3da238ef43a6d78a28781/rainbow_imager_readfile-1.3.1.tar.gz",
    "platform": null,
    "description": "# Rainbow All-Sky Imager Raw PGM Data Readfile (GO-Canada AGO/CGSM Rainbow)\n\n[![Github Actions - Tests](https://github.com/ucalgary-aurora/rainbow-imager-readfile/workflows/tests/badge.svg)](https://github.com/ucalgary-aurora/rainbow-imager-readfile/actions?query=workflow%3Atests)\n[![PyPI version](https://img.shields.io/pypi/v/rainbow-imager-readfile.svg)](https://pypi.python.org/pypi/rainbow-imager-readfile/)\n[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/)\n[![PyPI Python versions](https://img.shields.io/pypi/pyversions/rainbow-imager-readfile.svg)](https://pypi.python.org/pypi/rainbow-imager-readfile/)\n\nPython 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.\n\n## Installation\n\nThe rainbow-imager-readfile library is available on PyPI:\n\n```console\n$ python3 -m pip install rainbow-imager-readfile\n```\n\n## Supported Python Versions\n\nrainbow-imager-readfile officially supports Python 3.8+.\n\n## Examples\n\nExample Python notebooks can be found in the \"examples\" directory. Further, some examples can be found in the \"Usage\" section below.\n\n## Usage\n\nImport the library using `import rainbow_imager_readfile`\n\n**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.\n\n### Read a single file\n\n```python\n>>> import rainbow_imager_readfile\n>>> filename = \"path/to/data/2015/01/01/fsmi_rainbow-11/ut06/20150101_0600_fsmi_rainbow-11_full.pgm.gz\"\n>>> img, meta, problematic_files = rainbow_imager_readfile.read(filename)\n```\n\n### Read multiple files\n\n```python\n>>> import rainbow_imager_readfile, glob\n>>> file_list = glob.glob(\"path/to/files/2015/01/01/fsmi_rainbow-11/ut06/*full.pgm*\")\n>>> img, meta, problematic_files = rainbow_imager_readfile.read(file_list)\n```\n\n### Read using multiple worker processes\n\n```python\n>>> import rainbow_imager_readfile, glob\n>>> file_list = glob.glob(\"path/to/files/2015/01/01/fsmi_rainbow-11/ut06/*full.pgm*\")\n>>> img, meta, problematic_files = rainbow_imager_readfile.read(file_list, workers=4)\n```\n\n### Read with no output\n\n```python\n>>> import rainbow_imager_readfile, glob\n>>> file_list = glob.glob(\"path/to/files/2015/01/01/fsmi_rainbow-11/ut06/*full.pgm*\")\n>>> img, meta, problematic_files = rainbow_imager_readfile.read(file_list, workers=4, quiet=True)\n```\n\n### Read only the first frame of each file\n\n```python\n>>> import rainbow_imager_readfile, glob\n>>> file_list = glob.glob(\"path/to/files/2015/01/01/fsmi_rainbow-11/ut06/*full.pgm*\")\n>>> img, meta, problematic_files = rainbow_imager_readfile.read(file_list, first_frame=True)\n```\n\n### Exclude reading the metadata\n\n```python\n>>> import rainbow_imager_readfile, glob\n>>> file_list = glob.glob(\"path/to/files/2015/01/01/fsmi_rainbow-11/ut06/*full.pgm*\")\n>>> img, meta, problematic_files = rainbow_imager_readfile.read(file_list, no_metadata=True)\n```\n\n## Development\n\nClone the repository and install dependencies using Poetry.\n\n```console\n$ git clone https://github.com/ucalgary-aurora/rainbow-imager-readfile.git\n$ cd rainbow-imager-readfile/python\n$ make install\n```\n\n## Testing\n\n```console\n$ make test\n[ or do each test separately ]\n$ make test-flake8\n$ make test-pylint\n$ make test-pytest\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Read functions for Rainbow ASI PNM raw files",
    "version": "1.3.1",
    "project_urls": {
        "Homepage": "https://github.com/ucalgary-aurora/rainbow-imager-readfile",
        "Repository": "https://github.com/ucalgary-aurora/rainbow-imager-readfile"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d28a5eec9f0ef0a4b1dcabe0ce675e74649b6b8922d997734fa43b31ad400a41",
                "md5": "bc2daca37856415bb10ac02d537b4c42",
                "sha256": "256b5e31ce1bf6f0cf199b38ed9cbe77ca79814287e4fcbdb79e7aaba8793fe1"
            },
            "downloads": -1,
            "filename": "rainbow_imager_readfile-1.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bc2daca37856415bb10ac02d537b4c42",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.1,<4.0.0",
            "size": 6587,
            "upload_time": "2024-02-05T21:40:29",
            "upload_time_iso_8601": "2024-02-05T21:40:29.726403Z",
            "url": "https://files.pythonhosted.org/packages/d2/8a/5eec9f0ef0a4b1dcabe0ce675e74649b6b8922d997734fa43b31ad400a41/rainbow_imager_readfile-1.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ee475b264a6c174e91916edfde3f4b1bcf3a310e5ae3da238ef43a6d78a28781",
                "md5": "d29144557d7439e01b8b5f2494734ac0",
                "sha256": "36b22732e72a5a77fc780ca7a2f7a13e570ce9a4d6ac643c7c05fd1925448ea1"
            },
            "downloads": -1,
            "filename": "rainbow_imager_readfile-1.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "d29144557d7439e01b8b5f2494734ac0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.1,<4.0.0",
            "size": 6143,
            "upload_time": "2024-02-05T21:40:30",
            "upload_time_iso_8601": "2024-02-05T21:40:30.867247Z",
            "url": "https://files.pythonhosted.org/packages/ee/47/5b264a6c174e91916edfde3f4b1bcf3a310e5ae3da238ef43a6d78a28781/rainbow_imager_readfile-1.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-05 21:40:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ucalgary-aurora",
    "github_project": "rainbow-imager-readfile",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "rainbow-imager-readfile"
}
        
Elapsed time: 0.18567s