wavelib icon indicating copy to clipboard operation
wavelib copied to clipboard

I need this library in JS or Python

Open Garfield2013 opened this issue 1 year ago • 6 comments

  1. I have played around with the Python package: https://github.com/PyWavelets/pywt but when I use this I can only use a decomposing level of max 2 when my input array is of 75000 data-points? In your smaller online demo here: https://rafat.github.io/wavelib/#/denoise I can set the following: VisuShrink, biorthogonal, SWT, hard, bior1.1 AND a lot higher decomposing level of 11?? Why is this possible when the python library only support level 2 in my case?

  2. I need this wavelib library in javascript (or python): I can see in the source code of the demo page that a js-file exists - but it looks like it is obfuscated or similar? https://rafat.github.io/wavelib/js/wavelib.js Does an JS version of the library exist?

I'm all new to wavelets - so sorry if I ask about something obvious to you guys :)

Thank you so much!

Garfield2013 avatar Jul 01 '23 18:07 Garfield2013

  1. I reviewed the pywt library for a technical Journal a few years ago but I haven't looked at it recently so I can't really comment . However, I think you should be able to get more than 2 decomposition levels for a 75000 datapoint signal.

  2. Javascript code is the emscripten/WASM code so it is a lot more efficient than a plain js code. You can check https://github.com/rafat/wavelib/blob/gh-pages/js/ngfile.js to see how to call the dwt/swt functions in javascript.

On Sat, Jul 1, 2023 at 11:53 PM Garfield2013 @.***> wrote:

I have played around with the Python package: https://github.com/PyWavelets/pywt but when I use this I can only use a decomposing level of max 2 when my input array is of 75000 data-points? In your smaller online demo here: https://rafat.github.io/wavelib/#/denoise I can set the following: VisuShrink, biorthogonal, SWT, hard, bior1.1 AND a lot higher decomposing level of 11?? Why is this possible when the python library only support level 2 in my case? 2.

I need this wavelib library in javascript (or python): I can see in the source code of the demo page that a js-file exists - but it looks like it is obfuscated or similar? https://rafat.github.io/wavelib/js/wavelib.js Does an JS version of the library exist?

I'm all new to wavelets - so sorry if I ask about something obvious to you guys :)

Thank you so much!

— Reply to this email directly, view it on GitHub https://github.com/rafat/wavelib/issues/35, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3RO57FJYCW2PVYHVAZNTXOBTLZANCNFSM6AAAAAAZ26DKIU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

rafat avatar Jul 02 '23 16:07 rafat

  1. Yes I have now realized that the SWT function has a very specific need in regards to the length of the input array. When I adjust the length I can get 10-15 in decomposing levels.

  2. I have tried to download the entire repo but I can't run it locally on my Windows pc. I mean, I can open the HTML files in the browser. But nothing happens when I click on any of the UI components? What am I missing here?

  3. Should this wavelib repo generate the exact same result as the Python PyWavelets module?

  4. Do you have time to help me with a pure javascript / nodejs solution if I pay you? I don't need any UI. I only need to be able to denoise 1d decimal arrays with the different wavelet settings as shown in the wavelib demo.

Thank you so much in advance!

On Sun, 2 Jul 2023 at 23:05, Rafat Hussain @.***> wrote:

  1. I reviewed the pywt library for a technical Journal a few years ago but I haven't looked at it recently so I can't really comment . However, I think you should be able to get more than 2 decomposition levels for a 75000 datapoint signal.

  2. Javascript code is the emscripten/WASM code so it is a lot more efficient than a plain js code. You can check https://github.com/rafat/wavelib/blob/gh-pages/js/ngfile.js to see how to call the dwt/swt functions in javascript.

On Sat, Jul 1, 2023 at 11:53 PM Garfield2013 @.***> wrote:

I have played around with the Python package: https://github.com/PyWavelets/pywt but when I use this I can only use a decomposing level of max 2 when my input array is of 75000 data-points? In your smaller online demo here: https://rafat.github.io/wavelib/#/denoise I can set the following: VisuShrink, biorthogonal, SWT, hard, bior1.1 AND a lot higher decomposing level of 11?? Why is this possible when the python library only support level 2 in my case? 2.

I need this wavelib library in javascript (or python): I can see in the source code of the demo page that a js-file exists - but it looks like it is obfuscated or similar? https://rafat.github.io/wavelib/js/wavelib.js Does an JS version of the library exist?

I'm all new to wavelets - so sorry if I ask about something obvious to you guys :)

Thank you so much!

— Reply to this email directly, view it on GitHub https://github.com/rafat/wavelib/issues/35, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AAI3RO57FJYCW2PVYHVAZNTXOBTLZANCNFSM6AAAAAAZ26DKIU>

