Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow transform of DS to wavelength grid #39

Open
mhvk opened this issue May 4, 2021 · 0 comments
Open

Allow transform of DS to wavelength grid #39

mhvk opened this issue May 4, 2021 · 0 comments

Comments

@mhvk
Copy link
Owner

mhvk commented May 4, 2021

Roughly, assuming an existing regular secondary spectrum ss made from a dynamic spectrum ds:

step1 = np.zeros_like(ss.secspec)
waveish = ds.f.mean()**2 / ds.f
ph = phasor(waveish, ss.tau[:, np.newaxis])  # not the conjugate!
for d, s in zip(ds.dynspec, step1):
    s[...] = (d * ph).sum(-1)
lt = np.fft.fftshift(np.fft.fft(step1, axis=0), axes=0)
lt /= np.abs(lt[lt.shape[0]//2, lt.shape[1]//2])
lt = SecondarySpectrum(lt, ss.fd, ss.tau, ss.noise, ss.d_eff, ss.mu_eff)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant