Coverage for /usr/local/lib/python3.11/dist-packages/pyrocko/__init__.py: 36%

33 statements  

« prev     ^ index     » next       coverage.py v6.5.0, created at 2023-10-23 12:34 +0000

1# https://pyrocko.org - GPLv3 

2# 

3# The Pyrocko Developers, 21st Century 

4# ---|P------/S----------~Lg---------- 

5 

6''' 

7A toolbox and library for seismology. 

8''' 

9 

10try: 

11 from .info import * # noqa 

12 __version__ = version # noqa 

13except ImportError: 

14 pass # not available in dev mode 

15 

16grumpy = 0 # noqa 

17 

18 

19def get_logger(): 

20 from .util import logging 

21 return logging.getLogger('pyrocko') 

22 

23 

24class ExternalProgramMissing(Exception): 

25 pass 

26 

27 

28def make_squirrel(*args, **kwargs): 

29 from pyrocko.squirrel import Squirrel 

30 return Squirrel(*args, **kwargs) 

31 

32 

33def snuffle(*args, **kwargs): 

34 ''' 

35 Start Snuffler. 

36 

37 Calls :py:func:`pyrocko.gui.snuffler.snuffler.snuffle` 

38 ''' 

39 

40 from pyrocko import deps 

41 

42 deps.require('PyQt5.Qt') 

43 deps.require('PyQt5.QtWebEngine') 

44 

45 from pyrocko.gui.snuffler import snuffler 

46 return snuffler.snuffle(*args, **kwargs) 

47 

48 

49def sparrow(*args, **kwargs): 

50 ''' 

51 Start Sparrow. 

52 

53 Calls :py:func:`pyrocko.gui.sparrow.main`. 

54 ''' 

55 

56 from pyrocko import deps 

57 

58 deps.require('vtk') 

59 deps.require('PyQt5.Qt') 

60 # deps.import_optional('kite', 'InSAR visualization') 

61 

62 from pyrocko.gui.sparrow.main import main 

63 return main(*args, **kwargs) 

64 

65 

66def drum(*args, **kwargs): 

67 ''' 

68 Start Drum Plot. 

69 

70 Calls :py:func:`pyrocko.gui.drum.main`. 

71 ''' 

72 

73 from pyrocko import deps 

74 

75 deps.require('PyQt5.Qt') 

76 deps.require('serial') 

77 

78 from pyrocko.gui.drum.main import main 

79 return main(*args, **kwargs)