Git Product home page Git Product logo

easyquake's People

Contributors

jakewalter avatar kennedydane avatar longmho avatar raymond123ng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

easyquake's Issues

hypoinverse depth update

I tried running locate_hyp2000 for depth correction but cat. write command can not update the depth of the event in the XML file.

Using 5 letter stations doesn't work

Hello, first off I want to thank you for developing such a great earthquake detection system.
I do have an issue though.
How can I import 5 letter station codes?
Most of the stations I use have 5 letter station codes, but they are not handled correctly by the program.
For example in the sta file the following happens:
LBTB2500.91S02535.80E1148
RTLG2121.71S02112.94E1198
How ever the second station should be GRTLG.
Any help or suggestions?
Thanks.

if no events detected in time chunk --> error creating gpd_picks.out --> process exits

Hi Jake, I am falling into an error in which, if no events are detected during one time chunk (With EQTransofrmer as machine picker), the gpd_picks.out file is not created and the process exits without passing to the next time-chunk.

Th error I get is the following:


FileNotFoundError Traceback (most recent call last)
in
27 dirname = single_date.strftime("%Y%m%d")
28 download_mseed(dirname=dirname, project_folder=project_folder, single_date=single_date, minlat=lat_a, maxlat=lat_b, minlon=lon_a, maxlon=lon_b)
---> 29 detection_continuous(dirname=dirname, project_folder=project_folder, project_code=project_code, single_date=single_date, machine=True, machine_picker= 'EQTransformer', local=True)
30 association_continuous(dirname=dirname, project_folder=project_folder, project_code=project_code, maxdist=maxdist, maxkm=maxkm, single_date=single_date, local=True)
31

/usr/local/Caskroom/miniconda/base/envs/easyquake/lib/python3.7/site-packages/easyQuake/easyQuake.py in detection_continuous(dirname, project_folder, project_code, local, machine, machine_picker, single_date, latitude, longitude, max_radius)
530 fullpath2 = pathEQT+'/mseed_predictor.py'
531 os.system(fullpath2+" -I %s -O %s -F %s" % (infile, outfile, pathEQT))
--> 532 gpd_pick_add(dbsession=session,fileinput=fileinassociate,inventory=inv)
533 else:
534 picker = fbpicker.FBPicker(t_long = 5, freqmin = 1, mode = 'rms', t_ma = 20, nsigma = 7, t_up = 0.7, nr_len = 2, nr_coeff = 2, pol_len = 10, pol_coeff = 10, uncert_coeff = 3)

/usr/local/Caskroom/miniconda/base/envs/easyquake/lib/python3.7/site-packages/easyQuake/easyQuake.py in gpd_pick_add(dbsession, fileinput, inventory)
343 def gpd_pick_add(dbsession=None,fileinput=None,inventory=None):
344 filepath = fileinput
--> 345 with open(filepath) as fp:
346 line = fp.readline()
347 cnt = 1

FileNotFoundError: [Errno 2] No such file or directory: 'data/ba2/20140820/gpd_picks.out'

The code I am using is very similar to your Idaho example but changing latitude longitude and timespan, as well as the machine picker. The code is pasted below.

Can you help solve this?

Would adding an exception to the gpd_pick_add definition before file path = file input solve this issue?

Thank you very much,

Mateo

Code:
`from easyQuake import download_mseed
from easyQuake import daterange
from datetime import date
from easyQuake import combine_associated
from easyQuake import detection_continuous
from easyQuake import association_continuous

from easyQuake import magnitude_quakeml
from easyQuake import simple_cat_df

import matplotlib.pyplot as plt
maxkm = 300 #100
maxdist=300 #100
lat_a = 37.5 #37.8
lat_b = 38.5 #38.34
lon_a = -123 #-122.4
lon_b = -122 #-122.0

start_date = date(2014, 8, 20)
end_date = date(2014, 8, 27)

project_code = 'bay_area'
project_folder = 'data/ba2'
for single_date in daterange(start_date, end_date):
print(single_date.strftime("%Y-%m-%d"))
dirname = single_date.strftime("%Y%m%d")
download_mseed(dirname=dirname, project_folder=project_folder, single_date=single_date, minlat=lat_a, maxlat=lat_b, minlon=lon_a, maxlon=lon_b)
detection_continuous(dirname=dirname, project_folder=project_folder, project_code=project_code, single_date=single_date, machine=True, machine_picker= 'EQTransformer', local=True)
association_continuous(dirname=dirname, project_folder=project_folder, project_code=project_code, maxdist=maxdist, maxkm=maxkm, single_date=single_date, local=True)

cat, dfs = combine_associated(project_folder=project_folder, project_code=project_code)
cat = magnitude_quakeml(cat=cat, project_folder=project_folder,plot_event=True)
cat.write('catalog_bayarea_end_08_14.xml',format='QUAKEML')

catdf = simple_cat_df(cat)
plt.figure()
plt.plot(catdf.index,catdf.magnitude,'.')`

