Menu

#124 Improve autorg speed

open
nobody
None
5
2020-04-07
2020-04-07
No

Jeorme (ESRF/pyFAI) suggested some ways to improve autorg speed. For example, could reimplement the weightled least squares so that the weighted arrays (weights*y, weights*x**2, etc) are only calculated once for the entire data range, rather than for each inteval. Similarly, calculate all of the scores during the initial loop, and do it using a broadcast with a scores array and a weights array so multiplication is fast and done in numpy. Then just take the argmax to find the best result.

His cython code is here:
https://github.com/kif/freesas/blob/master/freesas/autorg.pyx

Discussion


Log in to post a comment.

MongoDB Logo MongoDB