Skip to content

Commit

Permalink
fix(DelaySpectrumEstimatorBase): initialize rng on all ranks
Browse files Browse the repository at this point in the history
  • Loading branch information
sjforeman committed Oct 28, 2022
1 parent 38f22d2 commit 6656420
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions draco/analysis/delay.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ def process(self, ss):

initial_S = np.ones_like(delays) * 1e1

# Get the random Generator that we will use
# Initialize the random number generator we'll use
rng = self.rng

# Iterate over all baselines and use the Gibbs sampler to estimate the spectrum
Expand Down Expand Up @@ -667,6 +667,9 @@ def process(self, ss: FreqContainerType) -> containers.DelaySpectrum:

initial_S = np.ones_like(delays) * 1e1

# Initialize the random number generator we'll use
rng = self.rng

# Iterate over all baselines and use the Gibbs sampler to estimate the spectrum
for lbi, bi in delay_spec.spectrum[:].enumerate(axis=0):

Expand Down Expand Up @@ -706,7 +709,7 @@ def process(self, ss: FreqContainerType) -> containers.DelaySpectrum:
window=self.window if self.apply_window else None,
fsel=non_zero_channel,
niter=self.nsamp,
rng=self.rng,
rng=rng,
complex_timedomain=self.complex_timedomain,
)

Expand Down

0 comments on commit 6656420

Please sign in to comment.