Please note: WCSAxes has now beenmerged into Astropy! WCSAxes is a package that makes it easy to plot images with world coordinate system (WCS) information (which translates pixel to 'world' coordinates and back) usingMatplotlib. Originally intended for use with Astronomical data, WCSAxes can...
fitting_pixel_axes = np.arange(data.ndim)[::-1][np.array(fitting_axes)] world_idx = [ np.argwhere(world.axis_correlation_matrix[:, fpa])[:, 0][0] Member astrofrog Sep 26, 2024 Looks like you are assuming there is a single match because of the [:, 0]? Sign up for free...
print(' Found {:d} objects.'.format(len(self.xypos[0])))ifself.wcsisnotNone: ra, dec = self.wcs.all_pix2world(self.xypos[0], self.xypos[1], self.origin) self.radec = [ra, dec] + copy.deepcopy(self.xypos[2:])else:# If we have no WCS, simply pass along the XY input...
The world_to_pixel, world_to_array_index*, pixel_to_world* and array_index_to_world* methods now all consistently return scalars, arrays, or objects not wrapped in a one-element tuple/list when only one scalar, array, or object (as was previously already the case for WCS.pixel_to_worl...
If I understand correctly, the number ofworlddimensions in the WCS model would correspond to the number of dataset coordinate variables in the Xarray model? And the number ofpixeldimensions corresponds to the number of dimensions of each of those Xarray coordinate variables?
I don't think this is really true: it is just the projection from "Intermediate World Coordinates" to "World Coordinates" (see Fig. 2 in FITS paper) that is performed without distortions. However, SIP intervenes in a different stage: "Pixel Coordinates" to "Intermediate Pixel Coordin...
"string", ["sin( /pixel /s)", "mag(mag)", "dB(dB(mW))", "dex()"] ) def test_unit_grammar_fail(string): string.__repr__() Copy link Member eerovaher Mar 19, 2024 Choose a reason for hiding this comment The reason will be displayed to describe this comment to ot...
I wondered whether we should emit a warning but we don't for NaNs in world_to_pixel so maybe not. Let's keep it like this for now. View details astrofrog merged commit af67a37 into astropy:main Oct 25, 2024 34 of 35 checks passed neutrinoceros deleted the wcs/bug/17227/world_...
Added two functions pixel_to_skycoord and skycoord_to_pixel that make it easy to convert between SkyCoord objects and pixel coordinates. [#2885] all_world2pix now uses a much more sophisticated and complete algorithm to iteratively compute the inverse WCS transform. [#2816] Add ability to use...
astropy.wcs Other Changes and Additions Pytest <3.1 versions are no longer supported. [#6419] The bundled CFITSIO was updated to version 3.41 [#6477] 2.0.2 (unreleased) Bug Fixes astropy.config astropy.constants astropy.convolution astropy.coordinates Ensure transformations via ICRS also work fo...