themis-imager-readfile


Namethemis-imager-readfile JSON
Version 1.4.1 PyPI version JSON
download
home_pagehttps://github.com/ucalgary-aurora/themis-imager-readfile
SummaryRead functions for THEMIS ASI PGM raw files
upload_time2024-02-05 17:30:16
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.
            # THEMIS All-Sky Imager Raw PGM Data Readfile

[![Github Actions - Tests](https://github.com/ucalgary-aurora/themis-imager-readfile/workflows/tests/badge.svg)](https://github.com/ucalgary-aurora/themis-imager-readfile/actions?query=workflow%3Atests)
[![PyPI version](https://img.shields.io/pypi/v/themis-imager-readfile.svg)](https://pypi.python.org/pypi/themis-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/themis-imager-readfile.svg)](https://pypi.python.org/pypi/themis-imager-readfile/)

Python library for reading THEMIS All-Sky Imager (ASI) stream0 raw PGM-file data. The data can be found at https://data.phys.ucalgary.ca or http://themis.igpp.ucla.edu/index.shtml.

## Supported Datasets

- THEMIS ASI raw: [stream0](https://data.phys.ucalgary.ca/sort_by_project/THEMIS/asi/stream0) PGM files

## Installation

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

```console
$ python3 -m pip install themis-imager-readfile
```

## Supported Python Versions

themis-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 themis_imager_readfile`

### Read a single file

```python
>>> import themis_imager_readfile
>>> filename = "path/to/data/2020/01/01/atha_themis02/ut06/20200101_0600_atha_themis02_full.pgm.gz"
>>> img, meta, problematic_files = themis_imager_readfile.read(filename)
```

### Read multiple files

```python
>>> import themis_imager_readfile, glob
>>> file_list = glob.glob("path/to/files/2020/01/01/atha_themis02/ut06/*full.pgm*")
>>> img, meta, problematic_files = themis_imager_readfile.read(file_list)
```

### Read using multiple worker processes

```python
>>> import themis_imager_readfile, glob
>>> file_list = glob.glob("path/to/files/2020/01/01/atha_themis02/ut06/*full.pgm*")
>>> img, meta, problematic_files = themis_imager_readfile.read(file_list, workers=4)
```

### Read with no output

```python
>>> import themis_imager_readfile, glob
>>> file_list = glob.glob("path/to/files/2020/01/01/atha_themis02/ut06/*full.pgm*")
>>> img, meta, problematic_files = themis_imager_readfile.read(file_list, workers=4, quiet=True)
```

### Read only the first frame of each file

```python
>>> import themis_imager_readfile, glob
>>> file_list = glob.glob("path/to/files/2020/01/01/atha_themis02/ut06/*full.pgm*")
>>> img, meta, problematic_files = themis_imager_readfile.read(file_list, first_frame=True)
```

### Exclude reading the metadata

```python
>>> import themis_imager_readfile, glob
>>> file_list = glob.glob("path/to/files/2020/01/01/atha_themis02/ut06/*full.pgm*")
>>> img, meta, problematic_files = themis_imager_readfile.read(file_list, no_metadata=True)
```

## Multiprocessing Notes

If you receive error messages about multiprocessing, be sure that your code is wrapped in a `main()` method. This usually resolves the issue. One example implementation is:

```python
import themis_imager_readfile

def main():
    filename = "path/to/data/2020/01/01/atha_themis02/ut06/20200101_0600_atha_themis02_full.pgm.gz"
    img, meta, problematic_files = themis_imager_readfile.read(filename)

if (__name__ == "__main__"):
    main()
```

## Development

Clone the repository and install dependencies using Poetry.

```console
$ git clone https://github.com/ucalgary-aurora/themis-imager-readfile.git
$ cd themis-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/themis-imager-readfile",
    "name": "themis-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/3d/32/d5eca14662068c92e6c93fd1d8159021584d6974a548b4f1deaf990fa9ce/themis_imager_readfile-1.4.1.tar.gz",
    "platform": null,
    "description": "# THEMIS All-Sky Imager Raw PGM Data Readfile\n\n[![Github Actions - Tests](https://github.com/ucalgary-aurora/themis-imager-readfile/workflows/tests/badge.svg)](https://github.com/ucalgary-aurora/themis-imager-readfile/actions?query=workflow%3Atests)\n[![PyPI version](https://img.shields.io/pypi/v/themis-imager-readfile.svg)](https://pypi.python.org/pypi/themis-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/themis-imager-readfile.svg)](https://pypi.python.org/pypi/themis-imager-readfile/)\n\nPython library for reading THEMIS All-Sky Imager (ASI) stream0 raw PGM-file data. The data can be found at https://data.phys.ucalgary.ca or http://themis.igpp.ucla.edu/index.shtml.\n\n## Supported Datasets\n\n- THEMIS ASI raw: [stream0](https://data.phys.ucalgary.ca/sort_by_project/THEMIS/asi/stream0) PGM files\n\n## Installation\n\nThe themis-imager-readfile library is available on PyPI:\n\n```console\n$ python3 -m pip install themis-imager-readfile\n```\n\n## Supported Python Versions\n\nthemis-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 themis_imager_readfile`\n\n### Read a single file\n\n```python\n>>> import themis_imager_readfile\n>>> filename = \"path/to/data/2020/01/01/atha_themis02/ut06/20200101_0600_atha_themis02_full.pgm.gz\"\n>>> img, meta, problematic_files = themis_imager_readfile.read(filename)\n```\n\n### Read multiple files\n\n```python\n>>> import themis_imager_readfile, glob\n>>> file_list = glob.glob(\"path/to/files/2020/01/01/atha_themis02/ut06/*full.pgm*\")\n>>> img, meta, problematic_files = themis_imager_readfile.read(file_list)\n```\n\n### Read using multiple worker processes\n\n```python\n>>> import themis_imager_readfile, glob\n>>> file_list = glob.glob(\"path/to/files/2020/01/01/atha_themis02/ut06/*full.pgm*\")\n>>> img, meta, problematic_files = themis_imager_readfile.read(file_list, workers=4)\n```\n\n### Read with no output\n\n```python\n>>> import themis_imager_readfile, glob\n>>> file_list = glob.glob(\"path/to/files/2020/01/01/atha_themis02/ut06/*full.pgm*\")\n>>> img, meta, problematic_files = themis_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 themis_imager_readfile, glob\n>>> file_list = glob.glob(\"path/to/files/2020/01/01/atha_themis02/ut06/*full.pgm*\")\n>>> img, meta, problematic_files = themis_imager_readfile.read(file_list, first_frame=True)\n```\n\n### Exclude reading the metadata\n\n```python\n>>> import themis_imager_readfile, glob\n>>> file_list = glob.glob(\"path/to/files/2020/01/01/atha_themis02/ut06/*full.pgm*\")\n>>> img, meta, problematic_files = themis_imager_readfile.read(file_list, no_metadata=True)\n```\n\n## Multiprocessing Notes\n\nIf you receive error messages about multiprocessing, be sure that your code is wrapped in a `main()` method. This usually resolves the issue. One example implementation is:\n\n```python\nimport themis_imager_readfile\n\ndef main():\n    filename = \"path/to/data/2020/01/01/atha_themis02/ut06/20200101_0600_atha_themis02_full.pgm.gz\"\n    img, meta, problematic_files = themis_imager_readfile.read(filename)\n\nif (__name__ == \"__main__\"):\n    main()\n```\n\n## Development\n\nClone the repository and install dependencies using Poetry.\n\n```console\n$ git clone https://github.com/ucalgary-aurora/themis-imager-readfile.git\n$ cd themis-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 THEMIS ASI PGM raw files",
    "version": "1.4.1",
    "project_urls": {
        "Homepage": "https://github.com/ucalgary-aurora/themis-imager-readfile",
        "Repository": "https://github.com/ucalgary-aurora/themis-imager-readfile"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7f13999f4c1f249891b94dd58cbbb7d210f4e858b062840b97d7759a264f907d",
                "md5": "bc87b4e5321f892eeaaf31a0c70ba087",
                "sha256": "02f49ef33727cdbc27c78b85e125337028994d05934243e2f15d4a7555ac7f16"
            },
            "downloads": -1,
            "filename": "themis_imager_readfile-1.4.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bc87b4e5321f892eeaaf31a0c70ba087",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.1,<4.0.0",
            "size": 6582,
            "upload_time": "2024-02-05T17:30:15",
            "upload_time_iso_8601": "2024-02-05T17:30:15.051836Z",
            "url": "https://files.pythonhosted.org/packages/7f/13/999f4c1f249891b94dd58cbbb7d210f4e858b062840b97d7759a264f907d/themis_imager_readfile-1.4.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3d32d5eca14662068c92e6c93fd1d8159021584d6974a548b4f1deaf990fa9ce",
                "md5": "7b77c3c81137c9167369446de2819791",
                "sha256": "5b10eb26b9c334d1781c511bf55695266f7f86d199f9345e900a1ce2ccd94545"
            },
            "downloads": -1,
            "filename": "themis_imager_readfile-1.4.1.tar.gz",
            "has_sig": false,
            "md5_digest": "7b77c3c81137c9167369446de2819791",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.1,<4.0.0",
            "size": 6157,
            "upload_time": "2024-02-05T17:30:16",
            "upload_time_iso_8601": "2024-02-05T17:30:16.869738Z",
            "url": "https://files.pythonhosted.org/packages/3d/32/d5eca14662068c92e6c93fd1d8159021584d6974a548b4f1deaf990fa9ce/themis_imager_readfile-1.4.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-05 17:30:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ucalgary-aurora",
    "github_project": "themis-imager-readfile",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "themis-imager-readfile"
}
        
Elapsed time: 0.18874s