|
PyXspec
1.0.1
|
Public Member Functions | |
| def | __init__ |
| def | addModelString |
| def | delModelString |
| def | closeLog |
| def | openLog |
| def | show |
Public Attributes | |
| abund | |
| Get/Set the abundance table used in the plasma emission and photoelectric absorption models [string]. | |
| allowNewAttributes | |
| Get/Set the flag which allows the setting of new instance attributes for ALL PyXspec classes [bool]. | |
| chatter | |
| Get/Set the console chatter level [int]. | |
| logChatter | |
| Get/Set the log chatter level [int]. | |
| cosmo | |
| Get/Set the cosmology values. | |
| log | |
| Get only: Returns the currently opened log file object, or None if no log file is open (also see the openLog and closeLog methods). | |
| modelStrings | |
| XSPEC's internal database of <string_name>, <string_value> pairs for settings which may be accessed by model functions. | |
| seed | |
| Re-seed and re-initialize XSPEC's random-number generator with the supplied integer value (SET only). | |
| version | |
| The version strings for PyXspec and standard XSPEC. | |
| xsect | |
| Change the photoelectric absorption cross-sections in use [string]. | |
Storage class for Xspec settings.
This is a singleton - only 1 instance allowed
Public instance attributes (implemented as properties):
abund -- Get/Set the abundance table used in the plasma emission and
photoelectric absorption models [string].
Valid tables: angr, aspl, feld, aneb, grsa, wilm, lodd,
file <filename>
allowNewAttributes -- Get/Set the flag which allows the setting of new
instance attributes for ALL PyXspec classes [bool].
This is False by default, and is intended to catch the
user's attention if they misspell an attribute name
when attempting to set it. Under normal Python
behavior, a misspelling would simply create a new
attribute and issue no warnings or errors.
You must make sure this flag is set to True if you
genuinely wish to add new attributes.
chatter -- Get/Set the console chatter level [int].
logChatter -- Get/Set the log chatter level [int].
cosmo -- Get/Set the cosmology values.
Get: Returns a tuple of floats containing (H0, q0, l0), where
H0 is the Hubble constant in km/(s-Mpc),
q0 is the deceleration parameter, and
l0 is the cosmological constant.
Set: Enter a single string containing one or more of
H0, q0, l0. Examples:
Xset.cosmo = "100" # sets H0 to 100.0
Xset.cosmo = ",0" # sets q0 to 0.0
Xset.cosmo = ",,0.7" # sets l0 to 0.7
Xset.cosmo = "50 .5 0." # sets H0=50.0, q0=0.5, l0=0.0
log -- Get only: Returns the currently opened log file object,
or None if no log file is open (also see the openLog
and closeLog methods).
modelStrings -- XSPEC's internal database of <string_name>,
<string_value> pairs for settings which may be
accessed by model functions.
Get: Returns a tuple of tuples, the inner tuples
being composed of <string_name>,<string_value>
string pairs.
Set: Replaces ENTIRE database with user-supplied
new database. Input may be a dictionary of
<string_name>:<string_value> entries, or a tuple
of (<string_name>,<string_value>) tuples.
For inserting and deleting INDIVIDUAL string
name and value pairs, use the addModelString and
delModelString methods.
seed -- Re-seed and re-initialize XSPEC's random-number generator
with the supplied integer value (SET only).
version -- The version strings for PyXspec and standard XSPEC.
GET only, this returns a tuple containing:
[0] - The PyXspec version string
[1] - Standard XSPEC's version string
xsect -- Change the photoelectric absorption cross-sections in use
[string].
Available options: "bcmc", "obcm", "vern"
| def __init__ | ( | self | ) |
| def addModelString | ( | self, | |
| key, | |||
| value | |||
| ) |
Add a key,value pair of strings to XSPEC's internal database. This database provides a way to pass string values to certain model functions which are hardcoded to search for "key". (See the XSPEC manual description for the "xset" command for a table showing model/key usage.) If the key,value pair already exists, it will be replaced with the new entries.
| def closeLog | ( | self | ) |
Close Xspec's current log file.
| def delModelString | ( | self, | |
| key | |||
| ) |
Remove a key,value pair from XSPEC's internal string database.
| def openLog | ( | self, | |
| fileName | |||
| ) |
Open a file and set it to be Xspec's log file. fileName -- The name of the log file. If Xspec already has an open log file, it will close it. Returns a Python file object for the new log file. Once opened, the log file object is also stored as the Xset.log attribute.
| def show | ( | self | ) |
Get/Set the abundance table used in the plasma emission and photoelectric absorption models [string].
Valid tables: angr, aspl, feld, aneb, grsa, wilm, lodd,
file <filename>
Get/Set the flag which allows the setting of new instance attributes for ALL PyXspec classes [bool].
This is False by default, and is intended to catch the
user's attention if they misspell an attribute name
when attempting to set it. Under normal Python
behavior, a misspelling would simply create a new
attribute and issue no warnings or errors.
You must make sure this flag is set to True if you
genuinely wish to add new attributes.
Get/Set the console chatter level [int].
Get/Set the cosmology values.
Get: Returns a tuple of floats containing (H0, q0, l0), where
H0 is the Hubble constant in km/(s-Mpc),
q0 is the deceleration parameter, and
l0 is the cosmological constant.
Set: Enter a single string containing one or more of
H0, q0, l0. Examples:
Xset.cosmo = "100" # sets H0 to 100.0
Xset.cosmo = ",0" # sets q0 to 0.0
Xset.cosmo = ",,0.7" # sets l0 to 0.7
Xset.cosmo = "50 .5 0." # sets H0=50.0, q0=0.5, l0=0.0
Get only: Returns the currently opened log file object, or None if no log file is open (also see the openLog and closeLog methods).
Get/Set the log chatter level [int].
XSPEC's internal database of <string_name>, <string_value> pairs for settings which may be accessed by model functions.
Get: Returns a tuple of tuples, the inner tuples
being composed of <string_name>,<string_value>
string pairs.
Set: Replaces ENTIRE database with user-supplied
new database. Input may be a dictionary of
<string_name>:<string_value> entries, or a tuple
of (<string_name>,<string_value>) tuples.
For inserting and deleting INDIVIDUAL string
name and value pairs, use the addModelString and
delModelString methods.
Re-seed and re-initialize XSPEC's random-number generator with the supplied integer value (SET only).
The version strings for PyXspec and standard XSPEC.
GET only, this returns a tuple containing: [0] - The PyXspec version string [1] - Standard XSPEC's version string
Change the photoelectric absorption cross-sections in use [string].
Available options: "bcmc", "obcm", "vern"
1.7.5.1