hvasbath / beat

Bayesian Earthquake Analysis Tool
GNU General Public License v3.0
128 stars 42 forks source link

Waveform mapping inconsistency #32

Closed hvasbath closed 5 years ago

hvasbath commented 5 years ago

Originally posted by @nanfang0422

Hi Hannes, When I run the code "beat sample Laquila" in scenario 1, I meet the problem: fangnandeMacBook-Pro:beat_learning NAN$ beat sample Laquila config - INFO All parameter-priors ok! config - INFO All hyper-parameters ok! config - INFO All hierarchical-parameters ok! models - INFO ... Initialising Geometry Optimizer ...

models - INFO Analysing problem ... models - INFO ---------------------

seismic - INFO The waveform defined in "any_P 0" config is not included in the optimization! geodetic - INFO Number of geodetic datasets: 2 geodetic - INFO Number of geodetic data points: 419 geodetic - WARNING Covariance estimation not implemented (yet)! Using imported covariances! geodetic - INFO Fit residual ramp selected! models - INFO ... Building model ...

models - INFO Optimization for 1 hyperparameters in total! seismic - INFO Seismic optimization on: depth, dip, east_shift, length, north_shift, nucleation_x, nucleation_y, rake, slip, strike, time, width Traceback (most recent call last): File "/anaconda3/bin/beat", line 11, in load_entry_point('beat==1.0rc1', 'console_scripts', 'beat')() File "/anaconda3/lib/python3.6/site-packages/beat-1.0rc1-py3.6-macosx-10.7-x8664.egg/beat/apps/beat.py", line 1588, in main globals()['command' + command](args) File "/anaconda3/lib/python3.6/site-packages/beat-1.0rc1-py3.6-macosx-10.7-x86_64.egg/beat/apps/beat.py", line 748, in command_sample project_dir, options.mode, options.hypers) File "/anaconda3/lib/python3.6/site-packages/beat-1.0rc1-py3.6-macosx-10.7-x86_64.egg/beat/models/problems.py", line 833, in load_model problem.built_model() File "/anaconda3/lib/python3.6/site-packages/beat-1.0rc1-py3.6-macosx-10.7-x86_64.egg/beat/models/problems.py", line 217, in built_model input_rvs, fixed_rvs, self.hyperparams, pc) File "/anaconda3/lib/python3.6/site-packages/beat-1.0rc1-py3.6-macosx-10.7-x86_64.egg/beat/models/seismic.py", line 477, in get_formula llk = Deterministic(self._like_name, tt.concatenate((wlogpts))) File "/anaconda3/lib/python3.6/site-packages/theano/tensor/basic.py", line 4734, in concatenate return join(axis, tensorlist) File "/anaconda3/lib/python3.6/site-packages/theano/tensor/basic.py", line 4483, in join return join(axis, tensors_list) File "/anaconda3/lib/python3.6/site-packages/theano/gof/op.py", line 615, in call node = self.make_node(*inputs, **kwargs) File "/anaconda3/lib/python3.6/site-packages/theano/tensor/basic.py", line 4206, in make_node raise ValueError('Cannot join an empty list of tensors') ValueError: Cannot join an empty list of tensors

The seismic config is not included in the optimization. If I change the the waveforms config:"include:true" ,it shows the error: fangnandeMacBook-Pro:beat_learning NAN$ beat sample Laquila config - INFO All parameter-priors ok! config - INFO All hyper-parameters ok! config - INFO All hierarchical-parameters ok! models - INFO ... Initialising Geometry Optimizer ...

models - INFO Analysing problem ... models - INFO ---------------------

Traceback (most recent call last): File "/anaconda3/bin/beat", line 11, in load_entry_point('beat==1.0rc1', 'console_scripts', 'beat')() File "/anaconda3/lib/python3.6/site-packages/beat-1.0rc1-py3.6-macosx-10.7-x8664.egg/beat/apps/beat.py", line 1588, in main globals()['command' + command](args) File "/anaconda3/lib/python3.6/site-packages/beat-1.0rc1-py3.6-macosx-10.7-x86_64.egg/beat/apps/beat.py", line 748, in command_sample project_dir, options.mode, options.hypers) File "/anaconda3/lib/python3.6/site-packages/beat-1.0rc1-py3.6-macosx-10.7-x86_64.egg/beat/models/problems.py", line 824, in load_model problem = problem_catalog[pc.mode](config, hypers) File "/anaconda3/lib/python3.6/site-packages/beat-1.0rc1-py3.6-macosx-10.7-x86_64.egg/beat/models/problems.py", line 618, in init hypers) File "/anaconda3/lib/python3.6/site-packages/beat-1.0rc1-py3.6-macosx-10.7-x86_64.egg/beat/models/seismic.py", line 345, in init sc, event, project_dir, hypers=hypers) File "/anaconda3/lib/python3.6/site-packages/beat-1.0rc1-py3.6-macosx-10.7-x86_64.egg/beat/models/seismic.py", line 85, in init mapnumber=i) File "/anaconda3/lib/python3.6/site-packages/beat-1.0rc1-py3.6-macosx-10.7-x86_64.egg/beat/heart.py", line 2444, in init_wavemap wmap.station_weeding(event, wc.distances, blacklist=wc.blacklist) File "/anaconda3/lib/python3.6/site-packages/beat-1.0rc1-py3.6-macosx-10.7-x86_64.egg/beat/heart.py", line 2033, in station_weeding self.check_consistency() File "/anaconda3/lib/python3.6/site-packages/beat-1.0rc1-py3.6-macosx-10.7-x86_64.egg/beat/heart.py", line 2051, in check_consistency 'completely by setting include=False!' % self._mapid) beat.heart.CollectionError: No data left in wavemap "any_P_0" after applying the distance filter! Either (1) Adjust distance range (set "distances" parameter in beat.WaveformFitConfig, given in degrees epicentral distance) or (2) deactivate the wavemap completely by setting include=False!

Can you give me some suggestions? Thank you very much.

hvasbath commented 5 years ago

Please read the last 4 lines of the error message. This says everything. Please try to especially follow the first point (1). If this does not resolve it I would need to see your config file. Thanks for reporting.

nanfang0422 commented 5 years ago

Thank you for your suggestions! I checked again and have corrected it.