Comments (4)
I am +1 on @aaren's TransformResult.array
method. I am not sure having a class is of much utility for a simple 1D DWT, but I guess if we go that route for the 2D or nD functions it may make sense to just have all functions return a TransformResult for consistency.
@ThomasA
I also have utility functions to convert to and from the array format, but mine is currently configured for the coefficients as returned by the wavedecn
function proposed in PR #52 . I have not made those functions part of a PR yet because they are likely not robust to all wavelets / array sizes as is, but I have used it for 2D and 3D with 'haar' and some of the other 'db*' wavelets successfully.
from pywt.
- Transform that is approximate in the first dimension, detail in the second
- Transform that is at the first level approximate in the first dimension, detail in the second, then at the second level detail at the first dimension and detail in the second
I'm not quite sure that I see the problem with these examples. If you know that that's how your transform behaves, you can create the proper output class to put the approximation coefficients for both levels in an approx
attribute right?
from pywt.
I don't see how an approx
attribute will work for the multidimensional case. To specify the transform, it needs to know whether it is approximate or detail in every dimension, since each dimension is independent. Then that needs to happen at every level. So if I have the transform of a 2D signal, does an approx
attribute refer to something that's approximate in the first dimension, the second, both, or any of them?
from pywt.
I think the TransformResult object should also have a copy of the original shape prior to the transformation. This way problems like the example below could be automatically fixed by truncation to the original shape.
example of current behaviour:
a = np.arange(7)
cA, cD = pywt.dwt(a, 'haar')
a_roundtrip = pywt.idwt(cA, cD, 'haar')
output:
a_roundtrip = array([ 0. 1. 2. 3. 4. 5. 6. 6.])
(duplicate last element)
from pywt.
Related Issues (20)
- need detailed and clear descriptions of algoritms HOT 1
- Why is there no option to choose the signal extension mode in the SWT? HOT 1
- Any C/C++ API/interface? HOT 3
- Can't find pywt._extensions._pywt during tests HOT 3
- PyWavelets module installation issues and importing pywt error HOT 3
- What is the difference among horizontal detail coefficients, vertical detail coefficients and diagonal detail coefficients? HOT 1
- [Question] Can pywavelets generate a filter/kernel bank of coefficients?
- [question] create CWT filter bank HOT 1
- CWT pseudo frequency HOT 1
- how to process mutli-channels signal HOT 1
- SWT and max decomposing levels
- Enhanced documentation for CWT HOT 1
- Time Series Decompose
- Tests crash with 32-bit (x86) Python 3.12 + Cython 3.0.2 on Windows HOT 1
- Adding a new wavelet/ issues with using a development fork HOT 1
- AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'? HOT 4
- Divergence Free Wavelet Demo
- upcoef differs from waverec
- Issue running tests on local repo HOT 7
- Bug: cannot run tests with an editable installation of `pyWavelets`, possible `pytesttester` test collection discrepancy? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pywt.