Loading [MathJax]/extensions/TeX/AMSsymbols.js
LAL 7.7.0.1-5e288d3
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
lal.pipeline.ScienceData Class Reference

Detailed Description

An object that can contain all the science data used in an analysis.

Can contain multiple ScienceSegments and has a method to generate these from a text file produces by the LIGOtools segwizard program.

Definition at line 2019 of file pipeline.py.

Inherits object.

Public Member Functions

def __init__ (self)
 
def __getitem__ (self, i)
 Allows direct access to or iteration over the ScienceSegments associated with the ScienceData. More...
 
def __repr__ (self)
 
def __len__ (self)
 Returns the number of ScienceSegments associated with the ScienceData. More...
 
def read (self, filename, min_length, slide_sec=0, buffer=0)
 Parse the science segments from the segwizard output contained in file. More...
 
def append_from_tuple (self, seg_tuple)
 
def tama_read (self, filename)
 Parse the science segments from a tama list of locked segments contained in file. More...
 
def make_chunks (self, length, overlap=0, play=0, sl=0, excl_play=0, pad_data=0)
 Divide each ScienceSegment contained in this object into AnalysisChunks. More...
 
def make_chunks_from_unused (self, length, trig_overlap, play=0, min_length=0, sl=0, excl_play=0, pad_data=0)
 Create an extra chunk that uses up the unused data in the science segment. More...
 
def make_short_chunks_from_unused (self, min_length, overlap=0, play=0, sl=0, excl_play=0)
 Create a chunk that uses up the unused data in the science segment. More...
 
def make_optimised_chunks (self, min_length, max_length, pad_data=0)
 Splits ScienceSegments up into chunks, of a given maximum length. More...
 
def intersection (self, other)
 Replaces the ScienceSegments contained in this instance of ScienceData with the intersection of those in the instance other. More...
 
def union (self, other)
 Replaces the ScienceSegments contained in this instance of ScienceData with the union of those in the instance other. More...
 
def coalesce (self)
 Coalesces any adjacent ScienceSegments. More...
 