Not an issue but a question

Dear Jake,
I am doing some test with your easyQuake suite. It is a very nice "integrated" solution.
I am facing an issue about the location codes of the seismic stations. My network uses location codes (ie 00) but it seems that easyQuake suite drops the location code, and in the catalog produced all the station with pick have location empty location code.
This quite an issue when using after the catalog produced to review the event (with Seiscomp in my case).
Is there an easy way to modify the code ?
Or should I go deep inside to make the modification.
I encountered the same issue with EQT (I am also testing it in standalone mode), and I have had to make some modification in the associator.py script to take the location code in account.
Maybe, if it not easily faisible with the actual easyquake code you may give me some inputs on where I have to search in the code to use the location code of the stations ?

Hope my message is ok, maybe not really clear with my french-english...

Thanks in advance for you answer.
Regards,
Mickael.

Error running the code

Hi authors of easyQuake,

I have encountered the following error when running the code, it seems to have some problem loading the model,
AttributeError: 'str' object has no attribute 'decode'
After searching for the error on google, I ran the following command:
pip install 'h5py==2.10.0' --force-reinstall
Then the program could run normally.

I guess there is something incompatible with the installed version of Keras and h5py, in case someone else have the same problem.

Thank you,
Chenyu Li

Request/suggestion regarding cut_event_waveforms

What a great tool! It would be very useful to allow the 'cut_event_waveforms' module to clip the traces for all available waveforms for that day, not just those that triggered and were associated. I am trying to code this up myself but thought I would mention it as it might be useful to others as well.

velocity model, hash and fine tuning

Hi dear @jakewalter and all,

We have installed EasyQuake and run test data. Thank you very much for this great code!
We are planning to use EasyQuake in a local network. I have a few questions regarding this.

  • Is there a detailed document about EasyQuake?
  • We want to use our own velocity model. Where is the velocity model located in the EasyQuake code?
  • Is it possible to fine tune Earthquake Transformer, GPD and PhaseNet for our local network? Where can we do that in the EasyQuake code?
  • How can we use hash? Where are the outputs in the EasyQuake code?

Best regards..

Question about the available models

Hello,

are the .h5 files relative to the original implementation of each model, i.e. trained with the original dataset and having the original weights of the models? Or did you retrain each of the models?

Issue Running Examples

Hello Jake,

I am attempting to run easyQuake and I have ran into a few preliminary challenges. One is though I have conda forge as an accessible channel, I cannot seem to download tensorflow-gpu==2.1.

Secondly, I do not have a machine with a GPU. Your write up does not explicitly state that a gpu is necessary. Can easyQuake be ran with a CPU?

Third, I am attempting to work through the idaho_example.py and I receive an error for the project_folder variable in the download_mseed(), detection_continous(), and association_sontinous() functions. When I try to run these this is what is returned: OSError: [Errno 30] Read-only file system: '/data'. Tho pointers "data/id" where pre-populated in the file, is this something I should change to a directory that exists or is this used to create a new directory to populate the downloaded files?

Bryan

Q: Integrating custom picker picks with EasyQuake's phase associator

Hello,

I am using a seismic event picker that isn't currently integrated with EasyQuake and I can produce picks in a format similar to EasyQuake's expected input (e.g., "MB NDMT EHE S 2020-04-01T20:56:50.730000").

I'm interested in utilizing EasyQuake's phase associator with my picker's output. Could you provide guidance on how to properly use the phase associator with a custom "stalta_picks.out" file generated by an external picker?

The main problem I see is that my picker doesn't save the channel information, can I just skip channel using an asterisk or so?

Thank you for your support.
D

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.