|
PyXspec
1.0.1
|
Public Member Functions | |
| def | __init__ |
| def | run |
| def | show |
Public Attributes | |
| burn | |
| The number of steps that will be thrown away prior to storing the chain [int]. | |
| runLength | |
| The length of chain to be added during the next run [int]. | |
| proposal | |
| The proposal distribution and source of covariance information to be used for the next run [string]. | |
| rand | |
| Determines whether chain start point will be randomized (True) or taken from the current parameters (False). | |
| temperature | |
| The temperature parameter used in the Metropolis-Hastings algorithm for the proposal acceptance or rejection [float]. | |
| fileName | |
| Chain output file name. | |
| fileType | |
| Output format of the chain file [string]. | |
| totalLength | |
| The cumulative length of the chain [int]. | |
Monte Carlo Markov Chain class.
Public instance attributes:
GET-only attributes:
fileName -- Chain output file name.
fileType -- Output format of the chain file [string].
Will be either "fits" (the default), or "ascii".
totalLength -- The cumulative length of the chain [int].
This will increase every time a run is performed.
The following attribute settings will apply to the NEXT run for this
chain. The burn and rand settings are irrelevant if run is performing
an appending operation.
runLength -- The length of chain to be added during the next run [int].
proposal -- The proposal distribution and source of covariance
information to be used for the next run [string].
Examples: "gaussian fit", "cauchy fit",
"gaussian chain", etc.
See the "chain" command in the standard XSPEC manual
for more information.
temperature -- The temperature parameter used in the Metropolis-Hastings
algorithm for the proposal acceptance or rejection
[float].
burn -- The number of steps that will be thrown away prior to
storing the chain [int].
rand -- Determines whether chain start point will be randomized
(True) or taken from the current parameters (False).
| def __init__ | ( | self, | |
| fileName, | |||
fileType = None, |
|||
burn = None, |
|||
runLength = None, |
|||
proposal = None, |
|||
rand = None, |
|||
temperature = None |
|||
| ) |
Construct a chain object, perform a run, and load into AllChains
container.
The only required argument is fileName. All other arguments will
take their default values from the current settings in the AllChains
container.
| def run | ( | self, | |
append = True |
|||
| ) |
Perform a new chain run, either appending to or overwriting an
existing chain.
append -- If this is set to True the new run will be appended.
If False, the new run will overwrite. Note that the burn
and rand settings do not apply when appending.
| def show | ( | self | ) |
Display current settings of Chain object's attributes.
The number of steps that will be thrown away prior to storing the chain [int].
Output format of the chain file [string].
Will be either "fits" (the default), or "ascii".
The proposal distribution and source of covariance information to be used for the next run [string].
Examples: "gaussian fit", "cauchy fit",
"gaussian chain", etc.
See the "chain" command in the standard XSPEC manual
for more information.
Determines whether chain start point will be randomized (True) or taken from the current parameters (False).
The length of chain to be added during the next run [int].
The temperature parameter used in the Metropolis-Hastings algorithm for the proposal acceptance or rejection [float].
The cumulative length of the chain [int].
This will increase every time a run is performed.
1.7.5.1