Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

efficency deficiency in findorientations.generate_orientation_fibers #74

Open
ddale opened this issue Nov 25, 2014 · 3 comments
Open

efficency deficiency in findorientations.generate_orientation_fibers #74

ddale opened this issue Nov 25, 2014 · 3 comments
Milestone

Comments

@ddale
Copy link
Member

ddale commented Nov 25, 2014

I'm attempting to run find-orientations on a more interesting sample, one with a few hundred orientations as opposed to ~4. It takes about 3.5 minutes before find-orientations gets to the point where it starts multiprocessing on paintGrid. I think the bottleneck is in findorientations.generate_orientation_fibers. An abort yielded:

  File "/home/darren/Projects/hexrd/hexrd/findorientations.py", line 130, in generate_orientation_fibers
    qfib.append(mutil.uniqueVectors(qfib_tmp))
  File "/home/darren/Projects/hexrd/hexrd/matrixutil.py", line 530, in uniqueVectors
    if any(ivSrt[:, col] != ivSrt[:, col -1]):
KeyboardInterrupt

And inspecting the function, I see:

for i in range(len(pd_hkl_ids)):
    for ispot in range(numSpots[i]):

Seems like a candidate for optimization at some point.

@ddale ddale changed the title efficency deficiency in findorientations.generate_orientation_fibers efficency deficiency in findorientations.generate_orientation_fibers Nov 25, 2014
@joelvbernier
Copy link
Contributor

Agreed. For more densely populated samples it may be more efficient to skip the generation stage and load a fixed grid (an npz file perhaps) on orientation space. The machinery is there, we just have to decide where we would store the pretabulated grids

Sent from my iPhone

On Nov 25, 2014, at 9:15 AM, Darren Dale [email protected] wrote:

I'm attempting to run find-orientations on a more interesting sample, one with a few hundred orientations as opposed to ~4. It takes about 3.5 minutes before find-orientations gets to the point where it starts multiprocessing on paintGrid. I think the bottleneck is in findorientations.generate_orientation_fibers. An abort yielded:

File "/home/darren/Projects/hexrd/hexrd/findorientations.py", line 130, in generate_orientation_fibers
qfib.append(mutil.uniqueVectors(qfib_tmp))
File "/home/darren/Projects/hexrd/hexrd/matrixutil.py", line 530, in uniqueVectors
if any(ivSrt[:, col] != ivSrt[:, col -1]):
KeyboardInterrupt
And inspecting the function, I see:

for i in range(len(pd_hkl_ids)):
for ispot in range(numSpots[i]):
Seems like a candidate for optimization at some point.


Reply to this email directly or view it on GitHub.

@joelvbernier
Copy link
Contributor

Darren: the other issue for the seeded approach is not to take too fine of steps on the fiber. Heuristic ally, anything below 0.5 degree steps is probably overkill, and will lead to very large search spaces (>5e6 points) in which case a full grid would be more appropriate.

Sent from my iPhone

On Nov 25, 2014, at 9:15 AM, Darren Dale [email protected] wrote:

I'm attempting to run find-orientations on a more interesting sample, one with a few hundred orientations as opposed to ~4. It takes about 3.5 minutes before find-orientations gets to the point where it starts multiprocessing on paintGrid. I think the bottleneck is in findorientations.generate_orientation_fibers. An abort yielded:

File "/home/darren/Projects/hexrd/hexrd/findorientations.py", line 130, in generate_orientation_fibers
qfib.append(mutil.uniqueVectors(qfib_tmp))
File "/home/darren/Projects/hexrd/hexrd/matrixutil.py", line 530, in uniqueVectors
if any(ivSrt[:, col] != ivSrt[:, col -1]):
KeyboardInterrupt
And inspecting the function, I see:

for i in range(len(pd_hkl_ids)):
for ispot in range(numSpots[i]):
Seems like a candidate for optimization at some point.


Reply to this email directly or view it on GitHub.

@ddale ddale modified the milestone: 1.0.0 Nov 26, 2014
@joelvbernier
Copy link
Contributor

Perhaps we should get Oscar involved in optimizing this function?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants