<commit_before>#!/usr/bin/env python
#
# ======================================================================
#
# <NAME>, U.S. Geological Survey
#
# This code was developed as part of the Computational Infrastructure
# for Geodynamics (http://geodynamics.org).
#
# Copyright (c) 2010-2012 University of California, Davis
#
# See COPYING for license information.
#
# ======================================================================
#

import unittest

import numpy

class TestUniformVelModel(unittest.TestCase):

  def setUp(self):
    from spatialdata.spatialdb.contrib.UniformVelModel import UniformVelModel
    db = UniformVelModel()
    db._configure()
    self._db = db

    from spatialdata.geocoords.CSGeo import CSGeo
    csQ = CSGeo()
    csQ.inventory.datumHoriz = "NAD27"
    csQ.inventory.datumVert = "mean sea level"
    csQ.inventory.ellipsoid = "clrk66"
    csQ._configure()
    csQ.initialize()
    self._csQ = csQ
    return


  def test_queryVp(self):
    locs = numpy.array( [[-118.520000,  34.120000,  -1400.00],
                         [-116.400000,  32.340000,  -1000.00]],
                        numpy.float64)
    queryVals = ["vp"]
    dataE = numpy.array([[4.5e+3],
                         [4.5e+3]],
                        numpy.float64)
    errE = [0, 0]
    
    db = self._db
    db.open()
    db.queryVals(queryVals)
    data = numpy.zeros(dataE.shape, dtype=numpy.float64)
    err = []<commit_msg>Updated setting in template.<commit_after>#!/usr/bin/env python
#
# ======================================================================
#
# <NAME>, U.S. Geological Survey
#
# This code was developed as part of the Computational Infrastructure
# for Geodynamics (http://geodynamics.org).
#
# Copyright (c) 2010-2012 University of California, Davis
#
# See COPYING for license information.
#
# ======================================================================
#

import unittest

import numpy

class TestUniformVelModel(unittest.TestCase):

  def setUp(self):
    from spatialdata.spatialdb.contrib.UniformVelModel import UniformVelModel
    db = UniformVelModel()
    db.inventory.label = "Uniform properties"
    db._configure()
    self._db = db

    from spatialdata.geocoords.CSGeo import CSGeo
    csQ = CSGeo()
    csQ.inventory.datumHoriz = "NAD27"
    csQ.inventory.datumVert = "mean sea level"
    csQ.inventory.ellipsoid = "clrk66"
    csQ._configure()
    csQ.initialize()
    self._csQ = csQ
    return


  def test_queryVp(self):
    locs = numpy.array( [[-118.520000,  34.120000,  -1400.00],
                         [-116.400000,  32.340000,  -1000.00]],
                        numpy.float64)
    queryVals = ["vp"]
    dataE = numpy.array([[4.5e+3],
                         [4.5e+3]],
                        numpy.float64)
    errE = [0, 0]
    
    db = self._db
    db.open()
    db.queryVals(queryVals)
    data = numpy.zeros(dataE.shape, dtype=numpy.float64)
    err = []
{'fraction_non_alphanumeric': 0.2060523631417885, 'fraction_numerical': 0.04896293777626658, 'mean_word_length': 2.786357786357786, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3863955', 'n_tokens_mistral': 1049, 'n_tokens_neox': 916, 'n_words': 196}