Code Monkey home page Code Monkey logo

Comments (11)

cplegendre avatar cplegendre commented on September 28, 2024

KOERI data are not available from IRIS.
Please try to change the "input_file.yaml" as follows:

client: KOERI #enter all the clients separated by commas
network: "KO" #* for all stations

This should fix the issue.

from stadium-py.

Karaca2 avatar Karaca2 commented on September 28, 2024

Dear Dr Cédric

The question relating to the geographical region was asked before by my former student, Serdar helli.
Thanks for your reply. We solved the previous problem according to your reply.
But, there is another problem as follows:

File "C:\Users\AppData\Local\Continuum\anaconda3\lib\site-packages\matplotlib\axes_axes.py", line 5747, in _pcolorargs
C.shape, Nx, Ny, funcname))

TypeError: Dimensions of C (539, 1080) are incompatible with X (1081) and/or Y (540); see help(pcolormesh)

thanks in advance for your reply

from stadium-py.

cplegendre avatar cplegendre commented on September 28, 2024

When does this error occurs?
I guess it happens after the computation, when plotting the results. But at which stage?

from stadium-py.

Karaca2 avatar Karaca2 commented on September 28, 2024

as you see,
after collecting and processing RF data,

2022/10/01 17:17:22|INFO| Searching and downloading data for RF; KO-AFSR
2022/10/01 17:17:22|INFO| Plotting events map KO-AFSR-RF-events_map.png
Traceback (most recent call last):

File "", line 1, in
runfile('I:/serdar/stadium.py', wdir='I:/serdar')

File "C:\Users\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile
execfile(filename, namespace)

File "C:\Users\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)

File "I:/serdar/stadium.py", line 368, in
main()

File "I:/serdar/stadium.py", line 217, in main
oss.select_to_download_events(catalogloc,datafileloc,dest_map,RFsta,rf_data,minmagnitudeRF,maxmagnitudeRF,plot_stations,plot_events,locations,method='RF')

File "I:\serdar\rfsks_support\other_support.py", line 198, in select_to_download_events
rf_data.download_data(catalogtxtloc=catalogloc,datafileloc=datafileloc,tot_evnt_stns=total_events,rem_evnts=rem_events, plot_stations=plot_stations, plot_events=plot_events,dest_map=dest_map,locations=locations)

File "I:\serdar\rfsks_support\download_large_data.py", line 263, in download_data
events_map(evlons=df['evlon'], evlats=df['evlat'], evmgs=evmg, evdps=df['evdp'], stns_lon=slon, stns_lat=slat, destination=dest_map,figfrmt=self.fig_frmt, clon = slon , outname=f'{event_plot_name}')

File "I:\serdar\rfsks_support\plotting_map.py", line 273, in events_map
plot_topo_simple(eq_map,cmap=plt.cm.rainbow)

File "I:\serdar\rfsks_support\plotting_map.py", line 18, in plot_topo_simple
cs = map.pcolormesh(lons,lats,etopo,cmap=cmap,latlon=True,shading='gouraud')

File "C:\Users\AppData\Local\Continuum\anaconda3\lib\site-packages\mpl_toolkits\basemap_init_.py", line 548, in with_transform
return plotfunc(self,x,y,data,*args,**kwargs)

File "C:\Users\AppData\Local\Continuum\anaconda3\lib\site-packages\mpl_toolkits\basemap_init_.py", line 3457, in pcolormesh
ret = ax.pcolormesh(x,y,data,**kwargs)

File "C:\Users\AppData\Local\Continuum\anaconda3\lib\site-packages\matplotlib_init_.py", line 1601, in inner
return func(ax, *map(sanitize_sequence, args), **kwargs)

File "C:\Users\AppData\Local\Continuum\anaconda3\lib\site-packages\matplotlib\axes_axes.py", line 6157, in pcolormesh
X, Y, C = self._pcolorargs('pcolormesh', *args, allmatch=allmatch)

File "C:\Users\AppData\Local\Continuum\anaconda3\lib\site-packages\matplotlib\axes_axes.py", line 5747, in _pcolorargs
C.shape, Nx, Ny, funcname))

TypeError: Dimensions of C (539, 1080) are incompatible with X (1081) and/or Y (540); see help(pcolormesh)

from stadium-py.

cplegendre avatar cplegendre commented on September 28, 2024

Interesting. When running on my machine it runs smoothly.
It may be because we are using a different version of matplotlib.
Could you share your environment file? Therefore I could compare with mine.

from stadium-py.

cplegendre avatar cplegendre commented on September 28, 2024

KO-AFSR-RF-events_map

from stadium-py.

SerdarHelli avatar SerdarHelli commented on September 28, 2024

I am not working on this project but I tried.
These are library with versions. And I tried on python 3.9.7 and windows10 platform
Cartopy==0.18.0
matplotlib==3.5.3
numpy==1.22.1
obspy==1.3.0
pandas==1.3.4
PyYAML==6.0
rf==1.0.1
scipy==1.7.1
Shapely==1.8.4
SplitWavePy==0.3.0
tqdm==4.62.3

Thank you for your time.

from stadium-py.

cplegendre avatar cplegendre commented on September 28, 2024

The main differences I notice are that we tested this code on Linux and OS X with matplotlib==3.1.1, while you are using matplotlib==3.5.3
I guess this update caused some issues with our code.
You could try:
conda install matplotlib==3.1.1

from stadium-py.

Karaca2 avatar Karaca2 commented on September 28, 2024

I installed matplotlib==3.1.1 after removing matplotlib==3.5.3.
I got the same error again
is there any way to solve this problem?

from stadium-py.

cplegendre avatar cplegendre commented on September 28, 2024

An easy way would be to disable the automated plots (by matplotlib).
In Settings/stepwise.yaml:

plot_settings:
- plot_stations: 0 #plot the stations map of all available stations and all retrieved stations
- plot_events: 0 #plot the stations map of all retrieved events for each station
- plot_all_retrieved_events_stations: 0 

Then plot the necessary images using customized scripts that should be easy to write.

from stadium-py.

Karaca2 avatar Karaca2 commented on September 28, 2024

Traceback (most recent call last):

File "", line 1, in
runfile('I:/serdar/stadium.py', wdir='I:/serdar')

File "C:\Users\gulten.polat\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile
execfile(filename, namespace)

File "C:\Users\gulten.polat\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)

File "I:/serdar/stadium.py", line 368, in
main()

File "I:/serdar/stadium.py", line 217, in main
oss.select_to_download_events(catalogloc,datafileloc,dest_map,RFsta,rf_data,minmagnitudeRF,maxmagnitudeRF,plot_stations,plot_events,locations,method='RF')

File "I:\serdar\rfsks_support\other_support.py", line 198, in select_to_download_events
rf_data.download_data(catalogtxtloc=catalogloc,datafileloc=datafileloc,tot_evnt_stns=total_events,rem_evnts=rem_events, plot_stations=plot_stations, plot_events=plot_events,dest_map=dest_map,locations=locations)

File "I:\serdar\rfsks_support\download_large_data.py", line 236, in download_data
strm,res,msg = multi_download(self.client,self.inv,net,stn,slat,slon,elat,elon,evdp,evtime,em,emt,fcat,stalons=rf_stalons,stalats=rf_stalats,staNetNames=rf_staNetNames,phase='P',locations=locations)

File "I:\serdar\rfsks_support\rfsks_extras.py", line 279, in multi_download
strm = retrieve_waveform(client_local,net,stn,t1,t2,stats_dict=stats_args,cha="BHE,BHN,BHZ",loc=loc,pharr = pharr, phasenm = phase)

File "I:\serdar\rfsks_support\rfsks_extras.py", line 228, in retrieve_waveform
filter_traces_rf(st,pharr = pharr)

File "I:\serdar\rfsks_support\rfsks_extras.py", line 48, in filter_traces_rf
if minendtime(alledtimes)-pharr>=startpoint and pharr - maxstarttime(allsttimes)>=endpoint:

File "I:\serdar\rfsks_support\rfsks_extras.py", line 21, in minendtime
minval0 = alledtimes[0]

IndexError: list index out of range

??? I made these changes in stepwise.yaml. It worked until this error:
IndexError: list index out of range

from stadium-py.

Related Issues (2)

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.