- sherpa.astro.ui.set_coord(id, coord=None)¶
Set the coordinate system to use for image analysis.
The default coordinate system - that is, the mapping between pixel position and coordinate value, for images (2D data sets) is ‘logical’. This function can change this setting, so that model parameters can be fit using other systems. This setting is also used by the
ignore2dseries of commands.
The function does not follow the normal Python standards for parameter use, since it is designed for easy interactive use. When called with a single un-named argument, it is taken to be the
coordparameter. If given two un-named arguments, then they are interpreted as the
Any limits or values already set for model parameters, such as those made by
guess, may need to be changed after changing the coordinate system.
The ‘logical’ system is one in which the center of the lower-left pixel has coordinates
(1, 1)and the center of the top-right pixel has coordinates
(nx, ny), for a
ny(rows) pixel image. The pixels have a side of length 1, so the first pixel covers the range
The ‘physical’ and ‘world’ coordinate systems rely on FITS World Coordinate System (WCS) standard 1. The ‘physical’ system refers to a linear transformation, with possible offset, of the ‘logical’ system. The ‘world’ system refers to the mapping to a celestial coordinate system.
Change the coordinate system of the default data set to the world system (‘wcs’ is a synonym for ‘world’).
Change the data set with the id of ‘m82’ to use the physical coordinate system.
>>> set_coord('m82', 'physical')