OverLordGoldDragon / ssqueezepy

Synchrosqueezing, wavelet transforms, and time-frequency analysis in Python
MIT License
599 stars 92 forks source link

Getting the scaleogram image from imshow #66

Closed allianceai closed 2 years ago

allianceai commented 2 years ago

Great work with this library!

I am attempting to generate scaleogram images as shown by imshow() , in order to classify them with a convolutional neural network. Of course, I am able to generate the 2D array that is passed to imshow() with cwt(data, 'morlet') , where data is my 1D signal. However, I am hoping to derive the 3D array with the colormap applied as it is in your imshow() function, so that the resulting 3D array can be passed into a neural network.

Any suggestions? Thanks!

OverLordGoldDragon commented 2 years ago

This appears to more a "how to make grayscale into RGB" question; consider asking (or searching through existing answers) StackOverflow. I will note, I don't necessarily recommend grayscale->RGB for ML.