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.0.tar.gz (219.8 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: stpreview-0.5.0.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.0.tar.gz
Algorithm Hash digest
SHA256 bab3c2ccd106e58f830317d382ee42d0a7a3509b12f781bd456d0813ecf9e7b1
MD5 493be3db7536de050ba781ce76bceb4a
BLAKE2b-256 67da9c45e678b4ea0c79013d8c08d7668e32bc9f07c5318b07a3af609fff9ec3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: stpreview-0.5.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3fb66e60408bc13904e7f4ca778edf50584872732f684ff21cdb2a9fed1dfbbe
MD5 b7da3664ef7294c4ad4f07363b30dcf0
BLAKE2b-256 1da23f224cca3461166a42a498981a795627ade9b350556bd10662ba7cb8e3a1

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