Changeset 1185 for SHX


Ignore:
Timestamp:
20.02.2016 16:04:38 (4 years ago)
Author:
klaus
Message:

name and import changes after obspy update

Location:
SHX/trunk/SeismicHandler
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • SHX/trunk/SeismicHandler/basics/analysispar.py

    r1180 r1185  
    1515from SeismicHandler.basics.error import ShxError 
    1616from obspy.core import UTCDateTime 
    17 from obspy.sh.core import toUTCDateTime, fromUTCDateTime 
     17try: 
     18    # older obspy version 
     19    from obspy.sh.core import toUTCDateTime, fromUTCDateTime 
     20except: 
     21    from obspy.io.sh.core import to_utcdatetime as toUTCDateTime 
     22    from obspy.io.sh.core import from_utcdatetime as fromUTCDateTime 
    1823 
    1924PICKTYPE_MANUAL = 1 
  • SHX/trunk/SeismicHandler/basics/tools.py

    r1171 r1185  
    77import time 
    88from obspy.core import AttribDict, UTCDateTime 
    9 from obspy.sh.core import toUTCDateTime 
     9try: 
     10    # older obspy version 
     11    from obspy.sh.core import toUTCDateTime 
     12except: 
     13    from obspy.io.sh.core import to_utcdatetime as toUTCDateTime 
    1014 
    1115__all__ = ["Property", "Singleton","timeit","timestore"] 
  • SHX/trunk/SeismicHandler/commands/al.py

    r1172 r1185  
    1010from SeismicHandler.basics import timeit 
    1111from SeismicHandler.modules.traces import traces_from_list 
    12 from obspy.sh.core import toUTCDateTime 
     12try: 
     13    # older obspy version 
     14    from obspy.sh.core import toUTCDateTime 
     15except: 
     16    from obspy.io.sh.core import to_utcdatetime as toUTCDateTime 
    1317 
    1418provides = {"al": "al"} 
  • SHX/trunk/SeismicHandler/commands/calc.py

    r1172 r1185  
    2222from SeismicHandler.utils import formatstring 
    2323from obspy.core import UTCDateTime 
    24 from obspy.sh.core import toUTCDateTime, fromUTCDateTime 
     24try: 
     25    # older obspy version 
     26    from obspy.sh.core import toUTCDateTime, fromUTCDateTime 
     27except: 
     28    from obspy.io.sh.core import to_utcdatetime as toUTCDateTime 
     29    from obspy.io.sh.core import from_utcdatetime as fromUTCDateTime 
    2530 
    2631provides = {"calc": "calc"} 
  • SHX/trunk/SeismicHandler/commands/call.py

    r1172 r1185  
    1212from SeismicHandler.basics import timeit 
    1313from SeismicHandler.modules.traveltime import LocalTravelTime, TaupiTravelTime 
    14 from obspy.sh.core import toUTCDateTime, fromUTCDateTime 
    1514from obspy.core.util.geodetics import gps2DistAzimuth 
     15try: 
     16    # older obspy version 
     17    from obspy.sh.core import toUTCDateTime, fromUTCDateTime 
     18except: 
     19    from obspy.io.sh.core import to_utcdatetime as toUTCDateTime 
     20    from obspy.io.sh.core import from_utcdatetime as fromUTCDateTime 
    1621 
    1722DEG_TO_KM = 111.19 
  • SHX/trunk/SeismicHandler/commands/compare_location.py

    r1169 r1185  
    99from SeismicHandler.modules.seismics import locateTeleEvent, compareLocation 
    1010from SeismicHandler.config import Settings 
    11 from obspy.sh.core import toUTCDateTime 
     11try: 
     12    # older obspy version 
     13    from obspy.sh.core import toUTCDateTime 
     14except: 
     15    from obspy.io.sh.core import to_utcdatetime as toUTCDateTime 
    1216 
    1317 
  • SHX/trunk/SeismicHandler/commands/events.py

    r1171 r1185  
    1313from obspy.core.util.geodetics import gps2DistAzimuth 
    1414from obspy.taup import TauPyModel 
    15 from obspy.sh.core import toUTCDateTime, fromUTCDateTime 
     15try: 
     16    # older obspy version 
     17    from obspy.sh.core import toUTCDateTime, fromUTCDateTime 
     18except: 
     19    from obspy.io.sh.core import to_utcdatetime as toUTCDateTime 
     20    from obspy.io.sh.core import from_utcdatetime as fromUTCDateTime 
    1621 
    1722DEG_TO_KM = 111.19 
  • SHX/trunk/SeismicHandler/commands/fdsnws.py

    r1176 r1185  
    1515from SeismicHandler.modules.stations import ChannelMeta, Stations, \ 
    1616    resolveStations 
    17 from obspy.sh.core import toUTCDateTime, UTCDateTime 
     17from obspy.core import UTCDateTime 
    1818from obspy.fdsn.client import Client 
     19try: 
     20    # older obspy version 
     21    from obspy.sh.core import toUTCDateTime 
     22except: 
     23    from obspy.io.sh.core import to_utcdatetime as toUTCDateTime 
    1924 
    2025provides = {"fdsnws": "fdsnws"} 
  • SHX/trunk/SeismicHandler/commands/fetch.py

    r1171 r1185  
    1515                                                                       Stations 
    1616from obspy.core import Stream 
    17 from obspy.sh.core import toUTCDateTime 
    1817from obspy.arclink.client import Client 
     18try: 
     19    # older obspy version 
     20    from obspy.sh.core import toUTCDateTime 
     21except: 
     22    from obspy.io.sh.core import to_utcdatetime as toUTCDateTime 
    1923 
    2024 
  • SHX/trunk/SeismicHandler/commands/fetch_area.py

    r1171 r1185  
    1616from SeismicHandler.modules.stations import resolveStations, ChannelMeta, \ 
    1717                                                                       Stations 
    18 from obspy.core import Stream 
    19 from obspy.sh.core import toUTCDateTime, UTCDateTime 
     18from obspy.core import Stream, UTCDateTime 
    2019from obspy.arclink.client import Client 
     20try: 
     21    # older obspy version 
     22    from obspy.sh.core import toUTCDateTime 
     23except: 
     24    from obspy.io.sh.core import to_utcdatetime as toUTCDateTime 
    2125 
    2226import fetch 
  • SHX/trunk/SeismicHandler/commands/magnitude.py

    r1171 r1185  
    1616from SeismicHandler.basics.messages import set_infodisplay 
    1717from SeismicHandler.modules.traces import traces_from_list, getDistance 
    18 from obspy.sh.core import toUTCDateTime, fromUTCDateTime 
    1918import matplotlib.pyplot as plt 
     19try: 
     20    # older obspy version 
     21    from obspy.sh.core import toUTCDateTime, fromUTCDateTime 
     22except: 
     23    from obspy.io.sh.core import to_utcdatetime as toUTCDateTime 
     24    from obspy.io.sh.core import from_utcdatetime as fromUTCDateTime 
    2025 
    2126DEG_TO_KM = 111.19 
  • SHX/trunk/SeismicHandler/commands/mark.py

    r1172 r1185  
    1111from SeismicHandler.basics import timeit 
    1212from SeismicHandler.modules.traces import addNetcode 
    13 from obspy.sh.core import toUTCDateTime, fromUTCDateTime 
     13try: 
     14    # older obspy version 
     15    from obspy.sh.core import toUTCDateTime, fromUTCDateTime 
     16except: 
     17    from obspy.io.sh.core import to_utcdatetime as toUTCDateTime 
     18    from obspy.io.sh.core import from_utcdatetime as fromUTCDateTime 
    1419 
    1520provides = {"mark": "mark"} 
  • SHX/trunk/SeismicHandler/commands/phase.py

    r1172 r1185  
    66 
    77import os 
     8import matplotlib.pyplot as plt 
     9import numpy as np 
    810from SeismicHandler.basics.command import BaseCommand 
    911from SeismicHandler.basics.analysispar import PhaseList, AnalysisPar 
     
    1315from SeismicHandler.modules.traces import addNetcode, number_of_visible_traces,\ 
    1416    getDistance 
    15 from obspy.sh.core import toUTCDateTime, fromUTCDateTime 
    1617from SeismicHandler.config import Settings 
    17 import matplotlib.pyplot as plt 
    18 import numpy as np 
     18try: 
     19    # older obspy version 
     20    from obspy.sh.core import toUTCDateTime, fromUTCDateTime 
     21except: 
     22    from obspy.io.sh.core import to_utcdatetime as toUTCDateTime 
     23    from obspy.io.sh.core import from_utcdatetime as fromUTCDateTime 
    1924 
    2025DEG_TO_KM = 111.19 
  • SHX/trunk/SeismicHandler/commands/readl.py

    r1180 r1185  
    1212from SeismicHandler.modules.stations import Stations, resolveStations 
    1313from SeismicHandler.basics.messages import msgs 
    14 from obspy.sh.core import toUTCDateTime, UTCDateTime 
     14try: 
     15    # older obspy version 
     16    from obspy.sh.core import toUTCDateTime, fromUTCDateTime 
     17except: 
     18    from obspy.io.sh.core import to_utcdatetime as toUTCDateTime 
     19    from obspy.io.sh.core import from_utcdatetime as fromUTCDateTime 
    1520 
    1621provides = {"readl": "readl"} 
  • SHX/trunk/SeismicHandler/commands/reads.py

    r1172 r1185  
    1313from SeismicHandler.config import Settings 
    1414from obspy.core import read 
    15 from obspy.sh.core import toUTCDateTime 
     15try: 
     16    # older obspy version 
     17    from obspy.sh.core import toUTCDateTime 
     18except: 
     19    from obspy.io.sh.core import to_utcdatetime as toUTCDateTime 
    1620 
    1721 
  • SHX/trunk/SeismicHandler/commands/theophase.py

    r1172 r1185  
    1414from SeismicHandler.basics.analysispar import AnalysisPar, PhaseList 
    1515from SeismicHandler.modules.stations import Stations 
    16 from obspy.sh.core import toUTCDateTime 
     16try: 
     17    # older obspy version 
     18    from obspy.sh.core import toUTCDateTime 
     19except: 
     20    from obspy.io.sh.core import to_utcdatetime as toUTCDateTime 
    1721 
    1822DEG_TO_KM = 111.19 
  • SHX/trunk/SeismicHandler/modules/miniseed.py

    r1035 r1185  
    1313from SeismicHandler.config import Settings 
    1414from obspy.core import AttribDict 
    15 from obspy.sh.core import toUTCDateTime 
     15try: 
     16    # older obspy version 
     17    from obspy.sh.core import toUTCDateTime 
     18except: 
     19    from obspy.io.sh.core import to_utcdatetime as toUTCDateTime 
    1620 
    1721 
  • SHX/trunk/SeismicHandler/modules/wx_.py

    r1180 r1185  
    2121from SeismicHandler.basics.analysispar import PhaseList, AnalysisPar 
    2222from obspy.core import read, UTCDateTime 
    23 from obspy.sh.core import fromUTCDateTime, toUTCDateTime 
     23try: 
     24    # older obspy version 
     25    from obspy.sh.core import toUTCDateTime, fromUTCDateTime 
     26except: 
     27    from obspy.io.sh.core import to_utcdatetime as toUTCDateTime 
     28    from obspy.io.sh.core import from_utcdatetime as fromUTCDateTime 
     29 
    2430 
    2531# width of station info 
  • SHX/trunk/SeismicHandler/modules/wxdialog.py

    r1180 r1185  
    1111from SeismicHandler.basics.tools import EventTextParser 
    1212from obspy.core import UTCDateTime 
    13 from obspy.sh.core import fromUTCDateTime, toUTCDateTime 
     13try: 
     14    # older obspy version 
     15    from obspy.sh.core import toUTCDateTime, fromUTCDateTime 
     16except: 
     17    from obspy.io.sh.core import to_utcdatetime as toUTCDateTime 
     18    from obspy.io.sh.core import from_utcdatetime as fromUTCDateTime 
    1419 
    1520 
  • SHX/trunk/SeismicHandler/patches/obspy_.py

    r1148 r1185  
    1818from obspy.core import Stream, Trace 
    1919from obspy.core.util import AttribDict 
    20 from obspy.sh.core import fromUTCDateTime, toUTCDateTime 
    2120from SeismicHandler.config import get_runtime 
    2221from SeismicHandler.basics.messages import log_message #, get_runtime 
     
    2524from SeismicHandler.utils import nearest_int 
    2625from SeismicHandler.basics import timeit, timestore 
     26try: 
     27    # older obspy version 
     28    from obspy.sh.core import toUTCDateTime, fromUTCDateTime 
     29except: 
     30    from obspy.io.sh.core import to_utcdatetime as toUTCDateTime 
     31    from obspy.io.sh.core import from_utcdatetime as fromUTCDateTime 
     32 
    2733 
    2834__all__ = [] 
Note: See TracChangeset for help on using the changeset viewer.