Commit 1624be53 authored by syz's avatar syz
Browse files

Swapped the forward with reverse

parent ddc4fd06
......@@ -258,7 +258,7 @@ class GIVBayesian(Process):
# first roll the data
rolled_raw_data = np.roll(self.data, self.roll_pts, axis=1)
self.forward_results = parallel_compute(rolled_raw_data[:, :half_v_steps], do_bayesian_inference,
self.reverse_results = parallel_compute(rolled_raw_data[:, :half_v_steps], do_bayesian_inference,
cores=self._cores,
func_args=[self.rolled_bias[:half_v_steps], self.ex_freq],
func_kwargs=bayes_parms)
......@@ -266,7 +266,7 @@ class GIVBayesian(Process):
if self.verbose:
print('Finished processing forward sections. Now working on reverse sections....')
self.reverse_results = parallel_compute(rolled_raw_data[:, half_v_steps:], do_bayesian_inference,
self.forward_results = parallel_compute(rolled_raw_data[:, half_v_steps:], do_bayesian_inference,
cores=self._cores,
func_args=[self.rolled_bias[half_v_steps:], self.ex_freq],
func_kwargs=bayes_parms)
......
......@@ -218,10 +218,10 @@ def bayesian_inference_on_period(i_meas, excit_wfm, ex_freq, r_extra=220, num_x_
cos_omega_t = np.roll(excit_wfm, int(num_v_steps * roll_val))
y_val = np.roll(i_meas, int(num_v_steps * roll_val))
half_x_steps = num_x_steps // 2
forw_results = do_bayesian_inference(y_val[:int(0.5 * num_v_steps)], cos_omega_t[:int(0.5 * num_v_steps)],
rev_results = do_bayesian_inference(y_val[:int(0.5 * num_v_steps)], cos_omega_t[:int(0.5 * num_v_steps)],
ex_freq, num_x_steps=half_x_steps,
econ=True, show_plots=False, **kwargs)
rev_results = do_bayesian_inference(y_val[int(0.5 * num_v_steps):], cos_omega_t[int(0.5 * num_v_steps):],
forw_results = do_bayesian_inference(y_val[int(0.5 * num_v_steps):], cos_omega_t[int(0.5 * num_v_steps):],
ex_freq, num_x_steps=half_x_steps,
econ=True, show_plots=False, **kwargs)
# putting the split inference together:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment