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... | |
def lal.pipeline.ScienceData.__init__ | ( | self | ) |
Definition at line 2020 of file pipeline.py.
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.
def lal.pipeline.ScienceData.__repr__ | ( | self | ) |
Definition at line 2031 of file pipeline.py.
def lal.pipeline.ScienceData.__len__ | ( | self | ) |
Returns the number of ScienceSegments associated with the ScienceData.
Definition at line 2037 of file pipeline.py.
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.
filename | input text file containing a list of science segments generated by segwizard. |
min_length | only append science segments that are longer than min_length. |
slide_sec | Slide each ScienceSegment by:: |
delta > 0: [s, e] -> [s+delta, e]. delta < 0: [s, e] -> [s, e-delta].
buffer | shrink the ScienceSegment:: |
[s, e] -> [s+buffer, e-buffer]
Definition at line 2056 of file pipeline.py.
def lal.pipeline.ScienceData.append_from_tuple | ( | self, | |
seg_tuple | |||
) |
Definition at line 2079 of file pipeline.py.
def lal.pipeline.ScienceData.tama_read | ( | self, | |
filename | |||
) |
Parse the science segments from a tama list of locked segments contained in file.
filename | input text file containing a list of tama segments. |
Definition at line 2088 of file pipeline.py.
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.
length | length of chunk in seconds. |
overlap | overlap between segments. |
play | if true, only generate chunks that overlap with S2 playground data. |
sl | slide by sl seconds before determining playground data. |
excl_play | exclude the first excl_play second from the start and end of the chunk when computing if the chunk overlaps with playground. |
pad_data | exclude the first and last pad_data seconds of the segment when generating chunks |
Definition at line 2112 of file pipeline.py.
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.
length | length of chunk in seconds. |
trig_overlap | length of time start generating triggers before the start of the unused data. |
play |
|
min_length | the unused data must be greater than min_length to make a chunk. |
sl | slide by sl seconds before determining playground data. |
excl_play | exclude the first excl_play second from the start and end of the chunk when computing if the chunk overlaps with playground. |
pad_data | exclude the first and last pad_data seconds of the segment when generating chunks |
Definition at line 2134 of file pipeline.py.
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.
min_length | the unused data must be greater than min_length to make a chunk. |
overlap | overlap between chunks in seconds. |
play | if true, only generate chunks that overlap with S2 playground data. |
sl | slide by sl seconds before determining playground data. |
excl_play | exclude 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.
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.
min_length | minimum chunk length. |
max_length | maximum chunk length. |
pad_data | exclude the first and last pad_data seconds of the segment when generating chunks |
Definition at line 2196 of file pipeline.py.
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.
other | ScienceData to use to generate the intersection |
Definition at line 2231 of file pipeline.py.
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.
other | ScienceData to use to generate the intersection |
Definition at line 2287 of file pipeline.py.
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.
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.
def lal.pipeline.ScienceData.play | ( | self | ) |
Keep only times in ScienceSegments which are in the playground.
Definition at line 2440 of file pipeline.py.
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.
def lal.pipeline.ScienceData.intersect_4 | ( | self, | |
second, | |||
third, | |||
fourth | |||
) |
Intersection routine for four inputs.
Definition at line 2494 of file pipeline.py.
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.