Beispiel #1
0
    def setUp(self):
        self.job = self.setup_classic_job()

        gmfs = [{
            Site(-117, 40): {
                "groundMotion": 0.1
            },
            Site(-117, 41): {
                "groundMotion": 0.2
            },
        }, {
            Site(-117, 40): {
                "groundMotion": 0.5
            },
            Site(-117, 41): {
                "groundMotion": 0.6
            },
        }, {
            Site(-117, 40): {
                "groundMotion": 1.0
            },
            Site(-117, 41): {
                "groundMotion": 1.1
            },
        }]

        for gmf in gmfs:
            output_path = self.generate_output_path(self.job)
            hcw = GmfDBWriter(output_path, self.job.id)
            hcw.serialize(gmf)
    def test_serialize_small(self):
        data = GMF_DATA(20, 4)

        self.job = self.setup_classic_job()
        output_path = self.generate_output_path(self.job)

        for i in xrange(0, 10):
            gmfw = GmfDBWriter(output_path + str(i), self.job.id)

            # Call the function under test.
            gmfw.serialize(data)
    def test_serialize_small(self):
        data = GMF_DATA(20, 4)

        self.job = self.setup_classic_job()
        output_path = self.generate_output_path(self.job)

        for i in xrange(0, 10):
            gmfw = GmfDBWriter(output_path + str(i), self.job.id)

            # Call the function under test.
            gmfw.serialize(data)
Beispiel #4
0
    def setUp(self):
        self.job = self.setup_classic_job()
        output_path = self.generate_output_path(self.job)
        self.display_name = os.path.basename(output_path)

        self.writer = GmfDBWriter(output_path, self.job.id)
        self.reader = GmfDBReader()
    def setUp(self):
        self.job = self.setup_classic_job()

        gmfs = [
        {
            Site(-117, 40): {"groundMotion": 0.1},
            Site(-117, 41): {"groundMotion": 0.2},
        },
        {
            Site(-117, 40): {"groundMotion": 0.5},
            Site(-117, 41): {"groundMotion": 0.6},
        },
        {
            Site(-117, 40): {"groundMotion": 1.0},
            Site(-117, 41): {"groundMotion": 1.1},
        }]

        for gmf in gmfs:
            output_path = self.generate_output_path(self.job)
            hcw = GmfDBWriter(output_path, self.job.id)
            hcw.serialize(gmf)
 def setUp(self):
     self.job = self.setup_classic_job()
     for gmf in GMF_DATA():
         output_path = self.generate_output_path(self.job)
         hcw = GmfDBWriter(output_path, self.job.id)
         hcw.serialize(gmf)
Beispiel #7
0
 def setUp(self):
     self.job = self.setup_classic_job()
     for gmf in GMF_DATA():
         output_path = self.generate_output_path(self.job)
         hcw = GmfDBWriter(output_path, self.job.id)
         hcw.serialize(gmf)