Space Telescope Product Downsampling
pip install stpreview
Usage
❯ uv run stpreview --help
usage: stpreview [-h] [--observatory {roman,jwst}] [--compass]
INPUT OUTPUT {to,by} ...
positional arguments:
INPUT path to ASDF file with 2D image data
OUTPUT path to output image file
{to,by}
to downsample the given ASDF image by the given integer
factor
by downsample the given ASDF image to the desired shape (the
output image may be smaller than the desired shape, if no
even factor exists)
options:
-h, --help show this help message and exit
--observatory {roman,jwst}
(if omitted, will attempt to infer from file)
--compass draw a north arrow on the image
stpreview by
❯ uv run stpreview input.asdf output.png by --help
usage: stpreview INPUT OUTPUT by [-h] FACTOR [FACTOR ...]
positional arguments:
FACTOR block size by which to downsample image data
options:
-h, --help show this help message and exit
stpreview to
❯ uv run stpreview input.asdf output.png to --help
usage: stpreview INPUT OUTPUT to [-h] SHAPE [SHAPE ...]
positional arguments:
SHAPE desired pixel resolution of output image
options:
-h, --help show this help message and exit
Examples
downsample a sample Roman image by a factor of 10, and add a compass rose
stpreview /grp/roman/TEST_DATA/23Q4_B11/aligntest/r0000501001001001001_01101_0001_WFI01_cal.asdf docs/images/by.png --compass by 10 10
downsample a sample Roman image to within 300x300 pixels
stpreview /grp/roman/TEST_DATA/23Q4_B11/aligntest/r0000501001001001001_01101_0001_WFI01_cal.asdf docs/images/to.png to 300 300
Metadata
Release files for stpreview 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| stpreview-0.6.0.tar.gz | 218.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| stpreview-0.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 226.2 kB
Release files / stpreview-0.6.0.tar.gz
| Download URL | stpreview-0.6.0.tar.gz |
|---|---|
| Size | 218.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
38698555c3b5cf0712de76deb56635a842dd26e3bfc51086d382e6f33cbefffc
|
|
BLAKE2b-256 checksum How to use checksums |
0dcdff74e54df88a7a7bb92ccad5849003b43bca38fe15044319ee86aebadc56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / stpreview-0.6.0-py3-none-any.whl
| Download URL | stpreview-0.6.0-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fa262af6a9810af4a3e1139227db8bec190a2e7be8567861d3c228e83dee16a3
|
|
BLAKE2b-256 checksum How to use checksums |
9cf25b1c58369a41da226607f1538260d5a0b04716926efd9583234b33939d7c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|