Class Segment
source code
         object --+    
                  |    
table.Table.RowType --+
                      |
                     Segment
- Known Subclasses:
 
- 
      
 
Example:
>>> x = Segment()
>>> x.start = LIGOTimeGPS(0)
>>> x.end = LIGOTimeGPS(10)
>>> x.segment
segment(LIGOTimeGPS(0, 0), LIGOTimeGPS(10, 0))
>>> x.segment = None
>>> print(x.segment)
None
>>> print(x.start)
None
>>> 
>>> x.segment = (20, 30.125)
>>> x.end
LIGOTimeGPS(30, 125000000)
>>> 
>>> Segment((20, 30)).segment
segment(LIGOTimeGPS(20, 0), LIGOTimeGPS(30, 0))
>>> Segment(20, 30).segment
segment(LIGOTimeGPS(20, 0), LIGOTimeGPS(30, 0))
>>> 
>>> from glue import segments
>>> x = segments.segmentlist([Segment(0, 10), Segment(20, 30)])
>>> abs(x)
LIGOTimeGPS(20, 0)
>>> y = segments.segmentlist([Segment(5, 15), Segment(25, 35)])
>>> abs(x & y)
LIGOTimeGPS(10, 0)
>>> abs(x | y)
LIGOTimeGPS(30, 0)
>>> 8.0 in x
True
>>> 12 in x
False
>>> Segment(2, 3) in x
True
>>> Segment(2, 12) in x
False
>>> segments.segment(2, 3) in x
True
>>> segments.segment(2, 12) in x
False
>>> 
>>> segments.segmentlist(map(Segment, x & y))   
[<glue.ligolw.lsctables.Segment object at 0x...>, <glue.ligolw.lsctables.Segment object at 0x...>]
  This implementation uses a non-standard extension to encode infinite 
  values for boundaries:  the second and nanosecond components are both set
  to 0x7FFFFFFF or 0xFFFFFFFF to indicate positive resp. negative infinity.
  For this reason, "denormalized" LIGOTimeGPS objects (objects 
  whose nanoseconds fields contain values exceeding +/-999999999) are 
  disallowed for use with this class.
  Example:
>>> x = Segment()
>>> 
>>> x.start = -segments.infinity()
>>> 
>>> x.start = float("-inf")
>>> 
>>> 
>>> x.start
-infinity
>>> x.end = float("+inf")
>>> x.segment
segment(-infinity, infinity)
    | 
       
     | 
      
      
     | 
  
    | 
       
     | 
      
      
     | 
  
    | 
       
     | 
      
      
     | 
  
    | 
       
     | 
      
      
     | 
  
    | 
       
     | 
      
        
          __init__(self,
        *args) 
      x.__init__(...) initializes x; see help(type(x)) for signature | 
          
            source code
            
           | 
         
       
      
     | 
  
    | 
       
     | 
      
      
     | 
  
    | 
       
     | 
      
      
     | 
  
    | 
       
     | 
      
        
          get(self) 
      Return the segment described by this row. | 
          
            source code
            
           | 
         
       
      
     | 
  
    | 
       
     | 
      
        
          set(self,
        segment) 
      Set the segment described by this row. | 
          
            source code
            
           | 
         
       
      
     | 
  
  
    | 
     Inherited from table.Table.RowType:
      __getstate__,
      __setstate__
       
    Inherited from object:
      __delattr__,
      __format__,
      __getattribute__,
      __hash__,
      __new__,
      __reduce__,
      __reduce_ex__,
      __repr__,
      __setattr__,
      __sizeof__,
      __str__,
      __subclasshook__
       
     | 
  
    | 
       
     | 
        end = <glue.ligolw.lsctables.gpsproperty object at 0x7f390418f...
     | 
  
    | 
       
     | 
        segment = <glue.ligolw.lsctables.segmentproperty object at 0x7...
     | 
  
    | 
       
     | 
        start = <glue.ligolw.lsctables.gpsproperty object at 0x7f39041...
     | 
  
    | 
       
     | 
        creator_db
     | 
  
    | 
       
     | 
        end_time
     | 
  
    | 
       
     | 
        end_time_ns
     | 
  
    | 
       
     | 
        process_id
     | 
  
    | 
       
     | 
        segment_def_cdb
     | 
  
    | 
       
     | 
        segment_def_id
     | 
  
    | 
       
     | 
        segment_id
     | 
  
    | 
       
     | 
        start_time
     | 
  
    | 
       
     | 
        start_time_ns
     | 
  
  
    | 
     Inherited from object:
      __class__
       
     | 
  
| 
  
  
   x.__init__(...) initializes x; see help(type(x)) for signature 
  
    - Overrides:
        object.__init__
        
 - (inherited documentation)
 
    
   
 | 
 
  end
  
  
   
  
    - Value:
 
      
<glue.ligolw.lsctables.gpsproperty object at 0x7f390418fb50>
  |   
 
   
 | 
 
  segment
  
  
   
  
    - Value:
 
      
<glue.ligolw.lsctables.segmentproperty object at 0x7f390418fb90>
  |   
 
   
 | 
 
  start
  
  
   
  
    - Value:
 
      
<glue.ligolw.lsctables.gpsproperty object at 0x7f390418fb10>
  |   
 
   
 |