Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question for the mess slip distribution result in Scenario II #30

Closed
vic-chou opened this issue Jan 26, 2019 · 9 comments
Closed

Question for the mess slip distribution result in Scenario II #30

vic-chou opened this issue Jan 26, 2019 · 9 comments

Comments

@vic-chou
Copy link

Hi, when I complete the running Scenario II, I plot the slip distribution (the following figure I attached), but the slip distribution is mess and different from the slip distribution in tutorial in the website. Can you give some suggestion to solve this problem?
1

@hvasbath
Copy link
Owner

hvasbath commented Jan 26, 2019

What regularization and initialization did you use? How many chains in the SMC sampler did you use? Looks like it is not converged. For example in the file you sent me for debugging the plot there was no regularization used ...
If you did not use least-squares-solution as the starting points of the Markov Chains, but used random init you will have to use MANY Markov Chains with a large number of steps. E.g.: n_chains = 8000 and n_steps=500. This will produce huge sampling results-please keep that in mind of your disk-space!

@vic-chou
Copy link
Author

I attached the configure file, in this runing, I set the regularization to laplacian based on the tutorial. The regularization and initialization is baed on the tutorial (I don't know if my understanding of the tutorial is right or not). The chains in the SMC sampler is set to 1000. How can I use least-squares-solution as the starting points of the Markov Chains? I don't see the procedure in the tutorial.
--- !beat.BEATconfig
name: Laquila
date: '2009-04-06'
event: !pf.Event
lat: 42.29
lon: 13.35
time: 2009-04-06 01:32:49.190000
name: 200904060132A
depth: 12000.0
magnitude: 6.343080192483292
region: CENTRAL ITALY
catalog: gCMT
moment_tensor: !pf.MomentTensor
mnn: 1.43e+18
mee: 1.87e+18
mdd: -3.3e+18
mne: 1.77e+18
mnd: -1.43e+18
med: 2.6900000000000003e+17
strike1: 120.23408298515041
dip1: 54.240869089580485
rake1: -112.81739742081386
strike2: 335.98575923255856
dip2: 41.58440373860804
rake2: -61.69749587601104
moment: 3.6696131948749036e+18
magnitude: 6.343080192483292
duration: 7.0
project_dir: /data4/gyxu/beat/test_beat/Laquila
problem_config: !beat.ProblemConfig
mode: ffo
mode_config: !beat.FFOConfig
regularization: laplacian
npatches: 132
initialization: random
source_type: RectangularSource
stf_type: HalfSinusoid
decimation_factors:
geodetic: 4
n_sources: 1
datatypes: [geodetic]
hyperparameters:
h_SAR: !beat.heart.Parameter
name: h_SAR
form: Uniform
lower: [0.0]
upper: [6.0]
testvalue: [3.0]
h_laplacian: !beat.heart.Parameter
name: h_laplacian
form: Uniform
lower: [-3.0]
upper: [2.0]
testvalue: [-0.5]
priors:
uparr: !beat.heart.Parameter
name: uparr
form: Uniform
lower: [-0.1]
upper: [2.0]
testvalue: [1.15]
uperp: !beat.heart.Parameter
name: uperp
form: Uniform
lower: [-1.0]
upper: [1.0]
testvalue: [0.5]
geodetic_config: !beat.GeodeticConfig
datadir: /data4/gyxu/beat/test_beat/laquila_kite_container-master
names: [Laquila_dscxn, Laquila_ascxn]
types: [SAR]
calc_data_cov: true
interpolation: multilinear
fit_plane: false
dataset_specific_residual_noise_estimation: true
gf_config: !beat.GeodeticLinearGFConfig
store_superdir: /data4/gyxu/beat/test_beat/GF/Laquila
reference_model_idx: 0
n_variations: [0, 1]
earth_model_name: ak135-f-continental.m
nworkers: 1
reference_sources:
- !beat.sources.RectangularSource
lat: 42.29
lon: 13.35
north_shift: 5320.626993768318
east_shift: 10834.953621207327
elevation: 0.0
depth: 2783.512543671438
time: 2009-04-06 01:32:49.190000
stf: !pf.HalfSinusoidSTF
duration: 0.0
anchor: -1.0
stf_mode: post
strike: 145.5721440593029
dip: 54.984442677677144
rake: -114.77908006170307
length: 13046.578107041581
width: 9770.686350202324
velocity: 3500.0
slip: 0.5359876408166948
patch_widths: [2.0]
patch_lengths: [2.0]
extension_widths: [0.6]
extension_lengths: [0.4]
sample_rate: 1.1574074074074073e-05
sampler_config: !beat.SamplerConfig
name: SMC
progressbar: true
buffer_size: 5000
parameters: !beat.SMCConfig
tune_interval: 50
check_bnd: true
rm_flag: true
n_jobs: 5
n_steps: 100
n_chains: 1000
coef_variation: 1.0
stage: 0
proposal_dist: MultivariateNormal
update_covariances: false
hyper_sampler_config: !beat.SamplerConfig
name: Metropolis
progressbar: true
buffer_size: 5000
parameters: !beat.MetropolisConfig
tune_interval: 50
proposal_dist: Normal
check_bnd: true
rm_flag: false
n_jobs: 1
n_steps: 25000
n_chains: 20
thin: 2
burn: 0.5

@hvasbath
Copy link
Owner

It is written here under Markov Chain initialization:
https://hvasbath.github.io/beat/examples/FFO_static.html#sample-the-solution-space

But you are right, I did not write explicitely to set the initialization flag (under mode_config) from "random" to "lsq". Please do so! Will update the tutorial accordingly. Thanks!

@vic-chou
Copy link
Author

I set the initialization to "lsq", but the slip distribution is still mess and the synthetic displacements is bad. Is there a problem with my understanding of the tutorial? Can you give me some suggestion? I attached the slip distribution and configure file.
2
the config_ffo.yaml file
--- !beat.BEATconfig
name: Laquila
date: '2009-04-06'
event: !pf.Event
lat: 42.29
lon: 13.35
time: 2009-04-06 01:32:49.190000
name: 200904060132A
depth: 12000.0
magnitude: 6.343080192483292
region: CENTRAL ITALY
catalog: gCMT
moment_tensor: !pf.MomentTensor
mnn: 1.43e+18
mee: 1.87e+18
mdd: -3.3e+18
mne: 1.77e+18
mnd: -1.43e+18
med: 2.6900000000000003e+17
strike1: 120.23408298515041
dip1: 54.240869089580485
rake1: -112.81739742081386
strike2: 335.98575923255856
dip2: 41.58440373860804
rake2: -61.69749587601104
moment: 3.6696131948749036e+18
magnitude: 6.343080192483292
duration: 7.0
project_dir: /data4/gyxu/beat/test_beat/Laquila
problem_config: !beat.ProblemConfig
mode: ffo
mode_config: !beat.FFOConfig
regularization: laplacian
npatches: 132
initialization: lsq
source_type: RectangularSource
stf_type: HalfSinusoid
decimation_factors:
geodetic: 4
n_sources: 1
datatypes: [geodetic]
hyperparameters:
h_SAR: !beat.heart.Parameter
name: h_SAR
form: Uniform
lower: [0.0]
upper: [7.0]
testvalue: [3.5]
h_laplacian: !beat.heart.Parameter
name: h_laplacian
form: Uniform
lower: [-3.0]
upper: [2.0]
testvalue: [-0.5]
priors:
uparr: !beat.heart.Parameter
name: uparr
form: Uniform
lower: [-0.1]
upper: [2.0]
testvalue: [1.15]
uperp: !beat.heart.Parameter
name: uperp
form: Uniform
lower: [-1.0]
upper: [1.0]
testvalue: [0.5]
geodetic_config: !beat.GeodeticConfig
datadir: /data4/gyxu/beat/test_beat/laquila_kite_container-master
names: [Laquila_dscxn, Laquila_ascxn]
types: [SAR]
calc_data_cov: true
interpolation: multilinear
fit_plane: false
dataset_specific_residual_noise_estimation: true
gf_config: !beat.GeodeticLinearGFConfig
store_superdir: /data4/gyxu/beat/test_beat/GF/Laquila
reference_model_idx: 0
n_variations: [0, 1]
earth_model_name: ak135-f-continental.m
nworkers: 1
reference_sources:
- !beat.sources.RectangularSource
lat: 42.29
lon: 13.35
north_shift: 5320.626993768318
east_shift: 10834.953621207327
elevation: 0.0
depth: 2783.512543671438
time: 2009-04-06 01:32:49.190000
stf: !pf.HalfSinusoidSTF
duration: 0.0
anchor: -1.0
stf_mode: post
strike: 145.5721440593029
dip: 54.984442677677144
rake: -114.77908006170307
length: 13046.578107041581
width: 9770.686350202324
velocity: 3500.0
slip: 0.5359876408166948
patch_widths: [2.0]
patch_lengths: [2.0]
extension_widths: [0.6]
extension_lengths: [0.4]
sample_rate: 1.1574074074074073e-05
sampler_config: !beat.SamplerConfig
name: SMC
progressbar: true
buffer_size: 5000
parameters: !beat.SMCConfig
tune_interval: 50
check_bnd: true
rm_flag: true
n_jobs: 10
n_steps: 100
n_chains: 1000
coef_variation: 1.0
stage: 0
proposal_dist: MultivariateNormal
update_covariances: false
hyper_sampler_config: !beat.SamplerConfig
name: Metropolis
progressbar: true
buffer_size: 5000
parameters: !beat.MetropolisConfig
tune_interval: 50
proposal_dist: Normal
check_bnd: true
rm_flag: false
n_jobs: 1
n_steps: 25000
n_chains: 20
thin: 2
burn: 0.5

@hvasbath
Copy link
Owner

hvasbath commented Jan 27, 2019

Of course after setting it to lsq you will have to rerun the sampling after deleting all your old sampling results. As mentioned earlier you should set the n_chains parameters and n_steps parameters to higher values. For the tutorial I used 3000 n_chains and 300 nsteps. Did you also do the hyper parameter estimation including the laplacian? Your bounds there are rather narrow. Try with -5, 5.

Please also do not use any decimation factor in the ffo= set it to 1 and rerun your linear GF calculations!

@vic-chou
Copy link
Author

Yes, I run the "beat sample Laquila --hypers --mode=ffo" to do the hyper parameter estimation including the laplacian. The bounds -3~2 is updated after running the "beat sample Laquila --hypers --mode=ffo". Should I set the bounds to -5,5 without running the command "beat sample Laquila --hypers --mode=ffo"? Does the parameters "n_chains" and "nsteps" refer to theparameters in "sampler_config" section not in "hyper_sampler_config" section?

@hvasbath
Copy link
Owner

Yes set the parameters by hand without running the hypers-otherwise they will be overwritten again.
Of course this refers to the sampler_config.

@vic-chou
Copy link
Author

OK, now I can obtain the same slip distribution in the tutorial under your suggestion. Thank you!

@hvasbath
Copy link
Owner

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants