Complex amplitudes in models
See original GitHub issueEDIT: Workaround at https://github.com/astropy/astropy/issues/8833#issuecomment-595057891
I have a complex problem that I’m hoping someone can help me fix.
I have the first N
complex terms of the Fourier transform of a 1D data series, which can be used to reconstruct an approximation of the original data series. I would like to represent the approximation using astropy models, which can be achieved using Euler’s formula and a combination of Sine1D
models. However, I need to construct a combination of Sine1D
models which have complex amplitudes, like this:
import numpy as np
from astropy.modeling import models
fft = np.array([1323.05768443 +0.j , -473.6786725 -120.72642364j,
-199.59351462-147.75512434j, -11.8952061 -41.34435797j,
26.37171375 +56.57267775j, -10.34686085 +61.77508734j,
-26.32020494 +18.12691033j, 8.11154341 -6.89937425j,
18.11907541 -6.4711258j , 9.37345637 +9.30265208j])
N = 100
n = np.arange(len(fft))
k = np.arange(N)[:, np.newaxis]
m = models.Sine1D(frequency=k/N, phase=1/4) + models.Sine1D(amplitude=1j, frequency=k/N, phase=0)
Presently this raises an issue because the amplitude is expected to be convertable to a float. Is there any way around that?
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Complex Amplitude - an overview | ScienceDirect Topics
(2001) proposed a procedure to determine complex travel times and complex amplitudes from observed transfer functions by means of autoregressive modeling. The ...
Read more >1.3.3.8. Complex Demodulation Amplitude Plot
Complex Demodulation Amplitude Plot. Purpose: Detect Changing Amplitude in Sinusoidal Models, In the frequency analysis of time series models, a common model is ......
Read more >Complex Number Arithmetics & modeling sine waves - firmfunda
Complex number is used to model Sine waves of same frequency, varying in amplitude and phase. Complex number is used to model Systems...
Read more >Coarse-grained modeling of crystals by the amplitude ...
In particular, the coarse-grained PFC model referred to in the literature as amplitude expansion of the PFC, complex amplitude phase-field ...
Read more >Complex Amplitude-Phase Boltzmann Machines - DeepAI
The model is capable of performing unsupervised learning on the amplitude and relative phase distribution in complex data.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@perrygreenfield I found a solution to my problem by recasting it as a real-valued-only problem.
Excellent! Thanks for working around this.