Public Member Functions | |
def | __init__ |
def | DatetimeToStr |
def | LSDuration |
def | OrbitDuration |
def | OrbitToLocalTimestamp |
def | OrbitToTime |
def | OrbitToTimeStr |
def | OrbitToUTCTimestamp |
def | StrToDatetime |
Public Attributes | |
bunchspace_s | |
bunchspace_us | |
coraltimefm | |
nbx | |
pydatetimefm |
Definition at line 4 of file lumiTime.py.
def lumiTime::lumiTime::__init__ | ( | self | ) |
Definition at line 5 of file lumiTime.py.
def lumiTime::lumiTime::DatetimeToStr | ( | self, | |
timeValue, | |||
customfm = '' |
|||
) |
convert python datetime to string timestamp
Definition at line 57 of file lumiTime.py.
def lumiTime::lumiTime::LSDuration | ( | self, | |
norbits | |||
) |
Definition at line 12 of file lumiTime.py.
def lumiTime::lumiTime::OrbitDuration | ( | self | ) |
Definition at line 15 of file lumiTime.py.
def lumiTime::lumiTime::OrbitToLocalTimestamp | ( | self, | |
begStrTime, | |||
orbitnumber, | |||
begorbit = 0 |
|||
) |
given a orbit number, return its corresponding unixtimestamp. Default run begin time counting from orbit=0
Definition at line 28 of file lumiTime.py.
00029 : 00030 ''' 00031 given a orbit number, return its corresponding unixtimestamp. Default run begin time counting from orbit=0 00032 ''' 00033 os.environ['TZ']='CET' 00034 time.tzset() 00035 orbittime=self.OrbitToTime(begStrTime,orbitnumber,begorbit) 00036 return time.mktime(orbittime.timetuple())+orbittime.microsecond/1e6
def lumiTime::lumiTime::OrbitToTime | ( | self, | |
begStrTime, | |||
orbitnumber, | |||
begorbit = 0 |
|||
) |
given a orbit number, return its corresponding time. Default run begin time counting from orbit=0
Definition at line 23 of file lumiTime.py.
def lumiTime::lumiTime::OrbitToTimeStr | ( | self, | |
begStrTime, | |||
orbitnumber, | |||
begorbit = 0 |
|||
) |
given a orbit number, return its corresponding time. Assuming begin time has orbit=0
Definition at line 18 of file lumiTime.py.
def lumiTime::lumiTime::OrbitToUTCTimestamp | ( | self, | |
begStrTime, | |||
orbitnumber, | |||
begorbit = 0 |
|||
) |
given a orbit number, return its corresponding unixtimestamp. Default run begin time counting from orbit=0
Definition at line 37 of file lumiTime.py.
00038 : 00039 ''' 00040 given a orbit number, return its corresponding unixtimestamp. Default run begin time counting from orbit=0 00041 ''' 00042 os.environ['TZ']='UTC' 00043 time.tzset() 00044 orbittime=self.OrbitToTime(begStrTime,orbitnumber,begorbit) return time.mktime(orbittime.timetuple())+(orbittime.microsecond/1e6)
def lumiTime::lumiTime::StrToDatetime | ( | self, | |
strTime, | |||
customfm = '' |
|||
) |
convert string timestamp to python datetime
Definition at line 45 of file lumiTime.py.
00046 : 00047 '''convert string timestamp to python datetime 00048 ''' 00049 result='' 00050 try: 00051 if not customfm: 00052 result=datetime.strptime(strTime,self.pydatetimefm) 00053 else: 00054 result=datetime.strptime(strTime,customfm) 00055 except Exception,er: 00056 print str(er) return result
Definition at line 5 of file lumiTime.py.
Definition at line 5 of file lumiTime.py.
Definition at line 5 of file lumiTime.py.
Definition at line 5 of file lumiTime.py.
Definition at line 5 of file lumiTime.py.