Last modified: December 2020

URL: https://cxc.cfa.harvard.edu/sherpa/ahelp/set_coord.html
AHELP for CIAO 4.13 Sherpa v1

set_coord

Context: data

Synopsis

Set the coordinate system to use for image analysis.

Syntax

set_coord(id, coord=None)

id - int or str
coord - { 'logical', 'image', 'physical', 'world', 'wcs' }

Description

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.


Examples

Example 1

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

>>> set_coord('wcs')

Example 2

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 [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.

References


Bugs

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

See Also

confidence
set_conf_opt, set_covar_opt, set_proj_opt
data
get_coord, set_areascal, set_arf, set_backscal, set_bkg, set_counts, set_data, set_dep, set_exposure, set_grouping, set_quality, set_rmf, set_staterror, set_syserror
filtering
set_filter
methods
set_iter_method, set_iter_method_opt, set_method, set_method_opt
modeling
get_par, get_xsabund, get_xscosmo, get_xsxsect, get_xsxset, set_bkg_model, set_bkg_source, set_full_model, set_model, set_par, set_pileup_model, set_source, set_xsabund, set_xscosmo, set_xsxsect, set_xsxset
statistics
set_prior, set_sampler, set_sampler_opt, set_stat
utilities
set_analysis, set_default_id
visualization
image_setregion