|AHELP for CIAO 4.6 Sherpa v2||
The .sherpa.rc file provides user-configuration options for Sherpa
When Sherpa is started, it processes the $HOME/.sherpa.rc resource file. The resource file defines default behavior for the Sherpa commands and can be customized to the user's preferences.
The .sherpa.rc file may be edited in any text editor to change the settings.
Since Sherpa uses ChIPS, any preferences set in the .chips.rc resource file will be available during plotting as well. There is an option to override the .chips.rc settings in .sherpa.rc; refer to the "[chips]" section, below.
The default .sherpa.rc file contains the following entries:
[options] # Plotting packages available- pylab, chips plot_pkg : chips # IO packages available- pyfits, crates io_pkg : crates [statistics] # If true, use truncation value in Cash, C-stat truncate : True # Truncation value for Cash, C-stat (ignored if # truncate option is False) trunc_value: 1.0e-25 [verbosity] # Sherpa Chatter level # a non-zero value will # display full error traceback level : 0 # NumPy arrays have a threshold size print option, such that when an # array greater than that size is converted to a string, for printing, # only the first few and last few elements are shown. If the array is # smaller than the threshold size, all the elements are printed out. # (This setting makes no change to the actual array, but merely # governs how the array is represented when a copy of the array is # converted to a string.) # # The default threshold size is 1000. Here, the threshold size is # changed to a much larger value as Sherpa often deals with large # arrays. arraylength: 1000000 [chips] # If the plotting package is chips, set Sherpa-specific # preferences here. If plotting package is anything else, # this section is completely ignored. These preferences # go into effect the first time a Sherpa plot function # is called (*not* when Sherpa is started; chips is not # imported until the first plot is made). window.height : 6 window.width : 8 window.units : inches [parallel] numcores : None
The plot_pkg defines whether chips (the default) or pylab is used for Sherpa plotting. ChIPS is the CIAO plotting program and is distributed with the CIAO software. PyLab is part of matplotlib and needs to be installed by the user.
The io_pkg defines whether crates (the default) or pyfits will be used to handle reading and writing of files. CRATES is a software package developed by the CXC and distributed in CIAO; see "ahelp crates" for details. PyFITS is developed by STSci and needs to be installed by the user.
The Cash and C-stat statistic functions evaluate the logarithm of each data point. If the number of counts is zero or negative, it's not possible to take the log of that number.
If truncate is set to True (the default), then log(<trunc_value>) is substituted into the equation, and the statistics calculation proceeds. The default trunc_value is 1.0e-25.
If truncate is set to False, C-stat or Cash returns an error and stops the calculation when the number of counts in a bin is zero or negative. The trunc_value setting is not used.
If the level is set to a number greater than zero (the default), debugging information is printed when a command fails.
When a NumPy array is converted to a string for printing to the screen, only the first few and last few elements are shown. The arraylength value determines only how the array is displayed; it does not affect the the actual array. The default value is 1000000, as Sherpa often deals with large arrays.
This section of the file contains ChIPS preferences to override the settings in the .chips.rc file; see "ahelp chipsrc" for details. Note that these preferences and the .chips.rc file are read when a plot function is called and ChIPS is launched, not at the beginning of the Sherpa session.
The [chips] section can be left blank, in which case none of the values defined in .chips.rc are overridden.
If a plotting package (plot_pkg option) other than ChIPS is used, this section of the file is ignored.
The 'numcores' switch in the [parallel] section is available for setting the number of cores on the user's system which should be used in the execution of the Sherpa parallelized commands, such as the computationally intensive conf() and proj() functions. The default value for 'numcores' is None, which indicates that all available cores will be used for concurrent functions.
See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.