Commit a29d9bcc authored by Gonzalez, Miguel's avatar Gonzalez, Miguel
Browse files

Modifications for Salsa: Added phi/chi scans, corrected detector height, use...

Modifications for Salsa: Added phi/chi scans, corrected detector height, use PV values in str_fit output even for a single count
parent d82658f8
......@@ -2039,8 +2039,12 @@ if STATUS eq 0 then begin
XX = ang_d1a + param[3]
XT = '2*Theta'
YY = findgen(256)*8./(255) - 4. ;detector height = 8.0 cm
DetH = 25.0 ;detector height in cm
if year lt 2014 then DetH = 8.0 ;Need to determine exactly when the detector was changed! (MAG 12/6/2019)
YY = findgen(256)*DetH/(255) - (0.5*DetH)
YT = 'Y detector'
ZZ = fltarr(scan)
ZT = 'Scan'
NN = fltarr(1, 1, scan) ;3D array to allow concatenation
......@@ -2107,6 +2111,16 @@ if STATUS eq 0 then begin
ZT = 'omega scan'
end
'chi': begin
ZZ = reform(vparm[20,*]/1000.)
ZT = 'phi scan'
end
'phi': begin
ZZ = reform(vparm[21,*]/1000.)
ZT = 'phi scan'
end
'Tx': begin
ZZ = reform(vparm[5,*]/1000.)
ZT = 'Tx scan'
......
......@@ -9020,13 +9020,13 @@ if strpos(ptxt[0],'#F ') eq 0 then begin
endelse
endif
;SALSA --> Firt parameter written either as 2*Theta (before 2019) or 0) 2*Theta
;SALSA --> First parameter written either as 2*Theta (before 2019) or 0) 2*Theta
if strpos(ptxt[0],'2*Th') eq 0 or strpos(ptxt[0],'2*Th') eq 3 then begin
idx=0 & ido=1 & idt=0
for i=0,n_elements(ptxt)-1 do begin
if strpos(ptxt[i],'X_translation') eq 0 or strpos(ptxt[i],'X_translation') eq 3 then idx=i
if idx gt 0 then inst='SALSA'
endfor
endfor
if idx gt 0 then if (size(datp.pv))[1] eq n_elements(datp.p) then begin
xtr =datp.pv[idx,*] & ytr =datp.pv[idx+1,*] & ztr=datp.pv[idx+2,*]
xro =datp.pv[idx+3,*] & yro =datp.pv[idx+4,*] & zro=datp.pv[idx+5,*]
......@@ -9043,9 +9043,18 @@ if strpos(ptxt[0],'2*Th') eq 0 or strpos(ptxt[0],'2*Th') eq 3 then begin
chi = datp.pv[20,*] & phi = datp.pv[21,*]
angl = datp.pv[12,*]
endif else begin
xtr = datp.p[idx] & ytr = datp.p[idx+1] & ztr = datp.p[ idx+2]
xro = datp.p[ idx+3] & yro = datp.p[ idx+4] & zro = datp.p[ idx+5]
omg = datp.p[ ido] & tth = datp.p[ idt]
;Using parameters in PV instead, even for a single count (modification requested on 12/6/2019)
;xtr = datp.p[idx] & ytr = datp.p[idx+1] & ztr = datp.p[ idx+2]
;xro = datp.p[ idx+3] & yro = datp.p[ idx+4] & zro = datp.p[ idx+5]
;omg = datp.p[ ido] & tth = datp.p[ idt]
idx =5 & ido=4 & idt=3
datp.pv = round(datp.pv*10.)/10000.
xtr = datp.pv[idx] & ytr = datp.pv[idx+1] & ztr = datp.pv[idx+2]
xro = datp.pv[idx+3] & yro = datp.pv[idx+4] & zro = datp.pv[idx+5]
omg = datp.pv[ido] & tth = datp.pv[idt]
time = datp.pv[0]*1000 & moni = datp.pv[1]*1000
chi = datp.pv[20] & phi = datp.pv[21]
angl = datp.pv[12]
endelse
endelse
endif
......
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