Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
hvasbath committed May 2, 2024
1 parent 3b8154a commit 5f19b45
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
6 changes: 3 additions & 3 deletions beat/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
dump,
load,
)
from pytensor import config as tconfig
from theano import config as tconfig

from beat import utility
from beat.covariance import available_noise_structures, available_noise_structures_2d
Expand Down Expand Up @@ -1200,8 +1200,8 @@ def get_traction_field(self, discretized_sources):


class BEMConfig(MediumConfig):
poissons_ratio = Float.T(default=0.25, help="Poisson's ratio")
shear_modulus = Float.T(default=33e9, help="Shear modulus [Pa]")
nu = Float.T(default=0.25, help="Poisson's ratio")
mu = Float.T(default=33e9, help="Shear modulus [Pa]")
earth_model_name = String.T(default="homogeneous-elastic-halfspace")
mesh_size = Float.T(
default=0.5,
Expand Down
2 changes: 2 additions & 0 deletions beat/plotting/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ def do_nothing(x):
"sigma": ("rake", num.rad2deg),
"major_axis": ("a_half_axis", do_nothing),
"minor_axis": ("b_half_axis", do_nothing),
"major_axis_bottom": ("a_half_axis_bottom", do_nothing),
"minor_axis_bottom": ("b_half_axis_bottom", do_nothing),
"tensile_traction": ("normal_traction", do_nothing),
}

Expand Down
8 changes: 6 additions & 2 deletions beat/plotting/marginals.py
Original file line number Diff line number Diff line change
Expand Up @@ -679,10 +679,13 @@ def correlation_plot_hist(
axes = []

point_to_sources = mapping.point_to_sources_mapping()
if "magnitude" in varnames:
point_to_sources["magnitude"] = range(mapping.n_sources)
print(mapping.n_sources)
source_param_dicts = utility.split_point(
point_to_sources,
point_to_sources=point_to_sources,
n_sources_total=sum(mapping.n_sources),
n_sources_total=mapping.n_sources,
)
min_source_ixs = {
varname: int(min(idxs)) for varname, idxs in point_to_sources.items()
Expand All @@ -696,6 +699,7 @@ def correlation_plot_hist(
weeded_source_varnames = [
varname for varname in varnames if varname in source_varnames
]

nvar = len(weeded_source_varnames)

if figsize is None:
Expand All @@ -707,7 +711,7 @@ def correlation_plot_hist(
fig, axs = plt.subplots(nrows=nvar, ncols=nvar, figsize=figsize)

if hist_color is None:
if nvar_elements == 1:
if mapping.n_sources == 1:
pcolor = "orange"
else:
pcolor = mpl_graph_color(source_i)
Expand Down

0 comments on commit 5f19b45

Please sign in to comment.