Public Member Functions | |
def | __init__ |
def | DatetimeToStr |
def | LSDuration |
def | OrbitDuration |
def | OrbitToLocalTimestamp |
def | OrbitToTime |
def | OrbitToTimeStr |
def | OrbitToUTCTimestamp |
def | StrToDatetime |
def | timestampTodatetimeUTC |
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 60 of file lumiTime.py.
def lumiTime::lumiTime::LSDuration | ( | self, | |
norbits | |||
) |
Definition at line 15 of file lumiTime.py.
def lumiTime::lumiTime::OrbitDuration | ( | self | ) |
Definition at line 18 of file lumiTime.py.
def lumiTime::lumiTime::OrbitToLocalTimestamp | ( | self, | |
begStrTime, | |||
orbitnumber, | |||
begorbit = 0 , |
|||
customfm = '' |
|||
) |
given a orbit number, return its corresponding unixtimestamp. Default run begin time counting from orbit=0
Definition at line 31 of file lumiTime.py.
00032 : 00033 ''' 00034 given a orbit number, return its corresponding unixtimestamp. Default run begin time counting from orbit=0 00035 ''' 00036 os.environ['TZ']='CET' 00037 time.tzset() 00038 orbittime=self.OrbitToTime(begStrTime,orbitnumber,begorbit=begorbit,customfm=customfm) 00039 return time.mktime(orbittime.timetuple())+orbittime.microsecond/1e6
def lumiTime::lumiTime::OrbitToTime | ( | self, | |
begStrTime, | |||
orbitnumber, | |||
begorbit = 0 , |
|||
customfm = '' |
|||
) |
given a orbit number, return its corresponding time. Default run begin time counting from orbit=0
Definition at line 26 of file lumiTime.py.
def lumiTime::lumiTime::OrbitToTimeStr | ( | self, | |
begStrTime, | |||
orbitnumber, | |||
begorbit = 0 , |
|||
customfm = '' |
|||
) |
given a orbit number, return its corresponding time. Assuming begin time has orbit=0
Definition at line 21 of file lumiTime.py.
def lumiTime::lumiTime::OrbitToUTCTimestamp | ( | self, | |
begStrTime, | |||
orbitnumber, | |||
begorbit = 0 , |
|||
customfm = '' |
|||
) |
given a orbit number, return its corresponding unixtimestamp. Default run begin time counting from orbit=0
Definition at line 40 of file lumiTime.py.
00041 : 00042 ''' 00043 given a orbit number, return its corresponding unixtimestamp. Default run begin time counting from orbit=0 00044 ''' 00045 os.environ['TZ']='UTC' 00046 time.tzset() 00047 orbittime=self.OrbitToTime(begStrTime,orbitnumber,begorbit=begorbit,customfm=customfm) return time.mktime(orbittime.timetuple())+(orbittime.microsecond/1e6)
def lumiTime::lumiTime::StrToDatetime | ( | self, | |
strTime, | |||
customfm = '' |
|||
) |
convert string timestamp to python datetime
Definition at line 48 of file lumiTime.py.
00049 : 00050 '''convert string timestamp to python datetime 00051 ''' 00052 result='' 00053 try: 00054 if not customfm: 00055 result=datetime.strptime(strTime,self.pydatetimefm) 00056 else: 00057 result=datetime.strptime(strTime,customfm) 00058 except Exception,er: 00059 print str(er) return result
def lumiTime::lumiTime::timestampTodatetimeUTC | ( | self, | |
ts | |||
) |
Definition at line 12 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.
Definition at line 5 of file lumiTime.py.