class NodalPlane(QPCore.QPPublicObject): """ QuakePy: NodalPlane """ # <!-- UML2Py start --> addElements = QPElement.QPElementList(( QPElement.QPElement('strike', 'strike', 'element', RealQuantity.RealQuantity, 'complex'), QPElement.QPElement('dip', 'dip', 'element', RealQuantity.RealQuantity, 'complex'), QPElement.QPElement('rake', 'rake', 'element', RealQuantity.RealQuantity, 'complex'), )) # <!-- UML2Py end --> def __init__(self, strike=None, dip=None, rake=None, **kwargs): super(NodalPlane, self).__init__(**kwargs) self.elements.extend(self.addElements) self.strike = strike self.dip = dip self.rake = rake self._initMultipleElements()
class SourceTimeFunction(QPCore.QPPublicObject): """ QuakePy: SourceTimeFunction """ # <!-- UML2Py start --> addElements = QPElement.QPElementList(( QPElement.QPElement('type', 'type', 'element', unicode, 'enum'), QPElement.QPElement('duration', 'duration', 'element', float, 'basic'), QPElement.QPElement('riseTime', 'riseTime', 'element', float, 'basic'), QPElement.QPElement('decayTime', 'decayTime', 'element', float, 'basic'), )) # <!-- UML2Py end --> def __init__(self, type=None, duration=None, riseTime=None, decayTime=None, **kwargs ): super(SourceTimeFunction, self).__init__(**kwargs) self.elements.extend(self.addElements) self.type = type self.duration = duration self.riseTime = riseTime self.decayTime = decayTime self._initMultipleElements()
class Axis(QPCore.QPPublicObject): """ QuakePy: Axis """ # <!-- UML2Py start --> addElements = QPElement.QPElementList(( QPElement.QPElement('azimuth', 'azimuth', 'element', RealQuantity.RealQuantity, 'complex'), QPElement.QPElement('plunge', 'plunge', 'element', RealQuantity.RealQuantity, 'complex'), QPElement.QPElement('length', 'length', 'element', RealQuantity.RealQuantity, 'complex'), )) # <!-- UML2Py end --> def __init__(self, azimuth=None, plunge=None, length=None, **kwargs): super(Axis, self).__init__(**kwargs) self.elements.extend(self.addElements) self.azimuth = azimuth self.plunge = plunge self.length = length self._initMultipleElements()
class NodalPlanes(QPCore.QPPublicObject): """ QuakePy: NodalPlanes """ # <!-- UML2Py start --> addElements = QPElement.QPElementList(( QPElement.QPElement('nodalPlane1', 'nodalPlane1', 'element', NodalPlane.NodalPlane, 'complex'), QPElement.QPElement('nodalPlane2', 'nodalPlane2', 'element', NodalPlane.NodalPlane, 'complex'), QPElement.QPElement('preferredPlane', 'preferredPlane', 'attribute', int, 'basic'), )) # <!-- UML2Py end --> def __init__(self, nodalPlane1=None, nodalPlane2=None, preferredPlane=None, **kwargs): super(NodalPlanes, self).__init__(**kwargs) self.elements.extend(self.addElements) self.nodalPlane1 = nodalPlane1 self.nodalPlane2 = nodalPlane2 self.preferredPlane = preferredPlane self._initMultipleElements()
class OriginUncertainty(QPCore.QPPublicObject): """ QuakePy: OriginUncertainty """ # <!-- UML2Py start --> addElements = QPElement.QPElementList(( QPElement.QPElement('horizontalUncertainty', 'horizontalUncertainty', 'element', float, 'basic'), QPElement.QPElement('minHorizontalUncertainty', 'minHorizontalUncertainty', 'element', float, 'basic'), QPElement.QPElement('maxHorizontalUncertainty', 'maxHorizontalUncertainty', 'element', float, 'basic'), QPElement.QPElement('azimuthMaxHorizontalUncertainty', 'azimuthMaxHorizontalUncertainty', 'element', float, 'basic'), QPElement.QPElement('confidenceEllipsoid', 'confidenceEllipsoid', 'element', ConfidenceEllipsoid.ConfidenceEllipsoid, 'complex'), QPElement.QPElement('preferredDescription', 'preferredDescription', 'element', unicode, 'enum'), QPElement.QPElement('confidenceLevel', 'confidenceLevel', 'element', float, 'basic'), )) # <!-- UML2Py end --> def __init__(self, **kwargs ): super(OriginUncertainty, self).__init__(**kwargs) self.elements.extend(self.addElements) self._initMultipleElements()
class Cell(QPCore.QPObject): """ QuakePy: Cell """ addElements = QPElement.QPElementList( (QPElement.QPElement('lat', 'lat', 'attribute', float, 'basic'), QPElement.QPElement('lon', 'lon', 'attribute', float, 'basic'))) def __init__(self, **kwargs): super(Cell, self).__init__(**kwargs) self.elements.extend(self.addElements) self._initMultipleElements()
class DepthLayer(QPCore.QPObject): """ QuakePy: DepthLayer """ addElements = QPElement.QPElementList( (QPElement.QPElement('min', 'min', 'attribute', float, 'basic'), QPElement.QPElement('max', 'max', 'attribute', float, 'basic'), QPElement.QPElement('at', 'at', 'attribute', float, 'basic'), QPElement.QPElement('cell', 'cell', 'element', Cell, 'multiple'))) def __init__(self, **kwargs): super(DepthLayer, self).__init__(**kwargs) self.elements.extend(self.addElements) self._initMultipleElements()
class Grid(QPCore.QPObject): """ QuakePy: Grid """ addElements = QPElement.QPElementList( (QPElement.QPElement('defaultCellDimension', 'defaultCellDimension', 'element', DefaultCellDimension, 'complex'), QPElement.QPElement('depthLayer', 'depthLayer', 'element', DepthLayer, 'multiple'))) def __init__(self, **kwargs): super(Grid, self).__init__(**kwargs) self.elements.extend(self.addElements) self._initMultipleElements()
class ResourceReference(QPCore.QPPublicObject): """ QuakePy: ResourceReference """ # <!-- UML2Py start --> addElements = QPElement.QPElementList( (QPElement.QPElement('resourceID', 'resourceID', 'cdata', unicode, 'basic'), )) # <!-- UML2Py end --> def __init__(self, **kwargs): super(ResourceReference, self).__init__(**kwargs) self.elements.extend(self.addElements) self._initMultipleElements()
class DefaultCellDimension(QPCore.QPObject): """ QuakePy: DefaultCellDimension """ addElements = QPElement.QPElementList( (QPElement.QPElement('latRange', 'latRange', 'attribute', float, 'basic'), QPElement.QPElement('lonRange', 'lonRange', 'attribute', float, 'basic'))) def __init__(self, **kwargs): super(DefaultCellDimension, self).__init__(**kwargs) self.elements.extend(self.addElements) self._initMultipleElements()
class Phase(QPCore.QPPublicObject): """ QuakePy: Phase """ # <!-- UML2Py start --> addElements = QPElement.QPElementList( (QPElement.QPElement('code', 'code', 'cdata', unicode, 'basic'), )) # <!-- UML2Py end --> def __init__(self, code=None, **kwargs): super(Phase, self).__init__(**kwargs) self.elements.extend(self.addElements) self.code = code self._initMultipleElements()
class ConfidenceEllipsoid(QPCore.QPPublicObject): """ QuakePy: ConfidenceEllipsoid """ # <!-- UML2Py start --> addElements = QPElement.QPElementList(( QPElement.QPElement('semiMajorAxisLength', 'semiMajorAxisLength', 'element', float, 'basic'), QPElement.QPElement('semiMinorAxisLength', 'semiMinorAxisLength', 'element', float, 'basic'), QPElement.QPElement('semiIntermediateAxisLength', 'semiIntermediateAxisLength', 'element', float, 'basic'), QPElement.QPElement('majorAxisPlunge', 'majorAxisPlunge', 'element', float, 'basic'), QPElement.QPElement('majorAxisAzimuth', 'majorAxisAzimuth', 'element', float, 'basic'), QPElement.QPElement('majorAxisRotation', 'majorAxisRotation', 'element', float, 'basic'), )) # <!-- UML2Py end --> def __init__(self, **kwargs): super(ConfidenceEllipsoid, self).__init__(**kwargs) self.elements.extend(self.addElements) self._initMultipleElements()
class CompositeTime(QPCore.QPPublicObject): """ QuakePy: CompositeTime """ # <!-- UML2Py start --> addElements = QPElement.QPElementList(( QPElement.QPElement('year', 'year', 'element', IntegerQuantity.IntegerQuantity, 'complex'), QPElement.QPElement('month', 'month', 'element', IntegerQuantity.IntegerQuantity, 'complex'), QPElement.QPElement('day', 'day', 'element', IntegerQuantity.IntegerQuantity, 'complex'), QPElement.QPElement('hour', 'hour', 'element', IntegerQuantity.IntegerQuantity, 'complex'), QPElement.QPElement('minute', 'minute', 'element', IntegerQuantity.IntegerQuantity, 'complex'), QPElement.QPElement('second', 'second', 'element', RealQuantity.RealQuantity, 'complex'), )) # <!-- UML2Py end --> def __init__(self, **kwargs): super(CompositeTime, self).__init__(**kwargs) self.elements.extend(self.addElements) self._initMultipleElements()
class StationMagnitudeContribution(QPCore.QPPublicObject): """ QuakePy: StationMagnitudeContribution """ # <!-- UML2Py start --> addElements = QPElement.QPElementList(( QPElement.QPElement('stationMagnitudeID', 'stationMagnitudeID', 'element', unicode, 'basic'), QPElement.QPElement('residual', 'residual', 'element', float, 'basic'), QPElement.QPElement('weight', 'weight', 'element', float, 'basic'), )) # <!-- UML2Py end --> def __init__(self, **kwargs): super(StationMagnitudeContribution, self).__init__(**kwargs) self.elements.extend(self.addElements) self._initMultipleElements()
class EventDescription(QPCore.QPPublicObject): """ QuakePy: EventDescription """ # <!-- UML2Py start --> addElements = QPElement.QPElementList(( QPElement.QPElement('text', 'text', 'element', unicode, 'basic'), QPElement.QPElement('type', 'type', 'element', unicode, 'enum'), )) # <!-- UML2Py end --> def __init__(self, text=None, type=None, **kwargs): super(EventDescription, self).__init__(**kwargs) self.elements.extend(self.addElements) self.text = text self.type = type self._initMultipleElements()
class RealQuantity(QPCore.QPPublicObject): """ QuakePy: RealQuantity """ # <!-- UML2Py start --> addElements = QPElement.QPElementList(( QPElement.QPElement('value', 'value', 'element', float, 'basic'), QPElement.QPElement('uncertainty', 'uncertainty', 'element', float, 'basic'), QPElement.QPElement('lowerUncertainty', 'lowerUncertainty', 'element', float, 'basic'), QPElement.QPElement('upperUncertainty', 'upperUncertainty', 'element', float, 'basic'), QPElement.QPElement('confidenceLevel', 'confidenceLevel', 'element', float, 'basic'), )) # <!-- UML2Py end --> def __init__(self, value=None, uncertainty=None, lowerUncertainty=None, upperUncertainty=None, confidenceLevel=None, **kwargs ): super(RealQuantity, self).__init__(**kwargs) self.elements.extend(self.addElements) self.value = value self.uncertainty = uncertainty self.lowerUncertainty = lowerUncertainty self.upperUncertainty = upperUncertainty self.confidenceLevel = confidenceLevel self._initMultipleElements()
class EventParameters(QPCore.QPPublicObject): """ QuakePy: EventParameters """ # <!-- UML2Py start --> addElements = QPElement.QPElementList(( QPElement.QPElement('publicID', 'publicID', 'attribute', unicode, 'basic'), QPElement.QPElement('description', 'description', 'element', unicode, 'basic'), QPElement.QPElement('creationInfo', 'creationInfo', 'element', CreationInfo.CreationInfo, 'complex'), QPElement.QPElement('event', 'event', 'element', Event.Event, 'multiple'), QPElement.QPElement('comment', 'comment', 'element', Comment.Comment, 'multiple'), )) # <!-- UML2Py end --> def __init__(self, publicID=None, **kwargs): super(EventParameters, self).__init__(publicID, **kwargs) self.elements.extend(self.addElements) # publicID has not been set in parent class if self.publicID is None: self.publicID = self.createPublicID(self.__class__.__name__, **kwargs) self._initMultipleElements()
class WaveformStreamID(QPCore.QPPublicObject): """ QuakePy: WaveformStreamID """ # <!-- UML2Py start --> addElements = QPElement.QPElementList(( QPElement.QPElement('networkCode', 'networkCode', 'attribute', unicode, 'basic'), QPElement.QPElement('stationCode', 'stationCode', 'attribute', unicode, 'basic'), QPElement.QPElement('channelCode', 'channelCode', 'attribute', unicode, 'basic'), QPElement.QPElement('locationCode', 'locationCode', 'attribute', unicode, 'basic'), QPElement.QPElement('resourceURI', 'resourceURI', 'cdata', unicode, 'basic'), )) # <!-- UML2Py end --> def __init__(self, networkCode=None, stationCode=None, channelCode=None, locationCode=None, resourceURI=None, **kwargs ): super(WaveformStreamID, self).__init__(**kwargs) self.elements.extend(self.addElements) self.networkCode = networkCode self.stationCode = stationCode self.channelCode = channelCode self.locationCode = locationCode self.resourceURI = resourceURI self._initMultipleElements()
class PrincipalAxes(QPCore.QPPublicObject): """ QuakePy: PrincipalAxes """ # <!-- UML2Py start --> addElements = QPElement.QPElementList(( QPElement.QPElement('tAxis', 'tAxis', 'element', Axis.Axis, 'complex'), QPElement.QPElement('pAxis', 'pAxis', 'element', Axis.Axis, 'complex'), QPElement.QPElement('nAxis', 'nAxis', 'element', Axis.Axis, 'complex'), )) # <!-- UML2Py end --> def __init__(self, tAxis=None, pAxis=None, nAxis=None, **kwargs): super(PrincipalAxes, self).__init__(**kwargs) self.elements.extend(self.addElements) self.tAxis = tAxis self.pAxis = pAxis self.nAxis = nAxis self._initMultipleElements()
class TimeWindow(QPCore.QPPublicObject): """ QuakePy: TimeWindow """ # <!-- UML2Py start --> addElements = QPElement.QPElementList(( QPElement.QPElement('begin', 'begin', 'element', float, 'basic'), QPElement.QPElement('end', 'end', 'element', float, 'basic'), QPElement.QPElement('reference', 'reference', 'element', QPDateTime.QPDateTime, 'basic'), )) # <!-- UML2Py end --> def __init__(self, begin=None, end=None, reference=None, **kwargs): super(TimeWindow, self).__init__(**kwargs) self.elements.extend(self.addElements) self.begin = begin self.end = end self.reference = reference self._initMultipleElements()
class Comment(QPCore.QPPublicObject): """ QuakePy: Comment """ # <!-- UML2Py start --> addElements = QPElement.QPElementList(( QPElement.QPElement('text', 'text', 'element', unicode, 'basic'), QPElement.QPElement('id', 'id', 'attribute', unicode, 'basic'), QPElement.QPElement('creationInfo', 'creationInfo', 'element', CreationInfo.CreationInfo, 'complex'), )) # <!-- UML2Py end --> def __init__(self, text=None, id=None, creationInfo=None, **kwargs): super(Comment, self).__init__(**kwargs) self.elements.extend(self.addElements) self.text = text self.id = id self.creationInfo = creationInfo self._initMultipleElements()
class StationMagnitude(QPCore.QPPublicObject): """ QuakePy: StationMagnitude """ # <!-- UML2Py start --> addElements = QPElement.QPElementList(( QPElement.QPElement('publicID', 'publicID', 'attribute', unicode, 'basic'), QPElement.QPElement('originID', 'originID', 'element', unicode, 'basic'), QPElement.QPElement('mag', 'mag', 'element', RealQuantity.RealQuantity, 'complex'), QPElement.QPElement('type', 'type', 'element', unicode, 'basic'), QPElement.QPElement('amplitudeID', 'amplitudeID', 'element', unicode, 'basic'), QPElement.QPElement('methodID', 'methodID', 'element', unicode, 'basic'), QPElement.QPElement('waveformID', 'waveformID', 'element', WaveformStreamID.WaveformStreamID, 'complex'), QPElement.QPElement('creationInfo', 'creationInfo', 'element', CreationInfo.CreationInfo, 'complex'), QPElement.QPElement('comment', 'comment', 'element', Comment.Comment, 'multiple'), )) # <!-- UML2Py end --> def __init__(self, publicID=None, **kwargs): super(StationMagnitude, self).__init__(publicID, **kwargs) self.elements.extend(self.addElements) # publicID has not been set in parent class if self.publicID is None: self.publicID = self.createPublicID(self.__class__.__name__, **kwargs) self._initMultipleElements()
class Tensor(QPCore.QPPublicObject): """ QuakePy: Tensor """ # <!-- UML2Py start --> addElements = QPElement.QPElementList(( QPElement.QPElement('Mrr', 'Mrr', 'element', RealQuantity.RealQuantity, 'complex'), QPElement.QPElement('Mtt', 'Mtt', 'element', RealQuantity.RealQuantity, 'complex'), QPElement.QPElement('Mpp', 'Mpp', 'element', RealQuantity.RealQuantity, 'complex'), QPElement.QPElement('Mrt', 'Mrt', 'element', RealQuantity.RealQuantity, 'complex'), QPElement.QPElement('Mrp', 'Mrp', 'element', RealQuantity.RealQuantity, 'complex'), QPElement.QPElement('Mtp', 'Mtp', 'element', RealQuantity.RealQuantity, 'complex'), )) # <!-- UML2Py end --> def __init__(self, Mrr=None, Mtt=None, Mpp=None, Mrt=None, Mrp=None, Mtp=None, **kwargs): super(Tensor, self).__init__(**kwargs) self.elements.extend(self.addElements) self.Mrr = Mrr self.Mtt = Mtt self.Mpp = Mpp self.Mrt = Mrt self.Mrp = Mrp self.Mtp = Mtp self._initMultipleElements()
class CreationInfo(QPCore.QPPublicObject): """ QuakePy: CreationInfo """ # <!-- UML2Py start --> addElements = QPElement.QPElementList(( QPElement.QPElement('author', 'author', 'element', unicode, 'basic'), QPElement.QPElement('authorURI', 'authorURI', 'element', unicode, 'basic'), QPElement.QPElement('agencyID', 'agencyID', 'element', unicode, 'basic'), QPElement.QPElement('agencyURI', 'agencyURI', 'element', unicode, 'basic'), QPElement.QPElement('creationTime', 'creationTime', 'element', QPDateTime.QPDateTime, 'basic'), QPElement.QPElement('version', 'version', 'element', unicode, 'basic'), )) # <!-- UML2Py end --> def __init__(self, agencyID=None, agencyURI=None, author=None, authorURI=None, creationTime=None, version=None, **kwargs): super(CreationInfo, self).__init__(**kwargs) self.elements.extend(self.addElements) self.agencyID = agencyID self.agencyURI = agencyURI self.author = author self.authorURI = authorURI self.creationTime = creationTime self.version = version self._initMultipleElements()
class DataUsed(QPCore.QPPublicObject): """ QuakePy: DataUsed """ # <!-- UML2Py start --> addElements = QPElement.QPElementList(( QPElement.QPElement('waveType', 'waveType', 'element', unicode, 'enum'), QPElement.QPElement('stationCount', 'stationCount', 'element', int, 'basic'), QPElement.QPElement('componentCount', 'componentCount', 'element', int, 'basic'), QPElement.QPElement('shortestPeriod', 'shortestPeriod', 'element', float, 'basic'), QPElement.QPElement('longestPeriod', 'longestPeriod', 'element', float, 'basic'), )) # <!-- UML2Py end --> def __init__(self, waveType=None, stationCount=None, componentCount=None, shortestPeriod=None, longestPeriod=None, **kwargs): super(DataUsed, self).__init__(**kwargs) self.elements.extend(self.addElements) self.waveType = waveType self.stationCount = stationCount self.componentCount = componentCount self.shortestPeriod = shortestPeriod self.longestPeriod = longestPeriod self._initMultipleElements()
class Arrival(QPCore.QPPublicObject): """ QuakePy: Arrival """ # <!-- UML2Py start --> addElements = QPElement.QPElementList(( QPElement.QPElement('publicID', 'publicID', 'attribute', unicode, 'basic'), QPElement.QPElement('pickID', 'pickID', 'element', unicode, 'basic'), QPElement.QPElement('phase', 'phase', 'element', Phase.Phase, 'complex'), QPElement.QPElement('timeCorrection', 'timeCorrection', 'element', float, 'basic'), QPElement.QPElement('azimuth', 'azimuth', 'element', float, 'basic'), QPElement.QPElement('distance', 'distance', 'element', float, 'basic'), QPElement.QPElement('takeoffAngle', 'takeoffAngle', 'element', RealQuantity.RealQuantity, 'complex'), QPElement.QPElement('timeResidual', 'timeResidual', 'element', float, 'basic'), QPElement.QPElement('horizontalSlownessResidual', 'horizontalSlownessResidual', 'element', float, 'basic'), QPElement.QPElement('backazimuthResidual', 'backazimuthResidual', 'element', float, 'basic'), QPElement.QPElement('timeWeight', 'timeWeight', 'element', float, 'basic'), QPElement.QPElement('horizontalSlownessWeight', 'horizontalSlownessWeight', 'element', float, 'basic'), QPElement.QPElement('backazimuthWeight', 'backazimuthWeight', 'element', float, 'basic'), QPElement.QPElement('earthModelID', 'earthModelID', 'element', unicode, 'basic'), QPElement.QPElement('creationInfo', 'creationInfo', 'element', CreationInfo.CreationInfo, 'complex'), QPElement.QPElement('comment', 'comment', 'element', Comment.Comment, 'multiple'), )) # <!-- UML2Py end --> def __init__(self, publicID=None, **kwargs): super(Arrival, self).__init__(publicID, **kwargs) self.elements.extend(self.addElements) # publicID has not been set in parent class if self.publicID is None: self.publicID = self.createPublicID(self.__class__.__name__, **kwargs) self._initMultipleElements()
class Pick(QPCore.QPPublicObject): """ QuakePy: Pick """ # <!-- UML2Py start --> addElements = QPElement.QPElementList(( QPElement.QPElement('publicID', 'publicID', 'attribute', unicode, 'basic'), QPElement.QPElement('time', 'time', 'element', TimeQuantity.TimeQuantity, 'complex'), QPElement.QPElement('waveformID', 'waveformID', 'element', WaveformStreamID.WaveformStreamID, 'complex'), QPElement.QPElement('filterID', 'filterID', 'element', unicode, 'basic'), QPElement.QPElement('methodID', 'methodID', 'element', unicode, 'basic'), QPElement.QPElement('horizontalSlowness', 'horizontalSlowness', 'element', RealQuantity.RealQuantity, 'complex'), QPElement.QPElement('backazimuth', 'backazimuth', 'element', RealQuantity.RealQuantity, 'complex'), QPElement.QPElement('slownessMethodID', 'slownessMethodID', 'element', unicode, 'basic'), QPElement.QPElement('onset', 'onset', 'element', unicode, 'enum'), QPElement.QPElement('phaseHint', 'phaseHint', 'element', Phase.Phase, 'complex'), QPElement.QPElement('polarity', 'polarity', 'element', unicode, 'enum'), QPElement.QPElement('evaluationMode', 'evaluationMode', 'element', unicode, 'enum'), QPElement.QPElement('evaluationStatus', 'evaluationStatus', 'element', unicode, 'enum'), QPElement.QPElement('creationInfo', 'creationInfo', 'element', CreationInfo.CreationInfo, 'complex'), QPElement.QPElement('comment', 'comment', 'element', Comment.Comment, 'multiple'), )) # <!-- UML2Py end --> def __init__(self, publicID=None, **kwargs): super(Pick, self).__init__(publicID, **kwargs) self.elements.extend(self.addElements) # publicID has not been set in parent class if self.publicID is None: self.publicID = self.createPublicID(self.__class__.__name__, **kwargs) self._initMultipleElements()
class FocalMechanism(QPCore.QPPublicObject): """ QuakePy: FocalMechanism """ # <!-- UML2Py start --> addElements = QPElement.QPElementList(( QPElement.QPElement('publicID', 'publicID', 'attribute', unicode, 'basic'), QPElement.QPElement('triggeringOriginID', 'triggeringOriginID', 'element', unicode, 'basic'), QPElement.QPElement('nodalPlanes', 'nodalPlanes', 'element', NodalPlanes.NodalPlanes, 'complex'), QPElement.QPElement('principalAxes', 'principalAxes', 'element', PrincipalAxes.PrincipalAxes, 'complex'), QPElement.QPElement('azimuthalGap', 'azimuthalGap', 'element', float, 'basic'), QPElement.QPElement('stationPolarityCount', 'stationPolarityCount', 'element', int, 'basic'), QPElement.QPElement('misfit', 'misfit', 'element', float, 'basic'), QPElement.QPElement('stationDistributionRatio', 'stationDistributionRatio', 'element', float, 'basic'), QPElement.QPElement('methodID', 'methodID', 'element', unicode, 'basic'), QPElement.QPElement('evaluationMode', 'evaluationMode', 'element', unicode, 'enum'), QPElement.QPElement('evaluationStatus', 'evaluationStatus', 'element', unicode, 'enum'), QPElement.QPElement('creationInfo', 'creationInfo', 'element', CreationInfo.CreationInfo, 'complex'), QPElement.QPElement('momentTensor', 'momentTensor', 'element', MomentTensor.MomentTensor, 'multiple'), QPElement.QPElement('waveformID', 'waveformID', 'element', WaveformStreamID.WaveformStreamID, 'multiple'), QPElement.QPElement('comment', 'comment', 'element', Comment.Comment, 'multiple'), )) # <!-- UML2Py end --> def __init__(self, publicID=None, **kwargs): super(FocalMechanism, self).__init__(publicID, **kwargs) self.elements.extend(self.addElements) # publicID has not been set in parent class if self.publicID is None: self.publicID = self.createPublicID(self.__class__.__name__, **kwargs) self._initMultipleElements()
class Amplitude(QPCore.QPPublicObject): """ QuakePy: Amplitude """ # <!-- UML2Py start --> addElements = QPElement.QPElementList(( QPElement.QPElement('publicID', 'publicID', 'attribute', unicode, 'basic'), QPElement.QPElement('genericAmplitude', 'genericAmplitude', 'element', RealQuantity.RealQuantity, 'complex'), QPElement.QPElement('type', 'type', 'element', unicode, 'basic'), QPElement.QPElement('category', 'category', 'element', unicode, 'enum'), QPElement.QPElement('unit', 'unit', 'element', unicode, 'enum'), QPElement.QPElement('methodID', 'methodID', 'element', unicode, 'basic'), QPElement.QPElement('period', 'period', 'element', RealQuantity.RealQuantity, 'complex'), QPElement.QPElement('snr', 'snr', 'element', float, 'basic'), QPElement.QPElement('timeWindow', 'timeWindow', 'element', TimeWindow.TimeWindow, 'complex'), QPElement.QPElement('pickID', 'pickID', 'element', unicode, 'basic'), QPElement.QPElement('waveformID', 'waveformID', 'element', WaveformStreamID.WaveformStreamID, 'complex'), QPElement.QPElement('filterID', 'filterID', 'element', unicode, 'basic'), QPElement.QPElement('scalingTime', 'scalingTime', 'element', TimeQuantity.TimeQuantity, 'complex'), QPElement.QPElement('magnitudeHint', 'magnitudeHint', 'element', unicode, 'basic'), QPElement.QPElement('evaluationMode', 'evaluationMode', 'element', unicode, 'enum'), QPElement.QPElement('evaluationStatus', 'evaluationStatus', 'element', unicode, 'enum'), QPElement.QPElement('creationInfo', 'creationInfo', 'element', CreationInfo.CreationInfo, 'complex'), QPElement.QPElement('comment', 'comment', 'element', Comment.Comment, 'multiple'), )) # <!-- UML2Py end --> def __init__(self, publicID=None, **kwargs): super(Amplitude, self).__init__(publicID, **kwargs) self.elements.extend(self.addElements) # publicID has not been set in parent class if self.publicID is None: self.publicID = self.createPublicID(self.__class__.__name__, **kwargs) self._initMultipleElements()
class Event(QPCore.QPPublicObject): """ QuakePy: Event """ # <!-- UML2Py start --> addElements = QPElement.QPElementList(( QPElement.QPElement('publicID', 'publicID', 'attribute', unicode, 'basic'), QPElement.QPElement('preferredOriginID', 'preferredOriginID', 'element', unicode, 'basic'), QPElement.QPElement('preferredMagnitudeID', 'preferredMagnitudeID', 'element', unicode, 'basic'), QPElement.QPElement('preferredFocalMechanismID', 'preferredFocalMechanismID', 'element', unicode, 'basic'), QPElement.QPElement('type', 'type', 'element', unicode, 'enum'), QPElement.QPElement('typeCertainty', 'typeCertainty', 'element', unicode, 'enum'), QPElement.QPElement('creationInfo', 'creationInfo', 'element', CreationInfo.CreationInfo, 'complex'), QPElement.QPElement('focalMechanism', 'focalMechanism', 'element', FocalMechanism.FocalMechanism, 'multiple'), QPElement.QPElement('amplitude', 'amplitude', 'element', Amplitude.Amplitude, 'multiple'), QPElement.QPElement('magnitude', 'magnitude', 'element', Magnitude.Magnitude, 'multiple'), QPElement.QPElement('stationMagnitude', 'stationMagnitude', 'element', StationMagnitude.StationMagnitude, 'multiple'), QPElement.QPElement('origin', 'origin', 'element', Origin.Origin, 'multiple'), QPElement.QPElement('pick', 'pick', 'element', Pick.Pick, 'multiple'), QPElement.QPElement('description', 'description', 'element', EventDescription.EventDescription, 'multiple'), QPElement.QPElement('comment', 'comment', 'element', Comment.Comment, 'multiple'), )) # <!-- UML2Py end --> def __init__(self, publicID=None, **kwargs): super(Event, self).__init__(publicID, **kwargs) self.elements.extend(self.addElements) # publicID has not been set in parent class if self.publicID is None: self.publicID = self.createPublicID(self.__class__.__name__, **kwargs) self._initMultipleElements() def getPreferredOriginIdx(self): if (not hasattr(self, 'origin')) or len(self.origin) == 0: return None elif len(self.origin) == 1: return 0 else: for curr_ori_idx, curr_ori in enumerate(self.origin): if self.preferredOriginID == curr_ori.publicID: return curr_ori_idx # no origin found raise IndexError, "Event::getPreferredOriginIdx - origin not found" def getPreferredOrigin(self): idx = self.getPreferredOriginIdx() if idx is not None: return self.origin[idx] else: raise IndexError, "Event::getPreferredOrigin - origin not found" def getPreferredMagnitudeIdx(self): if (not hasattr(self, 'magnitude')) or len(self.magnitude) == 0: return None elif len(self.magnitude) == 1: return 0 else: for curr_mag_idx, curr_mag in enumerate(self.magnitude): if self.preferredMagnitudeID == curr_mag.publicID: return curr_mag_idx # no magnitude found raise IndexError, "Event::getPreferredMagnitudeIdx - magnitude not found" def getPreferredMagnitude(self): idx = self.getPreferredMagnitudeIdx() if idx is not None: return self.magnitude[idx] else: raise IndexError, "Event::getPreferredMagnitude - magnitude not found" def getPreferredFocalMechanismIdx(self): if (not hasattr(self, 'focalMechanism')) or len( self.focalMechanism) == 0: return None elif len(self.focalMechanism) == 1: return 0 else: for curr_fm_idx, curr_fm in enumerate(self.focalMechanism): if self.preferredFocalMechanismID == curr_fm.publicID: return curr_fm_idx # no focalMechanism found raise IndexError, "Event::getPreferredFocalMechanismIdx - focalMechanism not found" def getPreferredFocalMechanism(self): idx = self.getPreferredFocalMechanismIdx() if idx is not None: return self.focalMechanism[idx] else: raise IndexError, "Event::getPreferredFocalMechanism - focalMechanism not found" def getOriginIdx(self, ori): """ input: ori, can either be Origin instance or publicID of origin """ if not isinstance(ori, Origin.Origin): lookForInstance = False else: lookForInstance = True for curr_ori_idx, curr_ori in enumerate(self.origin): if lookForInstance: if ori == curr_ori: return curr_ori_idx else: if ori == curr_ori.publicID: return curr_ori_idx return None def getOrigin(self, ori): """ input: ori, can either be Origin instance or publicID of origin """ ori_idx = self.getOriginIdx(ori) if ori_idx is not None: return self.origin[ori_idx] else: return None def getMagnitudesIdx(self, ori): mag_idx = [] for curr_mag_idx, curr_mag in enumerate(self.magnitude): if curr_mag.originID == ori.publicID: mag_idx.append(curr_mag_idx) return mag_idx def getMagnitudes(self, ori): magnitudes = [] for mag in self.magnitude: if mag.originID == ori.publicID: magnitudes.append(mag) return magnitudes