Skip to content

Commit

Permalink
fix(DelaySpectrum): pass along attributes to DelaySpectrum output
Browse files Browse the repository at this point in the history
  • Loading branch information
anjakefala committed Jan 24, 2022
1 parent bb175e3 commit b76ffab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions draco/analysis/delay.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ def process(self, ss):
delays = np.fft.fftshift(np.fft.fftfreq(ndelay, d=self.freq_spacing)) # in us

# Initialise the spectrum container
delay_spec = containers.DelaySpectrum(baseline=baselines, delay=delays)
delay_spec = containers.DelaySpectrum(baseline=baselines, delay=delays, attrs_from=ss)
delay_spec.redistribute("baseline")
delay_spec.spectrum[:] = 0.0

Expand Down Expand Up @@ -609,7 +609,7 @@ def process(self, ss: FreqContainerType) -> containers.DelaySpectrum:
# Use the "baselines" axis to generically represent all the other axes

# Initialise the spectrum container
delay_spec = containers.DelaySpectrum(baseline=nbase, delay=delays)
delay_spec = containers.DelaySpectrum(baseline=nbase, delay=delays, attrs_from=ss)
delay_spec.redistribute("baseline")
delay_spec.spectrum[:] = 0.0
bl_axes = [da for da in data_axes if da not in [self.average_axis, "freq"]]
Expand Down

0 comments on commit b76ffab

Please sign in to comment.