hvasbath / beat

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

Error when running 'Sample Laquila --hypers' #92

Closed Zilhe closed 2 years ago

Zilhe commented 2 years ago

Hello Hannes, when I run the code "Sample Laquila --hypers " in Scenario III, it appears the error: config - INFO All hierarchicals ok! config - INFO All hyperparameters ok! config - INFO All priors ok! models - INFO ... Initialising Geometry Optimizer ...

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

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 Initialising corrections ... Traceback (most recent call last): File "/home/zilong/pycharm-community-2020.3.3/plugins/python-ce/helpers/pydev/pydevd.py", line 1477, in _exec pydev_imports.execfile(file, globals, locals) # execute the script File "/home/zilong/pycharm-community-2020.3.3/plugins/python-ce/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "/media/zilong/Disk1/Beat/example/beat_01.py", line 2120, in main() File "/media/zilong/Disk1/Beat/example/beat01.py", line 2105, in main globals()['command' + command](args) File "/media/zilong/Disk1/Beat/example/beat_01.py", line 911, in command_sample project_dir, options.mode, options.hypers) File "/media/zilong/Disk1/Beat/example/beat/models/problems.py", line 875, in load_model problem = problem_catalog[pc.mode](config, hypers) File "/media/zilong/Disk1/Beat/example/beat/models/problems.py", line 643, in init hypers) File "/media/zilong/Disk1/Beat/example/beat/models/geodetic.py", line 572, in init gc, project_dir, sources, events, hypers=hypers) File "/media/zilong/Disk1/Beat/example/beat/models/geodetic.py", line 474, in init gc, project_dir, events, hypers=hypers) File "/media/zilong/Disk1/Beat/example/beat/models/geodetic.py", line 115, in init event=self.event, correction_configs=correction_configs) File "/media/zilong/Disk1/Beat/example/beat/heart.py", line 811, in setup_corrections corr = corr_conf.init_correction() File "/media/zilong/Disk1/Beat/example/beat/config.py", line 793, in init_correction self.check_consistency() File "/media/zilong/Disk1/Beat/example/beat/config.py", line 726, in check_consistency 'filled!' % self.feature) AttributeError: Ramps correction is enabled, but dataset_names are empty! Either the correction needs to be disabled or the field "dataset_names" needs to be filled!

Can you give me some suggestions? Thank you very much. My config file is attached here config_geometry.txt

Zilhe commented 2 years ago

Sorry, the code I run is 'Sample Laquila2 --hypers' instead of 'Sample Laquila --hypers'

hvasbath commented 2 years ago

Dear Zilhe, I edited your config file such that it should work, please see the "names" attribute of the SAR datatype and the dataset_names attribute under ramp correction. config_geometry.txt

Please let me know if the issue persists. Regards! Hannes

Zilhe commented 2 years ago

Thank you for your help. It runs well now.