Commit 2e999882 authored by Felix Delattre's avatar Felix Delattre

initial commit migrated from old subversion repository

parents
# -*- coding: iso-8859-1 -*-
#
# quakepy/Amplitude.py
# $Id: Amplitude.py 683 2009-02-16 11:15:52Z fab $
#
# The QuakePy package
# http://www.quakepy.org
#
############################################################################
# Copyright (C) 2007-2009 by Fabian Euchner and Danijel Schorlemmer #
# fabian@fabian-euchner.de #
# #
# This program is free software; you can redistribute it and#or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program; if not, write to the #
# Free Software Foundation, Inc., #
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #
############################################################################
"""
The QuakePy package
http://www.quakepy.org
"""
__version__ = '$Id: Amplitude.py 683 2009-02-16 11:15:52Z fab $'
__revision__ = '$Revision: 683 $'
__author__ = "Fabian Euchner <fabian@fabian-euchner.de>, Danijel Schorlemmer <ds@usc.edu>"
__license__ = "GPL"
from QPCore import *
from RealQuantity import RealQuantity
from IntegerQuantity import IntegerQuantity
from TimeQuantity import TimeQuantity
from TimeWindow import TimeWindow
from WaveformStreamID import WaveformStreamID
from CreationInfo import CreationInfo
from Comment import Comment
class Amplitude( QPPublicObject ):
"""
QuakePy: Amplitude
"""
# <!-- UML2Py start -->
addElements = QPElementList( (
QPElement( 'publicID', 'publicID', 'attribute', unicode, 'basic' ),
QPElement( 'type', 'type', 'element', unicode, 'basic' ),
QPElement( 'pickID', 'pickID', 'element', unicode, 'basic' ),
QPElement( 'filterID', 'filterID', 'element', unicode, 'basic' ),
QPElement( 'methodID', 'methodID', 'element', unicode, 'basic' ),
QPElement( 'magnitudeHint', 'magnitudeHint', 'element', unicode, 'basic' ),
QPElement( 'evaluationMode', 'evaluationMode', 'element', unicode, 'enum' ),
QPElement( 'amp', 'amp', 'element', RealQuantity, 'complex' ),
QPElement( 'period', 'period', 'element', RealQuantity, 'complex' ),
QPElement( 'waveformID', 'waveformID', 'element', WaveformStreamID, 'complex' ),
QPElement( 'timeWindow', 'timeWindow', 'element', TimeWindow, 'complex' ),
QPElement( 'scalingTime', 'scalingTime', 'element', TimeQuantity, 'complex' ),
QPElement( 'creationInfo', 'creationInfo', 'element', CreationInfo, 'complex' ),
QPElement( 'comment', 'comment', 'element', 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()
# -*- coding: iso-8859-1 -*-
#
# quakepy/Arrival.py
# $Id: Arrival.py 683 2009-02-16 11:15:52Z fab $
#
# The QuakePy package
# http://www.quakepy.org
#
############################################################################
# Copyright (C) 2007-2009 by Fabian Euchner and Danijel Schorlemmer #
# fabian@fabian-euchner.de #
# #
# This program is free software; you can redistribute it and#or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program; if not, write to the #
# Free Software Foundation, Inc., #
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #
############################################################################
"""
The QuakePy package
http://www.quakepy.org
"""
__version__ = '$Id: Arrival.py 683 2009-02-16 11:15:52Z fab $'
__revision__ = '$Revision: 683 $'
__author__ = "Fabian Euchner <fabian@fabian-euchner.de>, Danijel Schorlemmer <ds@usc.edu>"
__license__ = "GPL"
from QPCore import *
from Phase import Phase
from CreationInfo import CreationInfo
from Comment import Comment
class Arrival( QPObject ):
"""
QuakePy: Arrival
"""
# <!-- UML2Py start -->
addElements = QPElementList( (
QPElement( 'pickID', 'pickID', 'element', unicode, 'basic' ),
QPElement( 'timeCorrection', 'timeCorrection', 'element', float, 'basic' ),
QPElement( 'azimuth', 'azimuth', 'element', float, 'basic' ),
QPElement( 'distance', 'distance', 'element', float, 'basic' ),
QPElement( 'residual', 'residual', 'element', float, 'basic' ),
QPElement( 'weight', 'weight', 'element', float, 'basic' ),
QPElement( 'earthModelID', 'earthModelID', 'element', unicode, 'basic' ),
QPElement( 'phase', 'phase', 'element', Phase, 'complex' ),
QPElement( 'creationInfo', 'creationInfo', 'element', CreationInfo, 'complex' ),
QPElement( 'comment', 'comment', 'element', Comment, 'multiple' )
) )
# <!-- UML2Py end -->
def __init__( self, **kwargs ):
super( Arrival, self ).__init__( **kwargs )
self.elements.extend( self.addElements )
self._initMultipleElements()
# -*- coding: iso-8859-1 -*-
#
# quakepy/Axis.py
# $Id: Axis.py 683 2009-02-16 11:15:52Z fab $
#
# The QuakePy package
# http://www.quakepy.org
#
############################################################################
# Copyright (C) 2007-2009 by Fabian Euchner and Danijel Schorlemmer #
# fabian@fabian-euchner.de #
# #
# This program is free software; you can redistribute it and#or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program; if not, write to the #
# Free Software Foundation, Inc., #
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #
############################################################################
"""
The QuakePy package
http://www.quakepy.org
"""
__version__ = '$Id: Axis.py 683 2009-02-16 11:15:52Z fab $'
__revision__ = '$Revision: 683 $'
__author__ = "Fabian Euchner <fabian@fabian-euchner.de>, Danijel Schorlemmer <ds@usc.edu>"
__license__ = "GPL"
from QPCore import *
from RealQuantity import RealQuantity
class Axis( QPObject ):
"""
QuakePy: Axis
"""
# <!-- UML2Py start -->
addElements = QPElementList( (
QPElement( 'azimuth', 'azimuth', 'element', RealQuantity, 'complex' ),
QPElement( 'plunge', 'plunge', 'element', RealQuantity, 'complex' ),
QPElement( 'length', 'length', 'element', 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._initMultipleElements()
self.azimuth = azimuth
self.plunge = plunge
self.length = length
Version 0.1 - September 11, 2007
* initial check-in: read/write QuakeML catalogs, cut catalog
\ No newline at end of file
# -------------------------------------------------------------------
# COPYRIGHT NOTICE
# -------------------------------------------------------------------
# Copyright (c) 2007 Fabian Euchner <fabian@fabian-euchner.de>
# Danijel Schorlemmer <ds@usc.edu>
#
# All Rights Reserved.
# -*- coding: iso-8859-1 -*-
#
# quakepy/Comment.py
# $Id: Comment.py 683 2009-02-16 11:15:52Z fab $
#
# The QuakePy package
# http://www.quakepy.org
#
############################################################################
# Copyright (C) 2007-2009 by Fabian Euchner and Danijel Schorlemmer #
# fabian@fabian-euchner.de #
# #
# This program is free software; you can redistribute it and#or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program; if not, write to the #
# Free Software Foundation, Inc., #
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #
############################################################################
"""
The QuakePy package
http://www.quakepy.org
"""
__version__ = '$Id: Comment.py 683 2009-02-16 11:15:52Z fab $'
__revision__ = '$Revision: 683 $'
__author__ = "Fabian Euchner <fabian@fabian-euchner.de>, Danijel Schorlemmer <ds@usc.edu>"
__license__ = "GPL"
from QPCore import *
from CreationInfo import CreationInfo
class Comment( QPObject ):
"""
QuakePy: Comment
"""
# <!-- UML2Py start -->
addElements = QPElementList( (
QPElement( 'id', 'id', 'attribute', unicode, 'basic' ),
QPElement( 'text', 'text', 'element', unicode, 'basic' ),
QPElement( 'creationInfo', 'creationInfo', 'element', 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 # id is an XML attribute
self.creationInfo = creationInfo
# -*- coding: iso-8859-1 -*-
#
# quakepy/CompositeTime.py
# $Id: CompositeTime.py 683 2009-02-16 11:15:52Z fab $
#
# The QuakePy package
# http://www.quakepy.org
#
############################################################################
# Copyright (C) 2007-2009 by Fabian Euchner and Danijel Schorlemmer #
# fabian@fabian-euchner.de #
# #
# This program is free software; you can redistribute it and#or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program; if not, write to the #
# Free Software Foundation, Inc., #
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #
############################################################################
"""
The QuakePy package
http://www.quakepy.org
"""
__version__ = '$Id: CompositeTime.py 683 2009-02-16 11:15:52Z fab $'
__revision__ = '$Revision: 683 $'
__author__ = "Fabian Euchner <fabian@fabian-euchner.de>, Danijel Schorlemmer <ds@usc.edu>"
__license__ = "GPL"
from QPCore import *
from RealQuantity import RealQuantity
from IntegerQuantity import IntegerQuantity
class CompositeTime( QPObject ):
"""
QuakePy: CompositeTime
"""
# <!-- UML2Py start -->
addElements = QPElementList( (
QPElement( 'differenceToUTC', 'differenceToUTC', 'element', float, 'basic' ),
QPElement( 'year', 'year', 'element', IntegerQuantity, 'complex' ),
QPElement( 'month', 'month', 'element', IntegerQuantity, 'complex' ),
QPElement( 'day', 'day', 'element', IntegerQuantity, 'complex' ),
QPElement( 'hour', 'hour', 'element', IntegerQuantity, 'complex' ),
QPElement( 'minute', 'minute', 'element', IntegerQuantity, 'complex' ),
QPElement( 'second', 'second', 'element', RealQuantity, 'complex' )
) )
# <!-- UML2Py end -->
def __init__( self, **kwargs ):
super( CompositeTime, self ).__init__( **kwargs )
self.elements.extend( self.addElements )
self._initMultipleElements()
# -*- coding: iso-8859-1 -*-
#
# quakepy/ConfidenceEllipsoid.py
# $Id: ConfidenceEllipsoid.py 683 2009-02-16 11:15:52Z fab $
#
# The QuakePy package
# http://www.quakepy.org
#
############################################################################
# Copyright (C) 2007-2009 by Fabian Euchner and Danijel Schorlemmer #
# fabian@fabian-euchner.de #
# #
# This program is free software; you can redistribute it and#or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program; if not, write to the #
# Free Software Foundation, Inc., #
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #
############################################################################
"""
The QuakePy package
http://www.quakepy.org
"""
__version__ = '$Id: ConfidenceEllipsoid.py 683 2009-02-16 11:15:52Z fab $'
__revision__ = '$Revision: 683 $'
__author__ = "Fabian Euchner <fabian@fabian-euchner.de>, Danijel Schorlemmer <ds@usc.edu>"
__license__ = "GPL"
import pyRXP
from QPCore import *
class ConfidenceEllipsoid( QPObject ):
"""
QuakePy: ConfidenceEllipsoid
"""
# <!-- UML2Py start -->
addElements = QPElementList( (
QPElement( 'azimuth1', 'azimuth1', 'element', float, 'basic' ),
QPElement( 'dip1', 'dip1', 'element', float, 'basic' ),
QPElement( 'standardError1', 'standardError1', 'element', float, 'basic' ),
QPElement( 'azimuth2', 'azimuth2', 'element', float, 'basic' ),
QPElement( 'dip2', 'dip2', 'element', float, 'basic' ),
QPElement( 'standardError2', 'standardError2', 'element', float, 'basic' ),
QPElement( 'standardError3', 'standardError3', 'element', float, 'basic' )
) )
# <!-- UML2Py end -->
def __init__( self, **kwargs ):
super( ConfidenceEllipsoid, self ).__init__( **kwargs )
self.elements.extend( self.addElements )
self._initMultipleElements()
# -*- coding: iso-8859-1 -*-
#
# quakepy/CreationInfo.py
# $Id: CreationInfo.py 683 2009-02-16 11:15:52Z fab $
#
# The QuakePy package
# http://www.quakepy.org
#
############################################################################
# Copyright (C) 2007-2009 by Fabian Euchner and Danijel Schorlemmer #
# fabian@fabian-euchner.de #
# #
# This program is free software; you can redistribute it and#or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program; if not, write to the #
# Free Software Foundation, Inc., #
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #
############################################################################
"""
The QuakePy package
http://www.quakepy.org
"""
__version__ = '$Id: CreationInfo.py 683 2009-02-16 11:15:52Z fab $'
__revision__ = '$Revision: 683 $'
__author__ = "Fabian Euchner <fabian@fabian-euchner.de>, Danijel Schorlemmer <ds@usc.edu>"
__license__ = "GPL"
from QPCore import *
from QPDateTime import *
class CreationInfo( QPObject ):
"""
QuakePy: CreationInfo
"""
# <!-- UML2Py start -->
addElements = QPElementList( (
QPElement( 'agencyID', 'agencyID', 'element', unicode, 'basic' ),
QPElement( 'agencyURI', 'agencyURI', 'element', unicode, 'basic' ),
QPElement( 'author', 'author', 'element', unicode, 'basic' ),
QPElement( 'authorURI', 'authorURI', 'element', unicode, 'basic' ),
QPElement( 'version', 'version', 'element', unicode, 'basic' ),
QPElement( 'creationTime', 'creationTime', 'element', QPDateTime, '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._initMultipleElements()
self.agencyID = agencyID
self.agencyURI = agencyURI
self.author = author
self.authorURI = authorURI
self.version = version
if creationTime is not None:
self.creationTime = QPDateTime( creationTime )
# -*- coding: iso-8859-1 -*-
#
# quakepy/DataUsed.py
# $Id: DataUsed.py 683 2009-02-16 11:15:52Z fab $
#
# The QuakePy package
# http://www.quakepy.org
#
############################################################################
# Copyright (C) 2007-2009 by Fabian Euchner and Danijel Schorlemmer #
# fabian@fabian-euchner.de #
# #
# This program is free software; you can redistribute it and#or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program; if not, write to the #
# Free Software Foundation, Inc., #
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #
############################################################################
"""
The QuakePy package
http://www.quakepy.org
"""
__version__ = '$Id: DataUsed.py 683 2009-02-16 11:15:52Z fab $'
__revision__ = '$Revision: 683 $'
__author__ = "Fabian Euchner <fabian@fabian-euchner.de>, Danijel Schorlemmer <ds@usc.edu>"
__license__ = "GPL"
import pyRXP
from QPCore import *
from RealQuantity import RealQuantity
from IntegerQuantity import IntegerQuantity
from TimeQuantity import TimeQuantity
POS_TAGNAME, POS_ATTRS, POS_CHILDREN = range(3)
class DataUsed( QPObject ):
"""
QuakePy: DataUsed
"""
# <!-- UML2Py start -->
addElements = QPElementList( (
QPElement( 'waveType', 'waveType', 'element', unicode, 'basic' ),
QPElement( 'stationCount', 'stationCount', 'element', int, 'basic' ),
QPElement( 'componentCount', 'componentCount', 'element', int, 'basic' ),
QPElement( 'shortestPeriod', 'shortestPeriod', 'element', float, 'basic' )
) )
# <!-- UML2Py end -->
def __init__( self, wavetype = None, sta_cnt = None, comp_cnt = None, shortest_period = None, **kwargs ):
super( DataUsed, self ).__init__( **kwargs )
self.elements.extend( self.addElements )
self._initMultipleElements()
self.waveType = wavetype
self.stationCount = sta_cnt
self.componentCount = comp_cnt
self.shortestPeriod = shortest_period
# -*- coding: iso-8859-1 -*-
#
# quakepy/Event.py
# $Id: Event.py 779 2009-11-23 15:35:10Z fab $
#
# The QuakePy package
# http://www.quakepy.org
#
############################################################################
# Copyright (C) 2007-2009 by Fabian Euchner and Danijel Schorlemmer #
# fabian@fabian-euchner.de #
# #
# This program is free software; you can redistribute it and#or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #