GWCS: Slicing
See original GitHub issueHow can one slice a GWCS?
See, e.g., https://github.com/astropy/astropy/issues/4669
Specifically, how do you create a new GWCS for a cutout image? This is needed for visualization (cc @pllim, referencing the above post).
Does nddata already do this? I hope this is a documentation issue, not a feature request.
Example use case:
hdu = fits.open('filename.fits')[('SCI', 1)]
ww = WCS(hdu.header)
slcs = slice(50, 100), slice(100, 150)
data = hdu.data[slcs]
ax = pl.subplot(projection=ww[slcs])
ax.imshow(data)
How can I do that with GWCS?
Issue Analytics
- State:
- Created a year ago
- Comments:19 (17 by maintainers)
Top Results From Across the Web
An IFU Example - managing a discontiguous WCS
In general each slice has a unique WCS transform. There are two ways to represent this kind of transforms in GWCS depending on...
Read more >Issues · spacetelescope/gwcs - GitHub
Issues list ; Multi-Issues with to_fits_sip : Detection of achieved accuracy, docs, fixing c0_0 · #425 opened 8 days ago ; GWCS slicing....
Read more >Food Menu - Green Woods Charter School
Apple Slices Milk, 8. Lunch: Cheese Lasagna w/ Marinara Steamed Broccoli Fruit Dinner Roll Milk, 9. Lunch: French Bread Pizza Garden Salad Fresh...
Read more >Shared Python Interface for World Coordinate Systems - Astropy
... such as the gwcs package being developed for the James Webb Space Telescope ... This slicing infrastructure is able to deal with...
Read more >Loading and Working with Level One Data
Slicing ND Objects ... The wcs property is a gwcs.wcs. ... as the ASDF file they will be opened automatically when their slice...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Stuart’s brain is probably serializable to TOML or something. 😝
I think we’ve worked out everything except serializing the
SlicedLowLevelWCS
, which should be its own issuse.Aside: I thought at first
unpick
was shorthand forunpickle
and that your brain now just works in numpy-object space full time.