Commit c60736b2 authored by Gonzalez, Miguel's avatar Gonzalez, Miguel

Read NeXus files from D2B and Salsa

parent ba716830
......@@ -75,7 +75,8 @@ PRO rdid_d2b, INST,numor,nvers,text,exper,scan,cnt,nd,WOUT,vparm,param,par1,par2
FOR i=0,nt/2-1 DO BEGIN ;
WONE2 = [WOUT[*,i*2,j], WOUT[*,i*2+1,j]] ; put pairs of tubes together again
WOUT[*,i*2, j] = CONGRID(WONE2[rise1[i]:fall1[i]], nh, /INTERP)
WOUT[*,i*2+1,j] = REVERSE(CONGRID(WONE2[rise2[i]:fall2[i]], nh, /INTERP))
if exper EQ 'NeXus' then WOUT[*,i*2+1,j] = CONGRID(WONE2[rise2[i]:fall2[i]], nh, /INTERP) $
else WOUT[*,i*2+1,j] = REVERSE(CONGRID(WONE2[rise2[i]:fall2[i]], nh, /INTERP))
ENDFOR
ENDFOR
......@@ -131,7 +132,7 @@ PRO rdid_d2b, INST,numor,nvers,text,exper,scan,cnt,nd,WOUT,vparm,param,par1,par2
if idz[0] ne -1 then zap = zap[idz] else zap = 0 ; *** in case, eliminate spurious values ***
SD = SIZE(zap)
IF SD[0] GT 0 THEN BEGIN
IF (SD[0] gt 0) and (SD[1] lt 128) THEN BEGIN
print, 'Too high/low efficiencies:'
WOUT[*,zap-1,*] = -999 ; *** set all dud values and angles to -999 ***
newang_d2b[zap-1] = -999
......@@ -187,5 +188,6 @@ PRO rdid_d2b, INST,numor,nvers,text,exper,scan,cnt,nd,WOUT,vparm,param,par1,par2
EE = SQRT(WOUT)
ENDIF
END
......@@ -371,14 +371,14 @@ endif else begin
cal_d1a =[-c1,-c2,c3,offset]
for i=0,255 do ang_d1a[i]=((i-c3)^3)*c2 + (i-c3)*c1 + offset & ok=1
endif else begin
tmp=fltarr(2,256)
tmp=fltarr(2,256)
READF, in,c ;offset
READF, in,tmp
ang_d1a=reform(tmp[0,*]) + c
cal_d1a=[[reform(tmp[1,*])],[reform(tmp[1,*])]] & cal_d1a=congrid(cal_d1a,256,256) & ok=1
endelse
misd1as: IF ok eq 0 THEN cal_d1a =0
ENDIF ELSE IF mot eq 'MAKE' then begin & on_ioerror,mikd1as
ENDIF ELSE IF mot eq 'MAKE' then begin & on_ioerror,mikd1as
;c1=(-0.0182) & c2=(0.036e-07) & c3=112.02115 & offset=-12.4
if n_elements(tmp) eq 4 then begin
PRINTF, out,'Calib(4) ' +systime()+' '+txxt
......@@ -2043,7 +2043,9 @@ if STATUS eq 0 then begin
PV = vparm
;new data
PP = [param[3:15], param[18:23], 0., 0., 0., 0., param[16:17], $
;16 Dec 2019: Realized that in Ascii file, rotation params are written as RZ, RY, RX
PP = [param[3:7], param[10], param[9], param[8], param[11:15], $
param[18:23], 0., 0., 0., 0., param[16:17], $
param[35:36], param[38], 0., manip]
PTXT= ['0) 2*Theta ', $
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment