Releases: OverLordGoldDragon/ssqueezepy
v0.6.5
v0.6.4
QoL, cleanups, fixes
FEATURES
freq_to_scale
&scale_to_freq
, experimental- Improved auto-
scales
- Optional
nan_checks
- Improved default
gamma
BREAKING
ssq_freqs
now correctly maps frequencies to corresponding rows ofTx
forssq_cwt
, no longer requiring[::-1]
scales
returned as 1Dextract_ridges
:ridge_f
(formerlyfridge
) now returnsscales
rather thanlog(scales)
extract_ridges
: renamed:fridge -> ridge_f
,max_energy -> ridge_e
FIXES
- False warning for
t
&fs
- Extended scope of
astensor
toscales
,ssq_freqs
visuals
: improvexticks
&yticks
handling
MISC
- Added citation; README changes; docs changes
experimental
: removephase_squeeze
,phase_transform
visuals.imshow
: defaultcmap='turbo'
visuals
: addedauto_xlims
,squeeze
DOI
Adds a DOI for citation purposes
GPU & CPU acceleration
Dramatic speed and memory improvements, along other changes; see changelog.
Generalized Morse Wavelets, Ridge Extraction, Testing Suite
A massive update.
FEATURES (major)
- Generalized Morse Wavelets (
gmw
,morsewave
in_gmw.py
) - Automatic time-frequency ridge extraction,
ridge_extraction.py
- Signal testing suite,
_test_signals.py
, and examples - Higher-order CWT (via GMWs);
_cwt.cwt_higher_order
configs.ini
, used to control function defaults globallyscales
default improved to not over-represent low frequencies
FEATURES (other)
visuals
: addedwavelet_filterbank
,viz_cwt_higher_order
,viz_gmw_orders
(first callable aswavelet.viz('filterbank')
)visuals.wavelet_tf
: autopicksscale
forscale=None
to give a nice visual for anywavelet
ssq_cwt
&ssq_stft
: added argpreserve_transform
to (see docstrings)padsignal
: 2D input support, of form(n_signals, signal_length)
(i.e. will pad every row vector).cwt
: support forpadtype=None
maprange
: tuple of floats now supported (help(_ssq_cwt.ssq_cwt)
)Wavelet.info()
and@property
s ofWavelet
revamped for generality; added@property
s:wc_ct
,scalec_ct
.wavelets.center_frequency
: addedkind='peak-ct'
utils.find_max_scale
now simpler and more effective, guaranteeing complete spectral coverage for low frequencies
BREAKING
utils.py
->utils/*
:common.py
,cwt_utils.py
,stft_utils.py
- The default wavelet has been changed from
'morlet'
to'gmw'
- Changed Morlet's default parameters to closely match GMW's defaults per time & frequency resolution
ssq_cwt(mapkind=)
default change:'maximal'
to'peak'
scales
default change: implicitpreset
from'maximal'
to'minimal'
for low scales,'maximal'
for highssq_cwt
return order change:Tx, ssq_freqs, Wx, scales, w
toTx, Wx, ssq_freqs, scales, w, dWx
(additionally returningdWx
)ssq_stft
return order change:Tx, ssq_freqs, Sx, Sfs, dSx, w
toTx, Sx, ssq_freqs, Sfs, w, dSx
ssqueezing
&ssq_cwt
: renamedmapkind
tomaprange
difftype
:'direct'
->'trig'
_infer_scaletype
->infer_scaletype
_integrate_analytic
->integrate_analytic
find_max_scale
->find_max_scale_alt
, butfind_max_scale
is still (but a different) function
MISC
phase_cwt
: takesabs(w)
instead of zeroing negativeswavelet
inicwt
andissq_cwt
now defaults to the default waveletcwt
: added argsorder
,average
stft
&ssq_stft
: addedt
argumentstft
defaultwindow
increased frequency resolutionvisuals.imshow()
:cmap
now defaults to'jet'
instead of'bone'
forabs=True
- Added Examples to README, adjusted Minimal Example
NOTICE.txt
: added jLabsetup.py
: added short & long description, copyright, keywords
FIXES
visuals.wavelet_heatmap
: stringscales
now functionalvisuals
:w
overreached into negative frequencies for oddN
inwavelet_tf
,wavelet_tf_anim
, &wavelet_heatmap
icwt
:padtype
now functional
FILE CHANGES
ssqueezepy/
added:_gmw.py
,_test_signals.py
,ridge_extraction.py
,configs.ini
,README.md
ssqueezepy/
addedutils/
, splitutils.py
intocommon.py
,cwt_utils.py
,stft_utils.py
,__init__.py
, & moved toutils/
.tests/
added:gmw_test.py
,test_signals_test.py
,ridge_extraction_test.py
examples/
added:extracting_ridges.py
,scales_selection.py
,ridge_extract_readme/
:README.md
,imgs/*
- Created
MANIFEST.in
STFT & Synchrosqueezed STFT
FEATURES:
stft
,istft
,ssq_stft
, andissq_stft
implemented and validated- Added to
utils.py
:buffer
,unbuffer
,window_norm
,window_resolution
, andwindow_area
- Replaced
numba.njit
withnumba.jit(nopython=True, cache=True)
, accelerating recomputing
BREAKING:
cwt()
no longer returnsx_mean
padsignal
now only returns padded input by default;get_params=True
for old behavior- Moved methods:
phase_cwt
&phase_cwt_num
fromssqueezing
to_ssq_cwt
- In future release: return order of
cwt
andstft
will be changed to haveWx, dWx
andSx, dSx
, andssq_cwt
andssq_stft
to haveTx, Wx
andTx, Sx
MISC:
wavelet
positional argument incwt
is now a keyword argument that defaults to'morlet'
- Support for
padsignal(padtype='wrap')
- Added
CHANGELOG.md
- Docstring, comment cleanups
ssqueezepy v0.5.0
Synchrosqueezing arrives to Python:
- Continuous Wavelet Transform, forward & inverse, beating PyWavelets' & scipy's
- CWT-based synchrosqueezing, forward & inverse
- Wavelet visualizations
- Docs/comments explaining relevant concepts
- Several important fixes and performance optimizations relative to original MATLAB repository
- Greater flexibility and improved edge-case handling relative to latest MATLAB implementations
Planned for v0.6.0:
- Short-time Fourier Transform, forward & inverse
- STFT-based synchrosqueezing, forward & inverse
- Generalized Morse Wavelets
Existing users: please review code anew; too many changes to note between Prerelease 2 and v0.5.0. This changes onward, with every change explicitly tracked.
0.5.0 Pre-release 2
- Added
Wavelet
class - Faster wavelet recomputation
- Deprecated
wfiltfn
- Added
setup.py
and requirements
0.5.0 Pre-release
At last, SYNCRHOSQUEEZING is here.
Relative to MATLAB repo:
- Several important fixes
- Possible performance improvements**
- Formula clarity in code and comments; correct quantity placement prioritized over saving code space
- Forward CWT and synchrosqueezing fully* fixed & validated
- Inverse synchrosqueezing fully* fixed & validated
- Inverse CWT and helper methods ported, partly fixed & validated
- Added linear scale support to CWT
- Added support for custom
scales
- Replaced
opts
with Pythonic argument handling
*: not every argument config works. I tested every option, and marked in comments what fails to deliver "good" results (marked with # !!!
and sometimes # TODO
). Unless explicitly stating otherwise, there may be nothing to 'fix' - simply the method is flawed, or thrives in specific settings.
**: I initially didn't realize the MATLAB code was jit-compiled; will run tests to compare speed & memory use.
To-do for first release:
- Complete docstrings
- Add examples
- Revamp README
- Set license
Note that majority of code organization is subject to change by v0.6.0. This includes args placement and defaults, variable, function, and module names, and whether wavelets are functions or class instances.
Not reviewed/validated: synsq_stft.py
, stft_transforms.py
. I don't plan on reviewing these; others are welcome to, and I'll validate changes.