. You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/rafat/wavelib/issues/35#issuecomment-1616713265, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5IZ3NFQCFYMBIDTC2R4V3XOGL3HANCNFSM6AAAAAAZ26DKIU . You are receiving this because you authored the thread.Message ID: @.***>

Garfield2013 avatar Jul 02 '23 16:07 Garfield2013

The best solution will be for you to compile the c library to wasm yourself. Coding the whole thing to JavaScript is going to take up a lot of time unless you want only very specific functionality.

On Sun, 2 Jul 2023 at 10:11 PM, Garfield2013 @.***> wrote:

  1. Yes I have now realized that the SWT function has a very specific need in regards to the length of the input array. When I adjust the length I can get 10-15 in decomposing levels.

  2. I have tried to download the entire repo but I can't run it locally on my Windows pc. I mean, I can open the HTML files in the browser. But nothing happens when I click on any of the UI components? What am I missing here?

  3. Should this wavelib repo generate the exact same result as the Python PyWavelets module?

  4. Do you have time to help me with a pure javascript / nodejs solution if I pay you? I don't need any UI. I only need to be able to denoise 1d decimal arrays with the different wavelet settings as shown in the wavelib demo.

Thank you so much in advance!

On Sun, 2 Jul 2023 at 23:05, Rafat Hussain @.***> wrote:

  1. I reviewed the pywt library for a technical Journal a few years ago but I haven't looked at it recently so I can't really comment . However, I think you should be able to get more than 2 decomposition levels for a 75000 datapoint signal.

  2. Javascript code is the emscripten/WASM code so it is a lot more efficient than a plain js code. You can check https://github.com/rafat/wavelib/blob/gh-pages/js/ngfile.js to see how to call the dwt/swt functions in javascript.

On Sat, Jul 1, 2023 at 11:53 PM Garfield2013 @.***> wrote:

I have played around with the Python package: https://github.com/PyWavelets/pywt but when I use this I can only use a decomposing level of max 2 when my input array is of 75000 data-points? In your smaller online demo here: https://rafat.github.io/wavelib/#/denoise I can set the following: VisuShrink, biorthogonal, SWT, hard, bior1.1 AND a lot higher decomposing level of 11?? Why is this possible when the python library only support level 2 in my case? 2.

I need this wavelib library in javascript (or python): I can see in the source code of the demo page that a js-file exists - but it looks like it is obfuscated or similar? https://rafat.github.io/wavelib/js/wavelib.js Does an JS version of the library exist?

I'm all new to wavelets - so sorry if I ask about something obvious to you guys :)

Thank you so much!

— Reply to this email directly, view it on GitHub https://github.com/rafat/wavelib/issues/35, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AAI3RO57FJYCW2PVYHVAZNTXOBTLZANCNFSM6AAAAAAZ26DKIU>

. You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/rafat/wavelib/issues/35#issuecomment-1616713265, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AA5IZ3NFQCFYMBIDTC2R4V3XOGL3HANCNFSM6AAAAAAZ26DKIU>

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/rafat/wavelib/issues/35#issuecomment-1616727167, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3RO25UEEDGSLANP4GGSLXOGQBZANCNFSM6AAAAAAZ26DKIU . You are receiving this because you commented.Message ID: @.***>

rafat avatar Jul 03 '23 00:07 rafat

  1. I see... But I have no experience with that and I guess all the configuration would require a lot of knowledge about this library here and it would be very time consuming as well?

  2. Please answer this as well: Should this wavelib repo generate the exact same result as the Python PyWavelets module's functions? or is it better for me to use PyWavelets and interact with it via a websocket/api?

Garfield2013 avatar Jul 03 '23 06:07 Garfield2013

I think I’ll be able to help you with generating the wasm code and I don’t think it’ll take too long. About pywavelets, the only way to find out is by testing a signal against both this library and pywavelets. I think we are using the same filters but the paddings may not be identical so the outputs may not always be completely identical in every instance. On Mon, 3 Jul 2023 at 11:35 AM, Garfield2013 @.***> wrote:

I see... But I have no experience with that and I guess all the configuration would require a lot of knowledge about this library here and it would be very time consuming as well? 2.

Please answer this as well: Should this wavelib repo generate the exact same result as the Python PyWavelets module's functions? or is it better for me to use PyWavelets and interact with it via a websocket/api?

— Reply to this email directly, view it on GitHub https://github.com/rafat/wavelib/issues/35#issuecomment-1617414615, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3RO6LFFKR2JRXB7T73S3XOJOJVANCNFSM6AAAAAAZ26DKIU . You are receiving this because you commented.Message ID: @.***>

rafat avatar Jul 03 '23 06:07 rafat

That would be great: Please send me a mail: [email protected] and lets discuss the details :)

Garfield2013 avatar Jul 03 '23 06:07 Garfield2013