Package glue :: Module pipeline :: Class ScienceSegment
[hide private]
[frames] | no frames]

Class ScienceSegment

source code

A ScienceSegment is a period of time where the experimenters determine that the inteferometer is in a state where the data is suitable for scientific analysis. A science segment can have a list of AnalysisChunks asscociated with it that break the segment up into (possibly overlapping) smaller time intervals for analysis.

Instance Methods [hide private]
 
__cmp__(self, other)
ScienceSegments are compared by the GPS start time of the segment.
source code
 
__getitem__(self, i)
Allows iteration over and direct access to the AnalysisChunks contained in this ScienceSegment.
source code
 
__init__(self, segment) source code
 
__len__(self)
Returns the number of AnalysisChunks contained in this ScienceSegment.
source code
 
__repr__(self) source code
 
add_chunk(self, start, end, trig_start=0, trig_end=0)
Add an AnalysisChunk to the list associated with this ScienceSegment.
source code
 
dur(self)
Returns the length (duration) in seconds of this ScienceSegment.
source code
 
end(self)
Returns the GPS end time of this ScienceSegment.
source code
 
get_df_node(self)
Returns the DataFind node for this ScienceSegment.
source code
 
id(self)
Returns the ID of this ScienceSegment.
source code
 
make_chunks(self, length=0, overlap=0, play=0, sl=0, excl_play=0, pad_data=0)
Divides the science segment into chunks of length seconds overlapped by overlap seconds.
source code
 
set_df_node(self, df_node)
Set the DataFind node associated with this ScienceSegment to df_node.
source code
 
set_end(self, t)
Override the GPS end time (and set the duration) of this ScienceSegment.
source code
 
set_start(self, t)
Override the GPS start time (and set the duration) of this ScienceSegment.
source code
 
set_unused(self, unused)
Set the length of data in the science segment not used to make chunks.
source code
 
start(self)
Returns the GPS start time of this ScienceSegment.
source code
 
unused(self)
Returns the length of data in the science segment not used to make chunks.
source code
Method Details [hide private]

__init__(self, segment)
(Constructor)

source code 
Parameters:
  • segment - a tuple containing the (segment id, gps start time, gps end time, duration) of the segment.

add_chunk(self, start, end, trig_start=0, trig_end=0)

source code 

Add an AnalysisChunk to the list associated with this ScienceSegment.

Parameters:
  • start - GPS start time of chunk.
  • end - GPS end time of chunk.
  • trig_start - GPS start time for triggers from chunk

make_chunks(self, length=0, overlap=0, play=0, sl=0, excl_play=0, pad_data=0)

source code 

Divides the science segment into chunks of length seconds overlapped by
overlap seconds. If the play option is set, only chunks that contain S2
playground data are generated. If the user has a more complicated way
of generating chunks, this method should be overriden in a sub-class.
Any data at the end of the ScienceSegment that is too short to contain a
chunk is ignored. The length of this unused data is stored and can be
retrieved with the unused() method.
@param length: length of chunk in seconds.
@param overlap: overlap between chunks in seconds.
@param play: 1 : only generate chunks that overlap with S2 playground data.
             2 : as play = 1 plus compute trig start and end times to
                 coincide with the start/end of the playground
@param sl: slide by sl seconds before determining playground data.
@param excl_play: exclude the first excl_play second from the start and end
of the chunk when computing if the chunk overlaps with playground.
@param pad_data: exclude the first and last pad_data seconds of the segment
when generating chunks

set_df_node(self, df_node)

source code 

Set the DataFind node associated with this ScienceSegment to df_node.

Parameters:
  • df_node - the DataFind node for this ScienceSegment.

set_end(self, t)

source code 

Override the GPS end time (and set the duration) of this ScienceSegment.

Parameters:
  • t - new GPS end time.

set_start(self, t)

source code 

Override the GPS start time (and set the duration) of this ScienceSegment.

Parameters:
  • t - new GPS start time.