Exemple #1
0
 def setUp(self):
     # directory where the test files are located
     self.path = os.path.join(os.path.dirname(__file__), 'images')
     self.ppsd = _get_ppsd()
Exemple #2
0
 def setUp(self):
     # directory where the test files are located
     self.path = os.path.join(os.path.dirname(__file__), 'images')
     self.ppsd = _get_ppsd()
Exemple #3
0
# -*- coding: utf-8 -*-
"""
Image test(s) for obspy.signal.spectral_exstimation.PPSD.
"""
from __future__ import (absolute_import, division, print_function,
                        unicode_literals)
from future.builtins import *  # NOQA

from obspy.core.util.testing import ImageComparison
from obspy.signal.tests.test_spectral_estimation import _get_ppsd
from copy import deepcopy
import os
import unittest


ppsd = _get_ppsd()


class PPSDTestCase(unittest.TestCase):
    """
    Test cases for PPSD plotting.
    """
    def setUp(self):
        # directory where the test files are located
        self.path = os.path.join(os.path.dirname(__file__), 'images')
        self.ppsd = deepcopy(ppsd)

    def test_ppsd_plot(self):
        """
        """
        with ImageComparison(self.path, 'ppsd.png') as ic:
Exemple #4
0
# -*- coding: utf-8 -*-
"""
Image test(s) for obspy.signal.spectral_exstimation.PPSD.
"""
from __future__ import (absolute_import, division, print_function,
                        unicode_literals)
from future.builtins import *  # NOQA

from obspy.core.util.testing import ImageComparison, HAS_COMPARE_IMAGE
from obspy.core.util.decorator import skipIf
from obspy.signal.tests.test_spectral_estimation import _get_ppsd
from copy import deepcopy
import os
import unittest

ppsd = _get_ppsd()


class PPSDTestCase(unittest.TestCase):
    """
    Test cases for PPSD plotting.
    """
    def setUp(self):
        # directory where the test files are located
        self.path = os.path.join(os.path.dirname(__file__), 'images')
        self.ppsd = deepcopy(ppsd)

    @skipIf(not HAS_COMPARE_IMAGE, 'nose not installed or matplotlib too old')
    def test_ppsd_plot(self):
        """
        """