def invert (self)
 Inverts the ScienceSegments in the class (i.e. More...
 
def play (self)
 Keep only times in ScienceSegments which are in the playground. More...
 
def intersect_3 (self, second, third)
 Intersection routine for three inputs. More...
 
def intersect_4 (self, second, third, fourth)
 Intersection routine for four inputs. More...
 
def split (self, dt)
 Split the segments in the list is subsegments at least as long as dt. More...
 

Constructor & Destructor Documentation

◆ __init__()

def lal.pipeline.ScienceData.__init__ (   self)

Definition at line 2020 of file pipeline.py.

Member Function Documentation

◆ __getitem__()

def lal.pipeline.ScienceData.__getitem__ (   self,
  i 
)

Allows direct access to or iteration over the ScienceSegments associated with the ScienceData.

Definition at line 2028 of file pipeline.py.

◆ __repr__()

def lal.pipeline.ScienceData.__repr__ (   self)

Definition at line 2031 of file pipeline.py.

◆ __len__()

def lal.pipeline.ScienceData.__len__ (   self)

Returns the number of ScienceSegments associated with the ScienceData.

Definition at line 2037 of file pipeline.py.

◆ read()

def lal.pipeline.ScienceData.read (   self,
  filename,
  min_length,
  slide_sec = 0,
  buffer = 0 
)

Parse the science segments from the segwizard output contained in file.

Parameters
filenameinput text file containing a list of science segments generated by segwizard.
min_lengthonly append science segments that are longer than min_length.
slide_secSlide each ScienceSegment by::

delta > 0: [s, e] -> [s+delta, e]. delta < 0: [s, e] -> [s, e-delta].

Parameters
buffershrink the ScienceSegment::

[s, e] -> [s+buffer, e-buffer]

Definition at line 2056 of file pipeline.py.

◆ append_from_tuple()

def lal.pipeline.ScienceData.append_from_tuple (   self,
  seg_tuple 
)

Definition at line 2079 of file pipeline.py.

◆ tama_read()

def lal.pipeline.ScienceData.tama_read (   self,
  filename 
)

Parse the science segments from a tama list of locked segments contained in file.

Parameters
filenameinput text file containing a list of tama segments.

Definition at line 2088 of file pipeline.py.

◆ make_chunks()

def lal.pipeline.ScienceData.make_chunks (   self,
  length,
  overlap = 0,
  play = 0,
  sl = 0,
  excl_play = 0,
  pad_data = 0 
)

Divide each ScienceSegment contained in this object into AnalysisChunks.

Parameters
lengthlength of chunk in seconds.
overlapoverlap between segments.
playif true, only generate chunks that overlap with S2 playground data.
slslide by sl seconds before determining playground data.
excl_playexclude the first excl_play second from the start and end of the chunk when computing if the chunk overlaps with playground.
pad_dataexclude the first and last pad_data seconds of the segment when generating chunks

Definition at line 2112 of file pipeline.py.

◆ make_chunks_from_unused()

def lal.pipeline.ScienceData.make_chunks_from_unused (   self,
  length,
  trig_overlap,
  play = 0,
  min_length = 0,
  sl = 0,
  excl_play = 0,
  pad_data = 0 
)

Create an extra chunk that uses up the unused data in the science segment.

Parameters
lengthlength of chunk in seconds.
trig_overlaplength of time start generating triggers before the start of the unused data.
play
  • 1 : only generate chunks that overlap with S2 playground data.
  • 2 : as 1 plus compute trig start and end times to coincide with the start/end of the playground
min_lengththe unused data must be greater than min_length to make a chunk.
slslide by sl seconds before determining playground data.
excl_playexclude the first excl_play second from the start and end of the chunk when computing if the chunk overlaps with playground.
pad_dataexclude the first and last pad_data seconds of the segment when generating chunks

Definition at line 2134 of file pipeline.py.

◆ make_short_chunks_from_unused()

def lal.pipeline.ScienceData.make_short_chunks_from_unused (   self,
  min_length,
  overlap = 0,
  play = 0,
  sl = 0,
  excl_play = 0 
)

Create a chunk that uses up the unused data in the science segment.

Parameters
min_lengththe unused data must be greater than min_length to make a chunk.
overlapoverlap between chunks in seconds.
playif true, only generate chunks that overlap with S2 playground data.
slslide by sl seconds before determining playground data.
excl_playexclude the first excl_play second from the start and end of the chunk when computing if the chunk overlaps with playground.

Definition at line 2175 of file pipeline.py.

◆ make_optimised_chunks()

def lal.pipeline.ScienceData.make_optimised_chunks (   self,
  min_length,
  max_length,
  pad_data = 0 
)

Splits ScienceSegments up into chunks, of a given maximum length.

The length of the last two chunks are chosen so that the data utilisation is optimised.

Parameters
min_lengthminimum chunk length.
max_lengthmaximum chunk length.
pad_dataexclude the first and last pad_data seconds of the segment when generating chunks

Definition at line 2196 of file pipeline.py.

◆ intersection()

def lal.pipeline.ScienceData.intersection (   self,
  other 
)

Replaces the ScienceSegments contained in this instance of ScienceData with the intersection of those in the instance other.

Returns the number of segments in the intersection.

Parameters
otherScienceData to use to generate the intersection

Definition at line 2231 of file pipeline.py.

◆ union()

def lal.pipeline.ScienceData.union (   self,
  other 
)

Replaces the ScienceSegments contained in this instance of ScienceData with the union of those in the instance other.

Returns the number of ScienceSegments in the union.

Parameters
otherScienceData to use to generate the intersection

Definition at line 2287 of file pipeline.py.

◆ coalesce()

def lal.pipeline.ScienceData.coalesce (   self)

Coalesces any adjacent ScienceSegments.

Returns the number of ScienceSegments in the coalesced list.

Definition at line 2369 of file pipeline.py.

◆ invert()

def lal.pipeline.ScienceData.invert (   self)

Inverts the ScienceSegments in the class (i.e.

set NOT). Returns the number of ScienceSegments after inversion.

Definition at line 2410 of file pipeline.py.

◆ play()

def lal.pipeline.ScienceData.play (   self)

Keep only times in ScienceSegments which are in the playground.

Definition at line 2440 of file pipeline.py.

◆ intersect_3()

def lal.pipeline.ScienceData.intersect_3 (   self,
  second,
  third 
)

Intersection routine for three inputs.

Built out of the intersect, coalesce and play routines

Definition at line 2485 of file pipeline.py.

◆ intersect_4()

def lal.pipeline.ScienceData.intersect_4 (   self,
  second,
  third,
  fourth 
)

Intersection routine for four inputs.

Definition at line 2494 of file pipeline.py.

◆ split()

def lal.pipeline.ScienceData.split (   self,
  dt 
)

Split the segments in the list is subsegments at least as long as dt.

Definition at line 2504 of file pipeline.py.