Package python :: Module event_time :: Class EventTime
[hide private]
[frames] | no frames]

Class EventTime

source code

The EventTime class. The purpose of this class is to translate IceCube time, which constist of the year and tenths of nanoseconds since the beginning of the year, to a format that is more user-friendly. This class uses python's datetime module.


To Do:
Instance Methods [hide private]
 
__init__(self, year, daqTime)
The constructor takes a year and a DAQTime (i.e.
source code
 
_make_datetime_pair(self)
This method uses the year and daqTime to create a datetime object.
source code
 
__str__(self) source code
Instance Variables [hide private]
  year
The year the event occured.
  daqTime
The number of tenths of nanoseconds the event occured since the beginning of the year.
  dateTime
The datetime object
  utcTenthNanoSecond
The remainder of the tenths of nanoseconds from the creation of the datetime object
Method Details [hide private]

__init__(self, year, daqTime)
(Constructor)

source code 

The constructor takes a year and a DAQTime (i.e. number of tenths of nanoseconds since the beginning of the year).

Parameters:
  • year - The time of year that was used to initialize the class.
  • daqTime - Number of tenths of nanoseconds since the beginning of the year.

_make_datetime_pair(self)

source code 

This method uses the year and daqTime to create a datetime object. Since the highest precision of datetime is microseconds, the remaining tenths of nanoseconds is returned as well.

Returns:
This method returns a tuple (datetime, int) where the first element is the datetime object and the second element is the remaining tenths of nanoseconds.