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
The cmor, shan and fbspContinuousWavelet objects have both a bandwidth_frequency and center_frequency attribute. If a user calls the cwt routine in Matlab these must be specified in the name as follows:
e.g. cmor1.5-1 gives a complex Morlet wavelet with bandwidth_frequency of 1.5 and center_frequency of 1.0.
To do the equivalent in PyWavelets one currently has to first create a wavelet and then manually modify the attributes:
If the user passes just 'cmor' to the cwt routine in Matlab an error would be raised as the bandwidths are not specified. In PyWavelets, this currently does not raise an error and default values are set (these appear to be equivalent to `'cmor1.0-0.5' in Matlab).
I propose to allow parsing the 2 bandwidth parameters from the Wavelet names as is done in Matlab.
I think it is also probably good to require that these be specified than choosing some undocumented default. (i.e. raise an exception if just the blank wavelet family name such as cmor is passed into cwt or ContinuousWavelet)
The default setting has already caused some confusion as in #307
The text was updated successfully, but these errors were encountered:
How can I set the number of cycles for complex morlet wavelet?
I don't know off-hand what the relation is to convert between the center frequency and bandwidth to the number of cycles, but you can plot the output of something like the following to get some idea of this in practice:
The
cmor
,shan
andfbsp
ContinuousWavelet
objects have both abandwidth_frequency
andcenter_frequency
attribute. If a user calls thecwt
routine in Matlab these must be specified in the name as follows:e.g.
cmor1.5-1
gives a complex Morlet wavelet withbandwidth_frequency
of 1.5 andcenter_frequency
of 1.0.To do the equivalent in PyWavelets one currently has to first create a wavelet and then manually modify the attributes:
If the user passes just
'cmor'
to thecwt
routine in Matlab an error would be raised as the bandwidths are not specified. In PyWavelets, this currently does not raise an error and default values are set (these appear to be equivalent to `'cmor1.0-0.5' in Matlab).I propose to allow parsing the 2 bandwidth parameters from the Wavelet names as is done in Matlab.
I think it is also probably good to require that these be specified than choosing some undocumented default. (i.e. raise an exception if just the blank wavelet family name such as
cmor
is passed intocwt
orContinuousWavelet
)The default setting has already caused some confusion as in #307
The text was updated successfully, but these errors were encountered: