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

hkl peak labels missing on sinograms.sinogram.GrainSinogram.build_sinogram #330

Closed
jonwright opened this issue Oct 4, 2024 · 0 comments
Closed

Comments

@jonwright
Copy link
Member

Minimum is to add the h,k,l labels and add the option to make a sinogram of some other property (like eta or tth).

Code existing in hc5185:

    dh = g.hkl - hklmin[:,np.newaxis]
    de = (g.etasigns.astype(int) + 1)//2
    #   4D array of h,k,l,+/-
    pkmsk = np.zeros( list(dh.max(axis=1) + 1 )+[2,], int )
    pkmsk[ dh[0], dh[1], dh[2], de ] = 1
    #   sinogram row to hit
    pkrow = np.cumsum( pkmsk.ravel() ).reshape( pkmsk.shape ) - 1
    #### THIS LINE = indexes into the pkmsk array
    pkhkle = np.arange( np.prod( pkmsk.shape ), dtype=int )[ pkmsk.flat == 1 ]
    #### THIS LINE = hkl indices (transpose for N,3 versus 3,N)
    pkindices = np.transpose(np.unravel_index(pkhkle, pkmsk.shape))  + np.concatenate( (hklmin, [0]) )

Needs to be added to the code. Option for getting things like eta or tth or ds (etc) sinograms would need some refactoring. Requires that the colfile is not modified between setup and compute.

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

No branches or pull requests

1 participant