gstlal-inspiral  1.9.2
 All Classes Namespaces Files Functions
Public Member Functions | List of all members
stats.horizonhistory.HorizonHistories Class Reference
Inheritance diagram for stats.horizonhistory.HorizonHistories:
[legend]
Collaboration diagram for stats.horizonhistory.HorizonHistories:
[legend]

Public Member Functions

def copy
 
def __iadd__
 
def minkey
 
def maxkey
 
def getdict
 
def randhorizons
 
def all
 
def functional_integral_dict
 
def functional_integral
 
def weighted_mean_dict
 
def compress
 
def from_xml
 
def to_xml
 

Detailed Description

Definition at line 428 of file horizonhistory.py.

Member Function Documentation

def stats.horizonhistory.HorizonHistories.all (   self)
Returns a list of the unique sets of horizon distances
recorded in the histories.

Definition at line 481 of file horizonhistory.py.

def stats.horizonhistory.HorizonHistories.compress (   self,
  threshold = 0.03,
  remove_deviations = False,
  deviation_percent = 0.50,
  verbose = False 
)
Remove distances that are non-zero and differ
fractionally from both neighbours by less than
the selected threshold.

Also allows removal of uncharacteristic horizon
distance values.

Definition at line 582 of file horizonhistory.py.

def stats.horizonhistory.HorizonHistories.copy (   self)
Override of dict's .copy() that (a) returns the correct
type and (b) makes copies of the HorizonHistories'
contents.

Definition at line 429 of file horizonhistory.py.

def stats.horizonhistory.HorizonHistories.functional_integral (   self,
  lohi,
  w = lambda f: max(f.values()) 
)
Given the function f(x) = self.getdict(x), compute

\int_{lo}^{hi} w(f(x)) dx

The arguments are the lo and hi bounds and the functional
w(f).  The default functional is w(f) = max(f.values()).

Example:

>>> x = HorizonHistories({
... "H1": NearestLeafTree([(100., 0.), (150., 2.), (200., 0.)]),
... "L1": NearestLeafTree([(100., 0.), (150., 20.), (200., 0.)]),
... })
>>> x.functional_integral((130., 170.))
800.0
>>> x.functional_integral((100., 150.))
500.0
>>> x.functional_integral((300., 500.))
0.0
>>> x["H1"].functional_integral((100., 150.), w = lambda f: f**3)
200.0

Definition at line 508 of file horizonhistory.py.

def stats.horizonhistory.HorizonHistories.functional_integral_dict (   self,
  args,
  kwargs 
)
Return a dictionary of the result of invoking
.functional_integral() on each of the histories.  args and
kwargs are passed to the .functional_integral() method of
the histories objects, see their documentation for more
information.

Definition at line 498 of file horizonhistory.py.

def stats.horizonhistory.HorizonHistories.maxkey (   self)
Return the maximum key stored in the trees.

Definition at line 454 of file horizonhistory.py.

def stats.horizonhistory.HorizonHistories.minkey (   self)
Return the minimum key stored in the trees.

Definition at line 445 of file horizonhistory.py.

def stats.horizonhistory.HorizonHistories.randhorizons (   self)
Generator yielding a sequence of random horizon distance
dictionaries chosen by drawing random times uniformly
distributed between the lowest and highest times recorded
in the history and returning the dictionary of horizon
distances for each of those times.

Definition at line 466 of file horizonhistory.py.

def stats.horizonhistory.HorizonHistories.weighted_mean_dict (   self,
  args,
  kwargs 
)
Return a dictionary of the result of invoking
.weighted_mean() on each of the histories.  args and kwargs
are passed to the .weighted_mean() method of the histories
objects, see their documentation for more information.

Definition at line 573 of file horizonhistory.py.


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