Comments (3)
Hi Younes - I would not like to learn cython but speedups are generally welcome. You can usually get a much bigger speedup by using a different algorithm. Grid index is an especially bad example of using a poor algorithm which is sensitive to parameter selection. There is a testcase simul_1000_grains which can be used for profiling. The methods from Sharma's PhD work should go a lot faster anyway (match up Friedel pairs and look at position constraints as part of indexing).
There are some issues about load balancing between openmp versus multiprocessing depending on the problem size and machine you are running on. It is very bad to have lots of processes that all start lots of threads.
If you think some routine is "slow" you can try adding @numba.jit
before a function call and see if it makes any difference.
from imaged11.
Thank you Jon for these interesting insights. Indeed, xrd indexing algorithms are not time consuming, compared to 3D tomography, finite elements and other heavy scientific computing tasks.
I saw a little talk where cython improved speed by x100 simply by declaring c-like variables and writing python code, but I'm not sure how steep is its learning curve though (when it comes to advanced optimization).
I will take a closer look to Sharma's work and I would like to do some profiling with numba, cython, openmp/multiprocessing if I find a free cloud cpu service (my local machine has 8 threads, a rather ordinary processor).
I like the ImageD11 algorithm, and all the useful function the software offers. If I may ask, are you planning to refactor it using a new algorithm in the future or you would prefer to focus on adding additional features / continuous improvements to the current software?
Thanks a lot!
from imaged11.
So I will close this for now - numba has been creeping into the code lately.
from imaged11.
Related Issues (20)
- Scale Eiger detector images to ring currents / fpico4 / fpico6 / something else
- Test function at the bottom of indexing.py HOT 1
- Sophisticated identification of "good" vs "bad" grain sinograms
- 3DXRD/S3DXRD notebooks should contain no complicated functions HOT 3
- Python class for collection of grains HOT 3
- Add a scanlist option to import from sparse
- hkl peak list generation fails in some cases
- mlem output_size fails for even output size
- Concurrent Futures style multiprocessing context manager
- Sinogram class HOT 2
- Peakselect module HOT 2
- Make sandbox importable
- Grain recon class HOT 2
- mask argument for mlem is not used internally HOT 4
- Get rid of the shared memory arrays : add a colfile mmap option HOT 2
- sinograms.geometry module HOT 2
- Module based spatial distortions HOT 1
- GrainMap class
- notebooks are not in the install
- makemap.py introduces a rotation to grain positions in the lab frame for hexagonal systems HOT 1
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 imaged11.