Commit 1cd0f21a authored by Gonzalez, Miguel's avatar Gonzalez, Miguel
Browse files

Issue 56: Allowing scale_d16.pro to handle scans where consecutive...

Issue 56: Allowing scale_d16.pro to handle scans where consecutive measurements do not overlap in theta
parent 991450cf
......@@ -22,10 +22,20 @@
for i = 0, nscans-2 do begin
lowlim = datp.x[0,i+1]
uplim = datp.x[-1,i]
tmp1 = where(datp.x[*,i] ge lowlim and datp.x[*,i] le uplim)
tmp2 = where(datp.x[*,i+1] ge lowlim and datp.x[*,i+1] le uplim)
;ratio = mean(win[tmp1,i]) / mean(win[tmp2,i+1])
ratio = median(win[tmp1,i]) / median(win[tmp2,i+1])
tmp1 = where(datp.x[*,i] ge lowlim)
tmp2 = where(datp.x[*,i+1] le uplim)
n1 = n_elements(tmp1)
n2 = n_elements(tmp2)
if ((n1 or n2) le 1) then begin
print,'Dim tmp1 is: ', n_elements(tmp1), tmp1
print,'Dim tmp2 is: ', n_elements(tmp2), tmp2
print,'... will do the scaling over 5 points... please check!'
;ratio = mean(win[-5:-1,i]) / mean(win[0:4,i+1])
ratio = median(win[-5:-1,i]) / median(win[0:4,i+1])
endif else begin
;ratio = mean(win[tmp1,i]) / mean(win[tmp2,i+1])
ratio = median(win[tmp1,i]) / median(win[tmp2,i+1])
endelse
factors = [factors, ratio]
endfor
endif
......@@ -40,4 +50,4 @@
give_datp, datp
return, wout
end
\ No newline at end of file
end
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