Skip to content

Commit

Permalink
Fix secs.fit() usage in plot_animation.py
Browse files Browse the repository at this point in the history
This addresses recent changes to secs.fit() where obs_var (error
variances) was changed to obs_std (error standard deviations).
  • Loading branch information
erigler-usgs committed May 11, 2021
1 parent 6b30731 commit 58bdd92
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions examples/plot_animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@
B_obs[:, :, 0] *= 2*np.sin(np.deg2rad(obs_lat_lon_r[:, 0]))
B_obs[:, :, 1] *= 2*np.sin(np.deg2rad(obs_lat_lon_r[:, 1]))

B_var = np.ones(B_obs.shape)
B_std = np.ones(B_obs.shape)
# Ignore the Z component
B_var[..., 2] = np.inf
# Can modify the variance as a function of time to
B_std[..., 2] = np.inf
# Can modify the standard error as a function of time to
# see how that changes the fits too
# B_var[:, 0, 1] = 1 + ts
# B_std[:, 0, 1] = 1 + ts

# Fit the data, requires observation locations and data
secs.fit(obs_loc=obs_lat_lon_r, obs_B=B_obs, obs_var=B_var)
secs.fit(obs_loc=obs_lat_lon_r, obs_B=B_obs, obs_std=B_std)

# Create prediction points
# Extend it a little beyond the observation points (-11, 11)
Expand Down

0 comments on commit 58bdd92

Please sign in to comment.