Comments (2)
I have added the following snippet to the default scan class:
c_precision = 1e6
precision = 1e6
and
data["COA"] = coa.select(station="COA")[0].data / self.c_precision
data["COA_N"] = coa.select(station="COA_N")[0].data / self.c_precision
data["X"] = coa.select(station="X")[0].data / self.precision
data["Y"] = coa.select(station="Y")[0].data / self.precision
data["Z"] = coa.select(station="Z")[0].data / self.precision
st = Stream(Trace(data=(np.array(data["COA"]) * self.c_precision).astype(np.int32),
header=stats_COA))
st += Stream(Trace(data=(np.array(data["COA_N"]) * self.c_precision).astype(np.int32),
header=stats_COA_N))
st += Stream(Trace(data=(np.array(data["X"]) * self.precision).astype(np.int32),
header=stats_X))
st += Stream(Trace(data=(np.array(data["Y"]) * self.precision).astype(np.int32),
header=stats_Y))
st += Stream(Trace(data=(np.array(data["Z"]) * self.precision).astype(np.int32),
header=stats_Z))
This is similar to the way in which obspy handles UTCDateTime precision (class variable that can be overwritten). Need to think of a way to double check the input from the user and tell them if this may cause them to exceed the capacity of np.int32 (as well as potentially giving them the option to change it to np.int64). Currently it's looking like it'll have to be by extending the signature of the SeisPlot class to take the precision and save dtype.
from quakemigrate.
Final solution described in commit that closes this issue.
from quakemigrate.
Related Issues (20)
- 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
- Tests timing out on data acquisition from EarthScope stage HOT 7
- Warnings about deprecation of Node.js 16 HOT 1
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.