Git Product home page Git Product logo

Comments (3)

hemmelig avatar hemmelig commented on May 31, 2024 2

Hi Tom - are you using a conda environment? When you run the install, it will compile the C source code into a shared object (.so) that is placed in your conda environment (for me, this file is at: /home/conor/anaconda3/envs/QuakeMigrate/lib/python3.7/site-packages/quakemigrate/core/src). I think in your case, it might be looking for this file locally because you are importing QuakeMigrate within the source code directory - I am assuming "bagend" is shorthand for home (majorly approved!!!)

Try changing to an independent directory and let me know if the import works there and check to see if the .so file is being placed somewhere sensible. If not, can you reinstall and share the full output from running the installation?

from quakemigrate.

TomWinder avatar TomWinder commented on May 31, 2024 1

Great! We're going to look into adding a catch to stop this issue happening - we have both done it, as well as several others..

That test failure is known, and not a problem. It is due to a ~ 8th decimal place difference (which is then carried through the calculation) caused by a pyproj update. We just haven't quite got around to fixing the test yet :)

from quakemigrate.

tomeracles avatar tomeracles commented on May 31, 2024

You are absolutely right of course, all I had to do was try doing it literally anywhere else...!! 🙄

The good news is that the installation appears to have worked. I ran your examples and the icequakes passed all of the tests but it seems the dike swarms have failed one:

(quakemigrate) bagend:tests tmerry$ python test_benchmarks.py 
Testing detect output from Icequake_Iceland run.
	1: Assert same number of channels in .scanmseed...
	   ...passed!
	2: Assert meta data is identical...
	   ...passed!
	3: Assert each data channels are identical...
	   ...passed!
	4: Assert availability files are identical...
/Applications/anaconda3/envs/quakemigrate/lib/python3.8/site-packages/pandas/core/indexes/base.py:395: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  elif issubclass(data.dtype.type, np.bool) or is_bool_dtype(data):
	   ...passed!
Testing detect output from Volcanotectonic_Iceland run.
	1: Assert same number of channels in .scanmseed...
	   ...passed!
	2: Assert meta data is identical...
	   ...passed!
	3: Assert each data channels are identical...
	   ...passed!
	4: Assert availability files are identical...
	   ...passed!
.Testing locate output from Icequake_Iceland run.
	1: Assert event files are identical...
	   ...passed!
	2: Assert pick files are identical...
	   ...passed!
	3: Assert same number of channels in cut waveforms...
	   ...passed!
	4: Assert meta data is identical...
	   ...passed!
	5: Assert data channels are identical...
	   ...passed!
	6: Assert amplitude files are identical...
	   ...no amplitude files found!
Testing locate output from Volcanotectonic_Iceland run.
	1: Assert event files are identical...
FTesting contents of lookup tables from Icequake_Iceland run.
/Applications/anaconda3/envs/quakemigrate/lib/python3.8/site-packages/pandas/core/indexes/base.py:395: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  elif issubclass(data.dtype.type, np.bool) or is_bool_dtype(data):
/Applications/anaconda3/envs/quakemigrate/lib/python3.8/site-packages/pandas/core/indexes/base.py:395: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  elif issubclass(data.dtype.type, np.bool) or is_bool_dtype(data):
	1: Assert traveltime tables are identical...
	2: Assert various LUT parameters are identical...
		...'fraction_tt'...
		...'phases'...
		...'station_data'...
		...'grid_proj'...
		...'coord_proj'...
		...'ll_corner'...
		...'ur_corner'...
		...'node_spacing'...
		...'node_count'...
	   ...passed!
Testing contents of lookup tables from Volcanotectonic_Iceland run.
/Applications/anaconda3/envs/quakemigrate/lib/python3.8/site-packages/pandas/core/indexes/base.py:395: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  elif issubclass(data.dtype.type, np.bool) or is_bool_dtype(data):
/Applications/anaconda3/envs/quakemigrate/lib/python3.8/site-packages/pandas/core/indexes/base.py:395: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  elif issubclass(data.dtype.type, np.bool) or is_bool_dtype(data):
	1: Assert traveltime tables are identical...
	2: Assert various LUT parameters are identical...
		...'fraction_tt'...
		...'phases'...
		...'station_data'...
		...'grid_proj'...
		...'coord_proj'...
		...'ll_corner'...
		...'ur_corner'...
		...'node_spacing'...
		...'node_count'...
	   ...passed!
.Testing trigger output from Icequake_Iceland run.
	1: Assert triggered events files are identical...
	   ...passed!
Testing trigger output from Volcanotectonic_Iceland run.
	1: Assert triggered events files are identical...
	   ...passed!
.
======================================================================
FAIL: test_locate (__main__.TestExamples)
Check the outputs of locate.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_benchmarks.py", line 146, in test_locate
    pd.testing.assert_frame_equal(pd.read_csv(b_event),
  File "/Applications/anaconda3/envs/quakemigrate/lib/python3.8/site-packages/pandas/_testing.py", line 1372, in assert_frame_equal
    assert_series_equal(
  File "/Applications/anaconda3/envs/quakemigrate/lib/python3.8/site-packages/pandas/_testing.py", line 1186, in assert_series_equal
    _testing.assert_almost_equal(
  File "pandas/_libs/testing.pyx", line 65, in pandas._libs.testing.assert_almost_equal
  File "pandas/_libs/testing.pyx", line 174, in pandas._libs.testing.assert_almost_equal
  File "/Applications/anaconda3/envs/quakemigrate/lib/python3.8/site-packages/pandas/_testing.py", line 915, in raise_assert_detail
    raise AssertionError(msg)
AssertionError: DataFrame.iloc[:, 19] (column name="ML") are different

DataFrame.iloc[:, 19] (column name="ML") values are different (100.0 %)
[left]:  [0.865]
[right]: [0.863]

----------------------------------------------------------------------
Ran 4 tests in 0.692s

FAILED (failures=1)

What's happened here - is it just a difference of 0.002 in a calculated ML vs expected?

from quakemigrate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.