PyXspec  1.0.4
Public Member Functions | Public Attributes
Chain Class Reference

List of all members.

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

Detailed Description

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

Constructor & Destructor Documentation

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.


Member Function Documentation

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.

Member Data Documentation

The number of steps that will be thrown away prior to storing the chain [int].

Chain output file name.

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.
 

The documentation for this class was generated from the following file: