Commit f70ba93f by Gonzalez, Miguel

### Using float(const.rtod) to avoid strange error when calling straight_2d

parent e65ddcb8
 ... ... @@ -140,11 +140,12 @@ if keyword_set(verbose) then print, 'Straightening ', h_pixels, ' , ', XX[0], ' if keyword_set(verbose) then wait, 0.01 ; Calculation of the rays for each 2-theta (needed for textures) ; Need to use float(!const.rtod) to avoid error (would need to explore this issue) if keyword_set(txtr) then begin zq = sqrt(rsin2t2 + y2[0]) ; height -h/2 to +h/2 (j=0) xh = atan(zq, rcos2t) * !const.rtod ; calculate 2theta values for the equatorial plane xh XHcm = sin(xh/!const.rtod) * r XXcm = sin(XX[wzero]/!const.rtod) * r zq = sqrt(rsin2t2 + y2[0]) ; height -h/2 to +h/2 (j=0) xh = atan(zq, rcos2t) * float(!const.rtod) ; calculate 2theta values for the equatorial plane xh XHcm = sin(xh/float(!const.rtod)) * r XXcm = sin(XX[wzero]/float(!const.rtod)) * r fY = abs(datp.y[1] - datp.y[0]) ; delta Y fX = abs((XX[nx-1]-XX[0]) / nx) ; delta X corde = abs(2.0*datp.y[0]) ; corde of the arcs ... ... @@ -166,8 +167,8 @@ for j = 0L, h_pixels-1 do begin PAj1 = 1.0 - PAj2 endif else jof[*] = j zq = sqrt(rsin2t2 + y2[j]) ; height -h/2 to +h/2 xh = atan(zq,rcos2t)* !const.rtod ; calculate 2theta values for the equatorial plane xh zq = sqrt(rsin2t2 + y2[j]) ; height -h/2 to +h/2 xh = atan(zq,rcos2t)* float(!const.rtod) ; calculate 2theta values for the equatorial plane xh if xh[0] lt xh[rc_s1] then xdx = where((XX ge xh[0]) and (XX le xh[rc_s1])) \$ ;find corresponding indices xh->XX else xdx = where((XX le xh[0]) and (XX ge xh[rc_s1])) ;(ascending or descending) ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!