    Set the coordinate system to use for image analysis.

set_coord(id, coord=None)
id - int or str
coord - { 'logical', 'image', 'physical', 'world', 'wcs' }

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 `notice2d` and `ignore2d` series of commands.

Change the coordinate system of the default data set to the world system ('wcs' is a synonym for 'world').

>>> set_coord('wcs')

Change the data set with the id of 'm82' to use the physical coordinate system.

>>> set_coord('m82', 'physical')

PARAMETERS

The parameters for this function are:

Parameter
Definition
id
The data set to change. If not given then the default identifier is used, as returned by `get_default_id` .
coord
The coordinate system to use. The 'image' option is the same as 'logical', and 'wcs' the same as 'world'.

Notes

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 `coord` parameter. If given two un-named arguments, then they are interpreted as the `id` and `coord` parameters, respectively.

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 nx

(columns) by ny (rows) pixel image. The pixels have a side of length 1, so the first pixel covers the range x=0.5 to

x=1.5 and y=0.5 to y=1.5 .

The 'physical' and 'world' coordinate systems rely on FITS World Coordinate System (WCS) standard. 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.

Changes in CIAO

The filter created by `notice2d` and `ignore1d` is now cleared when the coordinate system is changed.

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.

December 2023