About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2006

URL: http://cxc.harvard.edu/ciao3.4/getx.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 getx Context: sherpa

Synopsis

Assigns x-axis values taken from a plot to model parameters.

Syntax

sherpa> GETX [<arg>] <modelname>.{<paramname> | <#>} \
[<modelname>.{<paramname> | <#>} ...]

where <modelname> is the name that has been given to a model component
by the user.

Description

Notice that either <paramname> or <#> may be used to specify the parameter to which the value will be assigned. When the value to be assigned is the non-negative value of the difference between two x-axis values, <arg> is 2.

To take an x-axis value from a plot, and assign it to a model parameter:

  • Plot the data (see the LPLOT command).
  • Issue the command GETX <modelname>.{<paramname> | <#>}.
  • Place the cursor on the plot, at the desired x-axis value for the parameter, and click once with the left mouse button. Alternatively, hit the character e, at the desired x-axis value for the parameter.

To take two x-axis values from a plot, and assign the non-negative value of their difference to a model parameter:

  • Plot the data (see the LPLOT command).
  • Issue the command GETX 2 <modelname>.{<paramname> | <#>}.
  • Place the cursor on the plot, at the first desired x-axis value, and click once with the left mouse button. Place the cursor at the next desired x-axis value, and left-mouse-click again. Note that the character e may be used as an alternative to clicking the left mouse button.

See the CREATE command for further information and examples of alternative methods for setting model parameter values individually.

One may quit GETX by typing q. The previously assigned parameter value will be restored. Note, however, that if multiple parameter values are being set, only the one being altered when q is typed will have its value restored.

Example 1

Set a model parameter value to an x-axis value taken from a plot:


sherpa> DATA example.dat
sherpa> PARAMPROMPT OFF
Model parameter prompting is off
sherpa> GAUSS[modelb]
sherpa> LPLOT DATA
sherpa> GETX modelb.pos
<left-mouse-click once at the desired x-axis value>
sherpa> SHOW modelb

The command GAUSS[modelb] assigns the name modelb to the Sherpa model component GAUSS. Next, the 1-D data are plotted. The command GETX modelb.pos readies the cursor for selecting the desired x-axis value from the plot, for parameter pos of modelb. The user should then left-mouse-click (or hit the character e) at the desired x-axis location. The command SHOW modelb will show the current parameter values and their ranges, for component modelb.

Example 2

Set a model parameter value to the non-negative difference between two x-axis values taken from a plot:


sherpa> GETX 2 modelb.fwhm
<left-mouse-click once at the desired first x-axis value>
<and then left-mouse-click again at the desired second x-axis value>
sherpa> SHOW modelb

Here, the command GETX 2 modelb.fwhm readies the cursor for selecting the two desired x-axis values from the plot. The non-negative difference between these two values will be assigned to parameter fwhm of modelb. The command SHOW modelb will show the current parameter values and their ranges, for modelb.

Bugs

See the Sherpa bug pages online for an up-to-date listing of known bugs.

Hardcopy (PDF): A4 | Letter
Last modified: December 2006



The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory.
60 Garden Street, Cambridge, MA 02138 USA.    Email: cxcweb@head.cfa.harvard.edu
Smithsonian Institution, Copyright © 1998-2004. All rights reserved.