#pragma rtGlobals=1 // Use modern global access method. Function allowFCC(H) // flags whether H=(hkl) is an allowed FCC reflection (not mixed) Wave H if ( (abs(H[0])+abs(H[1])+abs(H[2]))==0 ) // the (000) is not allowed return 0 endif Variable sum = mod(abs(H[0]),2)+mod(abs(H[1]),2)+mod(abs(H[2]),2) sum = round(sum) return (sum==0 || sum==3) End Function allowBCC(H) // flags whether H=(hkl) is an allowed BCC reflection (sum is even) Wave H return !mod(sum(H,-inf,inf),2) End // This function suplanted by new built in Igor function, MatrixDot(a,b) // //Function dot(a,b) // vector dot product // Wave a,b // Variable i=0, n, sum // n = numpnts(a) // if (n!=numpnts(b)) // Abort "in dot product, waves must be same " // endif // // do // sum += a[i]*b[i] // i += 1 // while (i