You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the struct impulse is very elegant: it has two fields, which are functions representing the impulse in time and frequency (one being the analytic Fourier Transform of the other). However, I think the struct should be easy to use and understand for the most common cases of use. These are:
simple analytic functions like a discrete delta and Gaussian
providing a discrete impulse in either time (most common) or frequency. This is always the case when comparing with experiments.
In both cases, it should be easy to plot both the impulse in time and frequency, even if the user only provided the impulse in, say, time. Currently I think it is not easy to provide 2, and even the inability to plot the discrete delta function in 1 will confuse most. For example, after sampling the discrete delta in frequency, it can be useful to look at the resulting impulse in time, and vice-versa (a common exercise in signal processing). It helps decide how to sample the frequency.
I think it will make our lives easier to use instead
One draw back is that it seems that both the vectors ω and t need to be supplied. But this is not really an issue in practice, and, for example, the impulse in time can be easily re-sampled from the impulse in frequency for a different t vector.
Although the struct impulse is elegant, and is more flexible than above, there is no clear example where this flexibility is needed. And I think it is not worth the added complications of trying to convert impulse vectors to functions.
The text was updated successfully, but these errors were encountered:
I suppose there's no reason not to have both, one called DiscreteImpulse and the other ContinuousImpulse. Users wouldn't even have to see them, they'd just use the most relevant constructor and multiple dispatch will decide how to compute with them.
changes made:
- the default now is to use the DiscreteImpulse rather than the continuous impulse
- Dirac delta in frequency has a constant different from Dirac in time
- time_to_frequency now also multiplies the impulse in frequency. To use the impulse in time it should be a convolution
Currently the struct
impulse
is very elegant: it has two fields, which are functions representing the impulse in time and frequency (one being the analytic Fourier Transform of the other). However, I think the struct should be easy to use and understand for the most common cases of use. These are:In both cases, it should be easy to plot both the impulse in time and frequency, even if the user only provided the impulse in, say, time. Currently I think it is not easy to provide 2, and even the inability to plot the discrete delta function in 1 will confuse most. For example, after sampling the discrete delta in frequency, it can be useful to look at the resulting impulse in time, and vice-versa (a common exercise in signal processing). It helps decide how to sample the frequency.
I think it will make our lives easier to use instead
One draw back is that it seems that both the vectors
ω
andt
need to be supplied. But this is not really an issue in practice, and, for example, the impulse in time can be easily re-sampled from the impulse in frequency for a differentt
vector.Although the struct
impulse
is elegant, and is more flexible than above, there is no clear example where this flexibility is needed. And I think it is not worth the added complications of trying to convert impulse vectors to functions.The text was updated successfully, but these errors were encountered: