-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RCAL-629: static preview generation script #953
RCAL-629: static preview generation script #953
Conversation
Codecov ReportAttention:
... and 1 file with indirect coverage changes 📢 Thoughts on this report? Let us know!. |
f548444
to
af221d5
Compare
@nden when you get a chance, could you point me to JWST sample data as well? Thanks! |
❯ roman_static_preview preview --help
Usage: roman_static_preview preview [OPTIONS] INPUT [OUTPUT] [SHAPE]...
create a preview image with a north arrow overlay indicating orientation
Arguments:
INPUT path to ASDF file with 2D image data [required]
[OUTPUT] path to output image file
[SHAPE]... desired pixel resolution of output image [default: 1080, 1080]
Options:
--compass / --no-compass whether to draw a north arrow on the image
[default: compass]
--help Show this message and exit. ❯ roman_static_preview thumbnail --help
Usage: roman_static_preview thumbnail [OPTIONS] INPUT [OUTPUT] [SHAPE]...
Arguments:
INPUT path to ASDF file with 2D image data [required]
[OUTPUT] path to output image file
[SHAPE]... desired pixel resolution of output image [default: 300, 300]
Options:
--compass / --no-compass whether to draw a north arrow on the image
[default: no-compass]
--help Show this message and exit. |
5b7cc81
to
8faf72a
Compare
I assume that this is to be run on ImageModels only? Is there a check for that? |
Good point, is there a flag in |
We usually use something like
if isinstance(model, ImageModel):
…On 10/31/23 4:31 PM, Zach Burnett wrote:
I assume that this is to be run on ImageModels only? Is there a
check for that?
Good point, is there a flag in |roman.meta| that indicates whether
it's an image or not? If not I can write a check
—
Reply to this email directly, view it on GitHub
<https://urldefense.com/v3/__https://github.com/spacetelescope/romancal/pull/953*issuecomment-1787987643__;Iw!!CrWY41Z8OgsX0i-WU-0LuAcUu2o!wbGcXxDzKPWkTq0C06STq10HS_aApPkgVnmqi7Rj1iG6f1okBlDzAq96Te4XKs0d_L6gaKLWBHqr32ziv0O09zUI$>,
or unsubscribe
<https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ALXCXWJOVTOCGS6QPXGRDY3YCFN27AVCNFSM6AAAAAA6PRYFWOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBXHE4DONRUGM__;!!CrWY41Z8OgsX0i-WU-0LuAcUu2o!wbGcXxDzKPWkTq0C06STq10HS_aApPkgVnmqi7Rj1iG6f1okBlDzAq96Te4XKs0d_L6gaKLWBHqr32zivyvsGVA_$>.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
537b7ba
to
4210dcb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. I worry a little about the simple mean used by default in the downsampling, but I guess since we're "only" downsampling 10x10 or so for the thumbnails isolated cosmics blowing up a pixel or something aren't that big of a problem (and jump detection should have caught them).
Do we have preview requirements on L1 images?
Answering my own question here, no, only on L2. I'm a little surprised and it's not crazy to want to make these previews for L1 images (e.g., by using the last frame of the L1 image, or the difference between the last and first frames). But out of scope for this PR, which looks good to me. |
We need to generate also previews for L3 images but this is due in later builds. |
@schlafly @stscieisenhamer Is there a case when ramp_fitting will set a pixel value in the image to NaN? e.g. if the slope cannot be computed or some other condition? If that's a possibility the |
That's a good point. Jonathan's code didn't ever return NaNs, but William's update does, so we should use nanmean. The L3s also use NaNs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Resolves RCAL-629
add script for enabling static preview image generation from the command line, following what was discussed in the meetings:
1080p x 1080p
PNG<original>.png
300p x 300p
PNG<original>_thumb.png
afmhot
colormapInstallation
(adds
stpreview
andtyper
to the environment)Usage
Checklist
CHANGES.rst
under the corresponding subsectionupdated relevant testsran regression tests, post a link to the Jenkins job below. How to run regression tests on a PR