Process¶
- class igwn_ligolw.lsctables.Process(**kwargs)¶
Bases:
RowTypeNOTE: for some historical reason, this table records start and end times as integer-valued quantities, only. GPS time-valued quantities are emulated for convenience, but only the integer part is stored. Truncation to an integer occurs when assigning a start or end time to the row.
Example:
>>> x = Process() >>> x.instruments = ("H1", "L1") >>> assert x.ifos == 'H1,L1' >>> assert x.instruments == set(['H1', 'L1']) >>> # truncates to integers >>> x.start = 10.5 >>> x.start LIGOTimeGPS(10, 0) >>> x.end = 20.5 >>> x.end LIGOTimeGPS(20, 0) >>> x.segment segment(LIGOTimeGPS(10, 0), LIGOTimeGPS(20, 0))
Attributes Summary
Methods Summary
initialized([program, version, ...])Create a new Process object and initialize its attributes to sensible defaults.
Set .end_time to the current GPS time.
Attributes Documentation
- comment¶
- cvs_entry_time¶
- cvs_repository¶
- domain¶
- end¶
- end_time¶
- end_time_ns¶
- ifos¶
- instruments¶
- is_online¶
- jobid¶
- node¶
- process_id¶
- program¶
- segment¶
- start¶
- start_time¶
- start_time_ns¶
- unix_procid¶
- username¶
- version¶
Methods Documentation
- classmethod initialized(program=None, version=None, cvs_repository=None, cvs_entry_time=None, comment=None, is_online=False, jobid=0, domain=None, instruments=None, process_id=None)¶
Create a new Process object and initialize its attributes to sensible defaults. If not None, program, version, cvs_repository, comment, and domain should all be strings or unicodes. If cvs_entry_time is not None, it must be a string or unicode in the format “YYYY-MM-DD HH:MM:SS”. is_online should be boolean, jobid an integer. If not None, instruments must be an iterable (set, tuple, etc.) of instrument names (strings or unicodes).
In addition, .node is set to the current hostname, .unix_procid is set to the current process ID, .username is set to the current user’s name, .start_time is set to the current GPS time.
Note: if the process_id keyword argument is None (the default), then the process_id attribute is not set, it is left uninitialized rather than setting it to None. It must be initialized before the row object can be written to a file, and so in this way the calling code is required to provide a proper value for it.
Example:
>>> process = Process.initialized()
- set_end_time_now()¶
Set .end_time to the current GPS time.