stpreview


Namestpreview JSON
Version 0.5.1 PyPI version JSON
download
home_page
Summarybuild downsampled previews of space telescope products
upload_time2023-11-03 19:23:15
maintainer
docs_urlNone
author
requires_python>=3.9
licenseCopyright (C) 2010 Association of Universities for Research in Astronomy (AURA) Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of AURA and its representatives may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY AURA ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AURA BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Space Telescope Product Downsampling

[![Powered by STScI Badge](https://img.shields.io/badge/powered%20by-STScI-blue.svg?colorA=707170&colorB=3e8ddd&style=flat)](http://www.stsci.edu)
[![Powered by Astropy Badge](http://img.shields.io/badge/powered%20by-AstroPy-orange.svg?style=flat)](http://www.astropy.org/)
[![build](https://github.com/spacetelescope/stpreview/actions/workflows/build.yml/badge.svg)](https://github.com/spacetelescope/stpreview/actions/workflows/build.yml)
[![test](https://github.com/spacetelescope/stpreview/actions/workflows/tests.yml/badge.svg)](https://github.com/spacetelescope/stpreview/actions/workflows/tests.yml)
[![codecov](https://codecov.io/gh/spacetelescope/stpreview/graph/badge.svg?token=tSEFJ5vwgH)](https://codecov.io/gh/spacetelescope/stpreview)

```
pip install stpreview
```

### Usage

#### `stpreview by`

```
❯ stpreview by --help
Usage: stpreview by [OPTIONS] INPUT OUTPUT FACTOR... [OBSERVATORY]

  downsample the given ASDF image by the given factor

Arguments:
  INPUT          path to ASDF file with 2D image data  [required]
  OUTPUT         path to output image file  [required]
  FACTOR...      block size by which to downsample image data  [required]
  [OBSERVATORY]  observatory, one of ['roman', 'jwst']

Options:
  --compass / --no-compass  whether to draw a north arrow on the image
                            [default: no-compass]
  --help                    Show this message and exit.
```

#### `stpreview to`

```
❯ stpreview to --help
Usage: stpreview to [OPTIONS] INPUT OUTPUT SHAPE... [OBSERVATORY]

  downsample the given ASDF image to the desired shape

  the output image may be smaller than the desired shape, if no even factor
  exists

Arguments:
  INPUT          path to ASDF file with 2D image data  [required]
  OUTPUT         path to output image file  [required]
  SHAPE...       desired pixel resolution of output image  [required]
  [OBSERVATORY]  observatory, one of ['roman', 'jwst']

Options:
  --compass / --no-compass  whether to draw a north arrow on the image
                            [default: no-compass]
  --help                    Show this message and exit.
```

### Examples

##### downsample a sample Roman image by a factor of 10, and add a compass rose

```shell
stpreview by /grp/roman/TEST_DATA/23Q4_B11/aligntest/r0000501001001001001_01101_0001_WFI01_cal.asdf docs/images/by.png 10 10 --compass
```

![by](./docs/images/by.png)

##### downsample a sample Roman image to within 300x300 pixels

```shell
stpreview to /grp/roman/TEST_DATA/23Q4_B11/aligntest/r0000501001001001001_01101_0001_WFI01_cal.asdf docs/images/to.png 300 300 roman
```

![to](./docs/images/to.png)

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "stpreview",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "",
    "author": "",
    "author_email": "Zach Burnett <zburnett@stsci.edu>",
    "download_url": "https://files.pythonhosted.org/packages/ef/8b/568a9a64ddbc5d4cae65edebf63d0ee6e0c08e6af244feb463aaaf7628bf/stpreview-0.5.1.tar.gz",
    "platform": null,
    "description": "# Space Telescope Product Downsampling\n\n[![Powered by STScI Badge](https://img.shields.io/badge/powered%20by-STScI-blue.svg?colorA=707170&colorB=3e8ddd&style=flat)](http://www.stsci.edu)\n[![Powered by Astropy Badge](http://img.shields.io/badge/powered%20by-AstroPy-orange.svg?style=flat)](http://www.astropy.org/)\n[![build](https://github.com/spacetelescope/stpreview/actions/workflows/build.yml/badge.svg)](https://github.com/spacetelescope/stpreview/actions/workflows/build.yml)\n[![test](https://github.com/spacetelescope/stpreview/actions/workflows/tests.yml/badge.svg)](https://github.com/spacetelescope/stpreview/actions/workflows/tests.yml)\n[![codecov](https://codecov.io/gh/spacetelescope/stpreview/graph/badge.svg?token=tSEFJ5vwgH)](https://codecov.io/gh/spacetelescope/stpreview)\n\n```\npip install stpreview\n```\n\n### Usage\n\n#### `stpreview by`\n\n```\n\u276f stpreview by --help\nUsage: stpreview by [OPTIONS] INPUT OUTPUT FACTOR... [OBSERVATORY]\n\n  downsample the given ASDF image by the given factor\n\nArguments:\n  INPUT          path to ASDF file with 2D image data  [required]\n  OUTPUT         path to output image file  [required]\n  FACTOR...      block size by which to downsample image data  [required]\n  [OBSERVATORY]  observatory, one of ['roman', 'jwst']\n\nOptions:\n  --compass / --no-compass  whether to draw a north arrow on the image\n                            [default: no-compass]\n  --help                    Show this message and exit.\n```\n\n#### `stpreview to`\n\n```\n\u276f stpreview to --help\nUsage: stpreview to [OPTIONS] INPUT OUTPUT SHAPE... [OBSERVATORY]\n\n  downsample the given ASDF image to the desired shape\n\n  the output image may be smaller than the desired shape, if no even factor\n  exists\n\nArguments:\n  INPUT          path to ASDF file with 2D image data  [required]\n  OUTPUT         path to output image file  [required]\n  SHAPE...       desired pixel resolution of output image  [required]\n  [OBSERVATORY]  observatory, one of ['roman', 'jwst']\n\nOptions:\n  --compass / --no-compass  whether to draw a north arrow on the image\n                            [default: no-compass]\n  --help                    Show this message and exit.\n```\n\n### Examples\n\n##### downsample a sample Roman image by a factor of 10, and add a compass rose\n\n```shell\nstpreview by /grp/roman/TEST_DATA/23Q4_B11/aligntest/r0000501001001001001_01101_0001_WFI01_cal.asdf docs/images/by.png 10 10 --compass\n```\n\n![by](./docs/images/by.png)\n\n##### downsample a sample Roman image to within 300x300 pixels\n\n```shell\nstpreview to /grp/roman/TEST_DATA/23Q4_B11/aligntest/r0000501001001001001_01101_0001_WFI01_cal.asdf docs/images/to.png 300 300 roman\n```\n\n![to](./docs/images/to.png)\n",
    "bugtrack_url": null,
    "license": "Copyright (C) 2010 Association of Universities for Research in Astronomy (AURA)  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  3. The name of AURA and its representatives may not be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY AURA ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AURA BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ",
    "summary": "build downsampled previews of space telescope products",
    "version": "0.5.1",
    "project_urls": {
        "repository": "https://github.com/spacetelescope/stpreview.git"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4b6d07a3b7dc78a0a8a638f2f2bdd34f9828d47e5b20e6c769701077114fb378",
                "md5": "0c090e070f20b8834354c6ea0086420f",
                "sha256": "0633cb03197fd82ac76bbe893d99990a710f024dcd43a0ed7fb984c8eede4263"
            },
            "downloads": -1,
            "filename": "stpreview-0.5.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0c090e070f20b8834354c6ea0086420f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 7728,
            "upload_time": "2023-11-03T19:23:13",
            "upload_time_iso_8601": "2023-11-03T19:23:13.188297Z",
            "url": "https://files.pythonhosted.org/packages/4b/6d/07a3b7dc78a0a8a638f2f2bdd34f9828d47e5b20e6c769701077114fb378/stpreview-0.5.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ef8b568a9a64ddbc5d4cae65edebf63d0ee6e0c08e6af244feb463aaaf7628bf",
                "md5": "e8a4099177220e2b9275877c347bdf4a",
                "sha256": "bf30bf419015600e8b380988aae5fdb99a19dad3a626767a949dbe1250a2343a"
            },
            "downloads": -1,
            "filename": "stpreview-0.5.1.tar.gz",
            "has_sig": false,
            "md5_digest": "e8a4099177220e2b9275877c347bdf4a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 219782,
            "upload_time": "2023-11-03T19:23:15",
            "upload_time_iso_8601": "2023-11-03T19:23:15.197895Z",
            "url": "https://files.pythonhosted.org/packages/ef/8b/568a9a64ddbc5d4cae65edebf63d0ee6e0c08e6af244feb463aaaf7628bf/stpreview-0.5.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-03 19:23:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "spacetelescope",
    "github_project": "stpreview",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "stpreview"
}
        
Elapsed time: 0.13631s