Package pylal :: Module ligolw_cwb_to_coinc :: Class CWBTextConverter
[hide private]
[frames] | no frames]

Class CWBTextConverter

source code

object --+
         |
        CWBTextConverter

Class to transparently emit data as if the input were a ROOT file. The input is an unstructured text file made by cWB at runtime.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__getattr__(self, name)
This overrides the attribute getter for this class so that when the proxy class is required to produce information based on an attribute (say 'rho') it responds just like a TBranch would.
source code
 
GetEntry(self, i)
Emulate a TTree GetEntry() call by switching internal pointer to a row in the table.
source code
 
GetEntries(self)
Emulate a TTree GetEntries() call by returning the length of the internal data table.
source code
 
Add(self, filen)
Add a file which will be parsed by the class and added to the internal table.
source code
 
get_far_segments(self)
Gets the segments for which various FARs have been defined.
source code
 
get_far_information(self, segment=None)
Returns the false alarm rate for a given segment, usually one of the segments retrieved from 'get_far_segments'.
source code
 
get_skymap_coords(self)
Get a list of the skymap coordinates (R.A.
source code
 
get_skymap_prob(self, ra, dec)
Return the probability for a given R.A.
source code
 
parse_with_type(self, val)
Attempt to coerce data to the proper type.
source code
 
parse_transcript(self, text)
Parses a textual event transcript and adds the data to the internal table.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  CWB_SEARCH_TYPES = {'r': "unmodelled", 'i': "elliptical", 's':...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__getattr__(self, name)
(Qualification operator)

source code 

This overrides the attribute getter for this class so that when the proxy class is required to produce information based on an attribute (say 'rho') it responds just like a TBranch would. If no event is 'selected' via GetEntry, then None is returned, regardless of the attribute, because there's no way to know whether we're asking for a TBranch leaf or something else.

get_far_information(self, segment=None)

source code 

Returns the false alarm rate for a given segment, usually one of the segments retrieved from 'get_far_segments'. If segment is None (default), then the FAR from the biggest segment is returned.

get_skymap_coords(self)

source code 

Get a list of the skymap coordinates (R.A. and dec) which cWB has probability values for.

get_skymap_prob(self, ra, dec)

source code 

Return the probability for a given R.A. and dec from the skymap data. If there is no entry for this, then 0 is returned. This is the implied value for no R.A. and dec entry in the skymap data.

parse_with_type(self, val)

source code 

Attempt to coerce data to the proper type. Note that this depends on python's finickiness with int / float parsing. It won't do string -> float -> int truncation with one call to float(). So, this check whether or not int() works, then tries float(). Then it gives up and gives the value (presumed a string) back.


Class Variable Details [hide private]

CWB_SEARCH_TYPES

Value:
{'r': "unmodelled", 'i': "elliptical", 's': "linear", 'g': "circular",\
 'R': "unmodelled", 'I': "elliptical", 'S': "linear", 'G': "circular"}