Skip to content

Commit

Permalink
DOC: fix small inconsistency in different transforms tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
mhvk committed Aug 29, 2024
1 parent a510f33 commit ef92532
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/tutorials/different_transforms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,14 @@ One sees how badly smeared the signal is.
dynspec += noise * np.random.normal(size=dynspec.shape)
# Normalize
dynspec /= dynspec.mean()
ds = DS(dynspec, f=f, t=t, noise=noise)
# Smooth edges to reduce peakiness in sec. spectrum.
alpha_nu = 0.25
alpha_t = 0.5 # Bit larger so nu-t transform also is OK.
taper = (tukey(dynspec.shape[-1], alpha=alpha_nu)
* tukey(dynspec.shape[0], alpha=alpha_t)[:, np.newaxis])
dynspec = (dynspec - 1.0) * taper + 1.0
# Create Dynamic and Conjugate spectra.
ds = DS(dynspec, f=f, t=t, noise=noise)
cs = CS.from_dynamic_spectrum(ds)
cs.tau <<= u.us # nicer than 1/MHz
cs.fd <<= u.mHz # nicer than 1/min
Expand Down

0 comments on commit ef92532

Please sign in to comment.