跳转到主要内容

构建空间望远镜产品的下采样预览

项目描述

空间望远镜产品下采样

Powered by STScI Badge Powered by Astropy Badge build test codecov

pip install stpreview

用法

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.

示例

以10倍因子下采样示例Roman图像,并添加指南针
stpreview by /grp/roman/TEST_DATA/23Q4_B11/aligntest/r0000501001001001001_01101_0001_WFI01_cal.asdf docs/images/by.png 10 10 --compass

by

将示例Roman图像下采样到300x300像素以内
stpreview to /grp/roman/TEST_DATA/23Q4_B11/aligntest/r0000501001001001001_01101_0001_WFI01_cal.asdf docs/images/to.png 300 300 roman

to

支持者