Comments (7)
Just test how long it will take to use scipy's in-built functionality to find pairs. For 120000 sub image pixels and 5000 source pixels, the time cost for pairing (building the Delaunay and finding pairs for all sub image pixels) is only ~ 0.05s for one cpu. The major cost is next step which is to compute the weight of each point. It takes ~ 4s. So probably we can just use the scipy built-in function to find pairs but for the weight computing part we need to use numba to speed it up. If we choose to use scipy built-in functionality, do we still need to compute pixelization_index_for_voronoi_sub_slim_index_from
?
from pyautolens.
That is extremely fast for pairing! I would expect the function pixelization_index_for_voronoi_sub_slim_index_from
to take > 5 seconds for that number of image / source pixels. There must be a geometric exploit for a Delaunay that speeds this up a lot compared to the Voronoi (for a Rectangular grid this process is extremely fast).
I would imagine that the SciPy computation of interpolation weights is as good as we can hope for in terms of run time. Its a very well optimized library. What are the run times for 30000 / 60000 / 120000 / 240000 sub-pixels and 1500 / 2500 source pixels?
from pyautolens.
sub_pixels | source_pixels | pairing time | weight time
65000 2600 0.03 1.8
125000 2600 0.03 4.6
215000 2600 0.03 7.1
65000 1500 0.02 1.8
125000 1500 0.02 3.8
215000 1500 0.03 7.3
The part computing the weights is written by myself and they are pure python scripts, so it's slow.
from pyautolens.
Ah, that is good news! Sounds like this can be lightning fast, once we speed up the weights.
Can you use this to get the weights efficiently?
from pyautolens.
Ah! Thanks! Didn't expect scipy actually implemented Delaunay interpolation. Will try to build it in.
from pyautolens.
Complied the weighting part with Numba, now with 125000 sub pixels and 5000 source pixels, the time cost for weighting computation is ~ 0.3 s (using one core) on my computer. Is this speed acceptable?
from pyautolens.
Amazing, signifcantly faster overall than the non interpolated Voronoi 🥳
from pyautolens.
Related Issues (20)
- Delaunay Implementation HOT 9
- W Tilde Imaging With Interpolation
- Create Tracer from result with same API as instance
- Galaxy.dict() not returning parameters correctly HOT 3
- How to handle memory error while modeling a dataset? HOT 2
- Unit test failing due to from_dict HOT 1
- Multiprocessing RuntimeError HOT 13
- API consistency issues? HOT 1
- Multicore task in a cluster HOT 10
- Autoconf conf.py - Key error HOT 5
- Fix Aggregator Tests
- Database session support for all new types of output
- can't install autolens via pip using jupiter notebook HOT 20
- pylops/scipy.sparse.linalg import does not exist
- Slam script incorrect ResultInterferometer and ResultImaging adapt_image calls HOT 58
- JAX on older HPC issues HOT 2
- Pixelization interferometer search reconstructs negative fluxes HOT 4
- Slam pipeline positions not able to update from previous search HOT 6
- Slam pipeline chaining using mass_total tracer; PowerLaw not working with chaining_util HOT 2
- .json output now working for `PointDataset` HOT 2
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 pyautolens.