PetMetz / pymls

Python implementation of the dislocation contrast factor calculation reported by Martinez-Garcia, Leoni, and Scardi
Other
0 stars 0 forks source link

Dislocation class returns NAN-valued Gijmn #3

Closed PetMetz closed 1 year ago

PetMetz commented 2 years ago

The formulas given in the MLS paper are presumably written-out expressions for the direction cosines indicated, but result in different values than simply computing dot products between the vectors ei and the input diffraction vector.

I'm unclear on what they are doing in eqns 3-7, since a direct transcription of of the equations seems to be producing erroneous results.

The NANs were arising from sqrt(1 - tau_2**2 - tau_3**2), where the later terms summed to values larger (in magnitude) than 1.

PetMetz commented 1 year ago

Refactoring the equations given by MLS (2008) as a product of dot products seems to have alleviated this issue.