Skip to main content

build downsampled previews of space telescope products

Project description

Space Telescope Product Downsampling

Powered by STScI Badge Powered by Astropy Badge build test codecov

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
stpreview by /grp/roman/TEST_DATA/23Q4_B11/aligntest/r0000501001001001001_01101_0001_WFI01_cal.asdf docs/images/by.png 10 10 --compass

by

downsample a sample Roman image to within 300x300 pixels
stpreview to /grp/roman/TEST_DATA/23Q4_B11/aligntest/r0000501001001001001_01101_0001_WFI01_cal.asdf docs/images/to.png 300 300 roman

to

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stpreview-0.5.1.tar.gz (219.8 kB view details)

Uploaded Source

Built Distribution

stpreview-0.5.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file stpreview-0.5.1.tar.gz.

File metadata

  • Download URL: stpreview-0.5.1.tar.gz
  • Upload date:
  • Size: 219.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for stpreview-0.5.1.tar.gz
Algorithm Hash digest
SHA256 bf30bf419015600e8b380988aae5fdb99a19dad3a626767a949dbe1250a2343a
MD5 e8a4099177220e2b9275877c347bdf4a
BLAKE2b-256 ef8b568a9a64ddbc5d4cae65edebf63d0ee6e0c08e6af244feb463aaaf7628bf

See more details on using hashes here.

File details

Details for the file stpreview-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: stpreview-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for stpreview-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0633cb03197fd82ac76bbe893d99990a710f024dcd43a0ed7fb984c8eede4263
MD5 0c090e070f20b8834354c6ea0086420f
BLAKE2b-256 4b6d07a3b7dc78a0a8a638f2f2bdd34f9828d47e5b20e6c769701077114fb378

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page