Exemplo n.º 1
0
 def createCommandLineDescription(self):
     if not EventLoaderApp.createCommandLineDescription(self):
         return False
     self.commandline().addGroup("Magnitude")
     self.commandline().addStringOption("Magnitude", "magnitude-type", "type of magnitude to set preferred")
     self.commandline().addStringOption("Magnitude", "dump-magnitude-types", "dump available magnitude types for this event")
     return True
Exemplo n.º 2
0
    def validateParameters(self):
        if not EventLoaderApp.validateParameters(self):
            return False

        try:
            self._magType = self.commandline().optionString("magnitude-type")
        except:
            self._magType = None
        return True
Exemplo n.º 3
0
    def validateParameters(self):
        if not EventLoaderApp.validateParameters(self):
            return False

        try:
            self._magType = self.commandline().optionString("magnitude-type")
        except:
            self._magType = None
        return True
Exemplo n.º 4
0
 def createCommandLineDescription(self):
     if not EventLoaderApp.createCommandLineDescription(self):
         return False
     self.commandline().addGroup("Magnitude")
     self.commandline().addStringOption(
         "Magnitude", "magnitude-type",
         "type of magnitude to set preferred")
     self.commandline().addStringOption(
         "Magnitude", "dump-magnitude-types",
         "dump available magnitude types for this event")
     return True
Exemplo n.º 5
0
    def run(self):
        if not EventLoaderApp.run(self):
            return False

        event, origin, pick, ampl, fm = sc3stuff.util.extractEventParameters(self._ep, self._eventID)
#       print(event, origin)

        if self._magType is not None:
            if self._magType == "Mw":
                return self.fixMw()

            if self._magType[0].upper() == "M":
                return self.fixMagnitudeType(self._magType)

            raise ValueError, "Don't know what to do with magnitude %s" % self._magType

        return True
Exemplo n.º 6
0
    def run(self):
        if not EventLoaderApp.run(self):
            return False

        event, origin, pick, ampl, fm = sc3stuff.util.extractEventParameters(
            self._ep, self._eventID)
        #       print(event, origin)

        if self._magType is not None:
            if self._magType == "Mw":
                return self.fixMw()

            if self._magType[0].upper() == "M":
                return self.fixMagnitudeType(self._magType)

            raise ValueError, "Don't know what to do with magnitude %s" % self._magType

        return True
Exemplo n.º 7
0
 def __init__(self, argc, argv):
     EventLoaderApp.__init__(self, argc, argv)
     self.setXmlEnabled(False)
     self.setMessagingEnabled(True)
Exemplo n.º 8
0
 def __init__(self, argc, argv):
     EventLoaderApp.__init__(self, argc, argv)
     self.setXmlEnabled(False)
     self.setMessagingEnabled(True)