Commit ccce2140 authored by Miguel Angel Gonzalez's avatar Miguel Angel Gonzalez
Browse files

Issue 26: Added extra output file for Salsa, containing the values of all the...

Issue 26: Added extra output file for Salsa, containing the values of all the PV parameters, i.e. 45 params per scan point
parent 5796e9b6
......@@ -9105,6 +9105,34 @@ if n_elements(incmd) eq 1 then printf,u,'Call: '+incmd else printf,u,' '
printf,u,' '
if inst ne '?' then begin
;Salsa: Write additional file containing all the parameters of the scanning blocks
if inst eq 'SALSA' then begin
sz = size(datp.pv)
if sz[1] eq 45 then begin ; Expect to have 45 parameters
par_names = ['time', 'monitor1', 'Total cts', '2theta', 'omega', $
'tx', 'ty', 'tz', 'rz', 'ry', $
'rx', 'horizontal', 'anglesx1000', 'PSD', 'PSW', $
'SSD', 'SSW', 'PSD_2', 'SSD_2', 'monitor2', $
'chi', 'phi', 'pi-x', 'pi-y', 'selector', $
'omega-si', 'Si_tilt', 'trans-si', 'mono-si', 'omega-cu', $
'trans-cu', 'tilt-cu', 'force', 'strain', 'extenso', $
'Tsample', 'Tsample2', 'DAC1', 'ADC1', 'DAC2', $
'ADC2', 'DAC3', 'ADC3', 'DAC4', 'ADC4']
if keyword_set(append) then openw, v, 'salsa_params_' + file_out, /append, /get_lun else $
openw, v, 'salsa_params_' + file_out, /get_lun
printf, v, par_names, format='("# ", 45(A-11, 4x))'
if sz[0] eq 2 then begin
for i = 0, sz[2]-1 do begin
printf, v, datp.pv[*,i], format='(45(G12.6, 3x))'
endfor
endif else begin
printf, v, datp.pv, format='(45(G12.6, 3x))'
endelse
if v gt 0 then free_lun, v else lamp_error
endif
endif
printf, u, format='("Spectra", 2x, "pseudo_V", 1x, "e", 11x, "height", 9x, "e", $)'
printf, u, format='(14x, "center", 7x, "e", 16x, "fWmH", 11x, "e", 14x, "background", $)'
printf, u, format='(6x, "e", 14x, A, 2x, "a2", 13x, "e", 13x, "fit_area", 7x, "e", $)', bktxt
......
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