Esempio n. 1
0
 def __init__(self, orid=-1, epochtime=0, lon=0, lat=0, depth=0, ml=-999.9, mb=-999.9, ms=-999.9, mw=-999.9):
     """ initialise an origin object """
     import converttime
     self.orid = orid
     self.datetime = converttime.epoch2datetime(epochtime)
     self.location = location.location(lon, lat, depth, 'down')
     self.ml = ml
     self.mb = mb
     self.ms = ms
     self.mw = mw
Esempio n. 2
0
 def __init__(self,
              orid=-1,
              epochtime=0,
              lon=0,
              lat=0,
              depth=0,
              ml=-999.9,
              mb=-999.9,
              ms=-999.9,
              mw=-999.9):
     """ initialise an origin object """
     import converttime
     self.orid = orid
     self.datetime = converttime.epoch2datetime(epochtime)
     self.location = location.location(lon, lat, depth, 'down')
     self.ml = ml
     self.mb = mb
     self.ms = ms
     self.mw = mw
Esempio n. 3
0
 def datebin(self, binsize):
     """ bin the data based on a bin size of binsize days """
     import converttime
     #for i in range(len(self.evid)):
     #    etime[i] = converttime.epoch2datetime(self.time[i])
     etime = converttime.epoch2datetime(self.time)