Comments (6)
Ok @alicjapolanska I think in theory this loop would be better suited to start from 1 than 0 BUT then we would need a different function which starts from 0 for all the other iterations when a != 1/B. To avoid duplicating code we instead have this exception catch, which in your case (a=1/B) will just ignore the contribution from the first loop.
Now, why the divide by 0 here isn't caught in the C code. C code can be compiled in multiple modes; the two most common being debug and release. When in debug mode C is much more sensitive to these kind of errors (as its useful to see where these bugs will crop up), however because of the extra checks the overall code will be slower. When in release mode C will take whatever garbage you feed it and return an associated value, but it will do this extremely quickly. In this case the divide by zero leads to exp(-infty) = 0 and so the term doesn't contribute as it is 0.
Best way to get around this for now is probably just to explicitly add a check for
if a == 1/B: return 0 else: do the normal function
or something to that effect. Does that make sense?
from s2wav.
I see, thanks @CosmoMatt ! I'll add this check. I imagine we will need to rethink this anyway when we switch to the scipy integrator in the future.
from s2wav.
This issue can be split straightforwardly into three sub-issues: (1) to implement the axisymmetric filters (i.e. filters which depend only on multipole l, these are circularly symmetric filters on the sphere); (2) to implement the directional filters (i.e. filters which depend both on l and m, these filters are more general); (3) implement the validation functions (just to check everything is working!).
- Implement axisymmetric filters (from this line to this line).
- Implement directional filters (from this line to this line).
- Implement the identity validation functions (from this line until the end of the file).
from s2wav.
I'm having some trouble with computing the normalisation. In this line. It throws a divide by zero error in my implementation. The tiling integrand is computed with the value k = 1/B, making t = -1, and giving a 0 in the denominator in the exponent here. This is happening for the first i=0 in this loop here. From my understanding of C this loop should start from i=0. Or is it i=1? That would seemingly solve the issue? @CosmoMatt @jasonmcewen
from s2wav.
Or perhaps the issue is that Python throws an exception with division by zero. Then I could modify the function so that it doesn't try to compute the integrand in the Python version of this if it would be undefined instead of not adding the contribution from undefined terms like in the C code? Or modify the limits when computing the normalisation. @CosmoMatt @jasonmcewen
from s2wav.
I've just taken a look @alicjapolanska and that is particularly funky. I'll take a deeper look now and try to figure out what on earth is going on here.
from s2wav.
Related Issues (20)
- Move from 1D to Tensors
- Support upsampling symmetry HOT 1
- Support reality symmetry
- Move dependency from SSHT/SO3 to S2FFT
- Vectorised Synthesis Transform
- Vectorised Analysis Transform HOT 2
- Vectorise Tiling functions
- Vectorise filter functions
- Support different sampling schemes
- Flesh out unit tests
- Add JAX analysis transform
- Add JAX Synthesis transform
- Add all-contributors
- wavelet transform demo error HOT 4
- Automatic JAX Filters
- `filters_axisym` less stable at high `L` than `pys2let.axisym_wav_l`
- `s2wav` is slow for filter construction at moderate `L` HOT 6
- Wavelets in real space HOT 2
- Add interface that takes spherical harmonic coefficients
- s2wav.analysis fails for Healpix map input with AssertionError
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 s2wav.