Comments (3)
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.
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.
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)
- Error when no earthquke in trigger step. HOT 2
- BUG: Add "units" arg to to_mfast.py
- ImportError: Could not load extension library 'qmlib'. HOT 10
- [BUG]: All traces rejected where one pair can't be merged due to "Incompatible traces" error.
- error in compute_traveltimes HOT 4
- Issue Import QuakeMigrate in Python (AttributeError) HOT 2
- No files found in archive for this time period : No detection HOT 4
- Overlapping waveforms in locate plot summary HOT 4
- PickTimes export to Obspy HOT 7
- [BUG]: skfmm LUT generation doesn't work for the southern hemisphere HOT 2
- AttributeError: module 'numpy' has no attribute 'bool'. HOT 6
- FEAT: Make picking optional.
- BUG: 'discarded' events not being plotted in Trigger summary
- BUG: Binder notebooks do not work. HOT 1
- Allow multiple channels for P phase in event & pick plots
- FEAT: Build QuakeMigrate travel-time lookup tables from 3-D velocity models
- BUG: plotting failure with matplotlib 3.8 HOT 2
- Data failed to pass the specified data quality criteria HOT 3
- Tests failing due to change in NonLinLoc source directory HOT 2
- BUG: cibuildwheel fails to build wheels for Windows
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quakemigrate.