Skip to content

Commit

Permalink
plotting.geodetic.gnss_fits: fix VR histogram, test for VR spread
Browse files Browse the repository at this point in the history
  • Loading branch information
hvasbath committed May 2, 2024
1 parent bcd501d commit 349ba91
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions beat/plotting/geodetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,14 +373,25 @@ def gnss_fits(problem, stage, plot_options):

# get resulting bounds no plotting
vmin, vmax = var_reductions_ens.min(), var_reductions_ens.max()
vspread = num.abs(vmax - vmin)
if vspread < 1e-4:
logger.warning(
"Spread in Variance Reduction is too small: %f, "
"skipping histogram plot!" % vspread
)
figs.append(m)
continue
# axis bounds
imin, imax, sinc = get_nice_plot_bounds(vmin, vmax)
nbins = 50
# hist bins
Z = 0

out_filename = "/tmp/histbounds.txt"
in_rows = num.atleast_2d(all_var_reductions[dataset.component]).T

m.gmt.pshistogram(
in_rows=num.atleast_2d(all_var_reductions[dataset.component]).T,
W=(imax - imin) / nbins,
in_rows=in_rows,
W=1.5,
out_filename=out_filename,
Z=Z,
I="o",
Expand All @@ -403,8 +414,8 @@ def gnss_fits(problem, stage, plot_options):
] + jxyr

m.gmt.pshistogram(
in_rows=num.atleast_2d(all_var_reductions[dataset.component]),
W=(imax - imin) / nbins,
in_rows=in_rows,
W=1.5,
G="lightorange",
Z=Z,
F=True,
Expand Down

0 comments on commit 349ba91

Please sign in to comment.