1 #pragma rtGlobals=3 // Use modern global access method and strict wave access. 2 #pragma IgorVersion = 6.1 3 #pragma ModuleName = PearlScientaPreprocess 4 #include "pearl-fitfuncs" 38 variable Lcrop = NumberByKey(
"Lcrop", param,
"=",
";")
39 variable Lsize = NumberByKey("Lsize", param, "=", ";")
40 variable Hcrop = NumberByKey("Hcrop", param, "=", ";")
41 variable Hsize = NumberByKey("Hsize", param, "=", ";")
42 variable Cpos = NumberByKey("Cpos", param, "=", ";")
43 variable Csize = NumberByKey("Csize", param, "=", ";")
45 prompt Lcrop, "Lower cropping region"
46 prompt Hcrop, "Upper cropping region"
47 prompt Lsize, "Lower background region"
48 prompt Hsize, "Upper background region"
49 prompt Cpos, "Center position"
50 prompt Csize, "Center integration region"
54 param = ReplaceNumberByKey("Lcrop", param, Lcrop, "=", ";")
55 param = ReplaceNumberByKey("Lsize", param, Lsize, "=", ";")
56 param = ReplaceNumberByKey("Hcrop", param, Hcrop, "=", ";")
57 param = ReplaceNumberByKey("Hsize", param, Hsize, "=", ";")
58 param = ReplaceNumberByKey("Cpos", param, Cpos, "=", ";")
59 param = ReplaceNumberByKey("Csize", param, Csize, "=", ";")
95 svar /z global_params = root:packages:pearl_explorer:s_reduction_params
96 if (svar_exists(global_params))
140 make /n=(nc) /free positions
143 string imagename = ""
144 string tracename = ""
147 for (ic = 0; ic < nc; ic += 1)
148 sc = num2char(char2num("A") + ic)
149 wave /z wc = CsrWaveRef($sc, win)
150 info = CsrInfo($sc, win)
151 tracename = StringByKey("TNAME", info, ":", ";")
152 if (waveexists(wc) && (wavedims(wc) == 2))
153 if (!waveexists(image))
155 imagename = tracename
157 if (cmpstr(tracename, imagename) == 0)
158 positions[np] = pcsr($sc, win)
164 np = floor(np / 2) * 2
165 redimension /n=(np) positions
166 sort positions, positions
168 positions = p >= np / 2 ? positions + 1 : positions
169 positions = positions / dimsize(image, 0)
172 variable ip2 = np / 2
173 variable ip1 = ip2 - 1
177 Cpos = (positions[ip1] + positions[ip2]) / 2
178 Csize = positions[ip2] - positions[ip1]
191 Lsize = positions[ip1]
192 Hsize = 1 - positions[ip2]
195 Lsize = Cpos - Csize / 2
196 Hsize = 1 - (Cpos + Csize / 2)
205 Lcrop = positions[ip1]
206 Hcrop = 1 - positions[ip2]
209 if (dimsize(image, 0) >= 992)
214 Lsize = max(Lsize - Lcrop, 0)
215 Hsize = max(Hsize - Hcrop, 0)
218 param = ReplaceNumberByKey("Lcrop", param, Lcrop, "=", ";")
219 param = ReplaceNumberByKey("Lsize", param, Lsize, "=", ";")
220 param = ReplaceNumberByKey("Hcrop", param, Hcrop, "=", ";")
221 param = ReplaceNumberByKey("Hsize", param, Hsize, "=", ";")
222 param = ReplaceNumberByKey("Cpos", param, Cpos, "=", ";")
223 param = ReplaceNumberByKey("Csize", param, Csize, "=", ";")
264 variable nx = dimsize(source, 0)
265 variable ny = dimsize(source, 1)
268 variable lcrop = NumberByKey("Lcrop", param, "=", ";")
269 variable lsize = NumberByKey("Lsize", param, "=", ";")
270 variable hcrop = NumberByKey("Hcrop", param, "=", ";")
271 variable hsize = NumberByKey("Hsize", param, "=", ";")
272 variable cpos = NumberByKey("Cpos", param, "=", ";")
273 variable csize = NumberByKey("Csize", param, "=", ";")
275 make /wave /free /n=2 result_waves
276 make /free /n=0 dest1, dest2
277 result_waves[0] = dest1
278 result_waves[1] = dest2
284 if (numtype(lcrop) != 0)
287 if (numtype(lsize) != 0)
290 if (numtype(hcrop) != 0)
293 if (numtype(hsize) != 0)
296 if (numtype(Cpos) != 0)
297 redimension /n=0 result_waves
300 if (numtype(Csize) != 0)
301 redimension /n=0 result_waves
305 variable lpos = lcrop + lsize / 2
306 variable hpos = 1 - (hcrop + hsize / 2)
311 duplicate /free dest1, lbg, hbg
313 p0 = round(lcrop * nx)
314 p1 = round((lcrop + lsize) * nx)
320 p0 = round((1 - hcrop - hsize) * nx)
321 p1 = round((1 - hcrop) * nx)
327 p0 = round((cpos - csize/2) * nx)
328 p1 = round((cpos + csize/2) * nx)
334 variable scale = (cpos - lpos) / (hpos - lpos)
336 dest1 -= scale * (hbg - lbg) + lbg
337 dest2 = sqrt(dest2 + scale^2 * (hbg + lbg))
341 sprintf s_note1, "AxisLabelD=peak integral"
342 sprintf s_note2, "KineticEnergy=%.3f", cpos * nx * dimdelta(source, 0) + dimoffset(source, 0)
354 variable Lcrop = NumberByKey("Lcrop", param, "=", ";")
355 variable Lsize = NumberByKey("Lsize", param, "=", ";")
356 variable Hcrop = NumberByKey("Hcrop", param, "=", ";")
357 variable Hsize = NumberByKey("Hsize", param, "=", ";")
358 variable Cpos = NumberByKey("Cpos", param, "=", ";")
359 variable Csize = NumberByKey("Csize", param, "=", ";")
361 prompt Lcrop, "Lower cropping region"
362 prompt Hcrop, "Upper cropping region"
363 prompt Lsize, "Lower background region"
364 prompt Hsize, "Upper background region"
365 prompt Cpos, "Center position"
366 prompt Csize, "Center integration region"
370 param = ReplaceNumberByKey("Lcrop", param, Lcrop, "=", ";")
371 param = ReplaceNumberByKey("Lsize", param, Lsize, "=", ";")
372 param = ReplaceNumberByKey("Hcrop", param, Hcrop, "=", ";")
373 param = ReplaceNumberByKey("Hsize", param, Hsize, "=", ";")
374 param = ReplaceNumberByKey("Cpos", param, Cpos, "=", ";")
375 param = ReplaceNumberByKey("Csize", param, Csize, "=", ";")
417 variable nx = dimsize(source, 0)
418 variable ny = dimsize(source, 1)
421 variable lcrop = NumberByKey("Lcrop", param, "=", ";")
422 variable lsize = NumberByKey("Lsize", param, "=", ";")
423 variable hcrop = NumberByKey("Hcrop", param, "=", ";")
424 variable hsize = NumberByKey("Hsize", param, "=", ";")
425 variable cpos = NumberByKey("Cpos", param, "=", ";")
426 variable csize = NumberByKey("Csize", param, "=", ";")
428 make /wave /free /n=2 result_waves
429 make /free /n=0 dest1, dest2
430 result_waves[0] = dest1
431 result_waves[1] = dest2
437 if (numtype(lcrop) != 0)
440 if (numtype(lsize) != 0)
443 if (numtype(hcrop) != 0)
446 if (numtype(hsize) != 0)
449 if (numtype(Cpos) != 0)
450 redimension /n=0 result_waves
453 if (numtype(Csize) != 0)
454 redimension /n=0 result_waves
459 variable pcl = round(lcrop * nx)
460 variable pch = round((1 - hcrop) * nx)
462 variable pfl = round((lcrop + lsize) * nx)
463 variable pfh = round((1 - hcrop - hsize) * nx)
465 variable pil = round((cpos - csize/2) * nx)
466 variable pih = round((cpos + csize/2) * nx)
469 make /n=(nx) /d /free profile, mask, fit
470 setscale /p x dimoffset(source,0), dimdelta(source,0), waveunits(source,0), profile, mask, fit
471 mask = ((p >= pcl) && (p < pfl)) || ((p >= pfh) && (p < pch))
475 variable xil = x2pnt(profile, pil)
476 variable xih = x2pnt(profile, pih)
478 make /n=3 /free /d w_coef
479 for (qq = 0; qq < ny; qq += 1)
480 profile = source[p][qq]
481 curvefit /Q /NTHR=1 /W=2 poly 3, kwCWave=w_coef, profile /M=mask
482 fit = poly(w_coef, x)
483 sp = sum(profile, xil, xih)
484 sf = sum(fit, xil, xih)
491 sprintf s_note1, "AxisLabelD=peak integral"
492 sprintf s_note2, "KineticEnergy=%.3f", cpos * nx * dimdelta(source, 0) + dimoffset(source, 0)
512 variable Lcrop = NumberByKey("Lcrop", param, "=", ";")
513 variable Lsize = NumberByKey("Lsize", param, "=", ";")
514 variable Hcrop = NumberByKey("Hcrop", param, "=", ";")
515 variable Hsize = NumberByKey("Hsize", param, "=", ";")
516 variable Cpos = NumberByKey("Cpos", param, "=", ";")
517 variable Csize = NumberByKey("Csize", param, "=", ";")
519 prompt Lcrop, "Lower cropping region"
520 prompt Hcrop, "Upper cropping region"
521 prompt Lsize, "Lower background region"
522 prompt Hsize, "Upper background region"
523 prompt Cpos, "Center position"
524 prompt Csize, "Center integration region"
528 param = ReplaceNumberByKey("Lcrop", param, Lcrop, "=", ";")
529 param = ReplaceNumberByKey("Lsize", param, Lsize, "=", ";")
530 param = ReplaceNumberByKey("Hcrop", param, Hcrop, "=", ";")
531 param = ReplaceNumberByKey("Hsize", param, Hsize, "=", ";")
532 param = ReplaceNumberByKey("Cpos", param, Cpos, "=", ";")
533 param = ReplaceNumberByKey("Csize", param, Csize, "=", ";")
576 variable nx = dimsize(source, 0)
577 variable ny = dimsize(source, 1)
579 duplicate /free source, source_redim
580 redimension /n=(nx * ny) source_redim
582 redimension /n=(nx, ny) source_redim
597 param = ReplaceNumberByKey("rngl", param, -inf, "=", ";")
598 param = ReplaceNumberByKey("rngh", param, inf, "=", ";")
599 param = ReplaceNumberByKey("npeaks", param, 4, "=", ";")
600 param = ReplaceNumberByKey("ybox", param, 1, "=", ";")
601 param = ReplaceNumberByKey("pos1", param, 11, "=", ";")
602 param = ReplaceNumberByKey("wid1", param, 0.1, "=", ";")
603 param = ReplaceNumberByKey("pos2", param, 12, "=", ";")
604 param = ReplaceNumberByKey("wid2", param, 0.2, "=", ";")
605 param = ReplaceNumberByKey("pos3", param, 13, "=", ";")
606 param = ReplaceNumberByKey("wid3", param, 0.3, "=", ";")
607 param = ReplaceNumberByKey("pos4", param, 14, "=", ";")
608 param = ReplaceNumberByKey("wid4", param, 0.4, "=", ";")
612 variable npk = numpnts(results) / 2
615 for (ipk = 0; ipk < npk; ipk += 1)
616 sw = "test_int_" + num2str(ipk + 1)
617 duplicate /o results[ipk], $sw
618 sw = "test_sig_" + num2str(ipk + 1)
619 duplicate /o results[ipk + npk], $sw
629 variable rngl = NumberByKey("rngl", param, "=", ";")
630 variable rngh = NumberByKey("rngh", param, "=", ";")
631 variable pos1 = NumberByKey("pos1", param, "=", ";")
632 variable wid1 = NumberByKey("wid1", param, "=", ";")
633 variable pos2 = NumberByKey("pos2", param, "=", ";")
634 variable wid2 = NumberByKey("wid2", param, "=", ";")
635 variable pos3 = NumberByKey("pos3", param, "=", ";")
636 variable wid3 = NumberByKey("wid3", param, "=", ";")
637 variable pos4 = NumberByKey("pos4", param, "=", ";")
638 variable wid4 = NumberByKey("wid4", param, "=", ";")
639 variable npeaks = NumberByKey("npeaks", param, "=", ";")
640 variable ybox = NumberByKey("ybox", param, "=", ";")
642 prompt rngl, "range low"
643 prompt rngh, "range high"
644 prompt pos1, "position 1"
645 prompt wid1, "width 1"
646 prompt pos2, "position 2"
647 prompt wid2, "width 2"
648 prompt pos3, "position 3"
649 prompt wid3, "width 3"
650 prompt pos4, "position 4"
651 prompt wid4, "width 4"
652 prompt npeaks, "number of peaks"
653 prompt ybox, "ybox (1 or 3)"
655 doprompt "
gauss4_reduction reduction parameters (1/2)", rngl, rngh, npeaks, ybox
657 param = ReplaceNumberByKey("rngl", param, rngl, "=", ";")
658 param = ReplaceNumberByKey("rngh", param, rngh, "=", ";")
659 param = ReplaceNumberByKey("npeaks", param, npeaks, "=", ";")
660 param = ReplaceNumberByKey("ybox", param, ybox, "=", ";")
662 doprompt "
gauss4_reduction reduction parameters (2/2)", pos1, wid1, pos2, wid2, pos3, wid3, pos4, wid4
664 param = ReplaceNumberByKey("pos1", param, pos1, "=", ";")
665 param = ReplaceNumberByKey("wid1", param, wid1, "=", ";")
666 param = ReplaceNumberByKey("pos2", param, pos2, "=", ";")
667 param = ReplaceNumberByKey("wid2", param, wid2, "=", ";")
668 param = ReplaceNumberByKey("pos3", param, pos3, "=", ";")
669 param = ReplaceNumberByKey("wid3", param, wid3, "=", ";")
670 param = ReplaceNumberByKey("pos4", param, pos4, "=", ";")
671 param = ReplaceNumberByKey("wid4", param, wid4, "=", ";")
722 variable nx = dimsize(source, 0)
723 variable ny = dimsize(source, 1)
726 variable rngl = NumberByKey("rngl", param, "=", ";")
727 variable rngh = NumberByKey("rngh", param, "=", ";")
728 variable pos1 = NumberByKey("pos1", param, "=", ";")
729 variable wid1 = NumberByKey("wid1", param, "=", ";")
730 variable pos2 = NumberByKey("pos2", param, "=", ";")
731 variable wid2 = NumberByKey("wid2", param, "=", ";")
732 variable pos3 = NumberByKey("pos3", param, "=", ";")
733 variable wid3 = NumberByKey("wid3", param, "=", ";")
734 variable pos4 = NumberByKey("pos4", param, "=", ";")
735 variable wid4 = NumberByKey("wid4", param, "=", ";")
736 variable npeaks = NumberByKey("npeaks", param, "=", ";")
737 variable ybox = NumberByKey("ybox", param, "=", ";")
743 duplicate /free xprof, xprof_sig
744 variable pl = max(x2pnt(xprof, rngl), 0)
745 variable ph = min(x2pnt(xprof, rngh), numpnts(xprof) - 1)
747 make /free /n=(npeaks) peak_coef
748 peak_coef = p * 3 + 2
749 variable n_coef = npeaks * 3 + 2
750 make /free /d /n=14 w_coef, W_sigma
751 w_coef[0] = {0, 0, 1, pos1, wid1, 1, pos2, wid2, 1, pos3, wid3, 1, pos4, wid4}
752 redimension /n=(n_coef) w_coef, w_sigma
758 make /free /n=(npeaks + 2, numpnts(w_coef)) cmat
759 make /free /n=(npeaks + 2) cvec
766 for (ipk=0; ipk < npeaks; ipk += 1)
768 cmat[2 + ipk][2 + ipk*3] = -1
772 make /free /n=(npeaks * 2) /wave result_waves
774 for (ipk = 0; ipk < npeaks; ipk += 1)
775 make /free /n=0 pk_int
778 sprintf s_note,
"AxisLabelD=peak %u integral", ipk+1
780 sprintf s_note,
"KineticEnergy=%.3f", w_coef[3 + ipk * 3]
782 result_waves[ipk] = pk_int
784 make /free /n=0 pk_sig
787 sprintf s_note,
"AxisLabelD=peak %u sigma", ipk+1
789 sprintf s_note,
"KineticEnergy=%.3f", w_coef[3 + ipk * 3]
791 result_waves[ipk + npeaks] = pk_sig
793 waveclear pk_int, pk_sig
798 variable p1 = dimsize(source, 1) - 1
803 p0 += ceil((ybox - 1) / 2)
804 p1 -= ceil((ybox - 1) / 2)
806 variable V_FitNumIters
808 for (pp = p0; pp <= p1; pp += 1)
810 xprof = source[p][pp]
812 xprof += source[p][pp-1] + source[p][pp+1]
814 xprof_sig = max(sqrt(xprof), 1)
819 wmin = wavemin(xprof)
820 wmax = wavemax(xprof)
824 for (ipk=0; ipk < npeaks; ipk += 1)
825 w_coef[2 + ipk*3] = wmax - wmin
827 FuncFit /H=hold /Q /NTHR=1 /N /W=2
MultiGaussLinBG_AO w_coef xprof[pl,ph] /C={cmat, cvec} /I=1 /W=xprof_sig[pl,ph]
831 if (V_FitNumIters < 40)
832 for (ipk = 0; ipk < npeaks; ipk += 1)
833 wave val = result_waves[ipk]
834 wave sig = result_waves[ipk + npeaks]
835 val[pp] = max(w_coef[peak_coef[ipk]], 0)
836 sig[pp] = max(w_sigma[peak_coef[ipk]], 0)
842 for (ipk = 0; ipk < npeaks; ipk += 1)
843 wave val = result_waves[ipk]
844 wave sig = result_waves[ipk + npeaks]
845 val *= w_coef[peak_coef[ipk] + 2] * sqrt(pi)
846 sig *= w_coef[peak_coef[ipk] + 2] * sqrt(pi)
884 function /s find_gauss4_reduction_params(spectrum, peakpos)
889 variable wmin = wavemin(spectrum)
890 variable wmax = wavemax(spectrum)
893 variable rngl = dimoffset(spectrum, 0)
894 variable rngh = dimoffset(spectrum, 0) + dimdelta(spectrum, 0) * (dimsize(spectrum, 0) - 1)
895 make /n=4 /free positions, widths
896 variable npeaks = numpnts(peakpos)
899 positions[0, npeaks-1] = peakpos[p]
902 variable n_coef = npeaks * 3 + 2
903 make /free /d /n=(n_coef) w_coef
908 make /free /n=(2+npeaks, numpnts(w_coef)) cmat
909 make /free /n=(2+npeaks) cvec
916 for (ip=0; ip < npeaks; ip += 1)
917 cmat[2 + ip][2 + ip*3] = -1
918 w_coef[2 + ip*3] = wmax - wmin
919 w_coef[3 + ip*3] = peakpos[ip]
920 w_coef[4 + ip*3] = widths[ip]
923 variable V_FitNumIters
926 for (ip=0; ip < npeaks; ip += 1)
927 positions[ip] = w_coef[3 + ip * 3]
928 widths[ip ] = abs(w_coef[4 + ip * 3])
930 for (ip=npeaks; ip < 4; ip += 1)
935 param = ReplaceNumberByKey(
"rngl", param, rngl,
"=",
";")
936 param = ReplaceNumberByKey(
"rngh", param, rngh,
"=",
";")
937 param = ReplaceNumberByKey(
"npeaks", param, npeaks,
"=",
";")
938 param = ReplaceNumberByKey(
"ybox", param, ybox,
"=",
";")
939 param = ReplaceNumberByKey(
"pos1", param, positions[0],
"=",
";")
940 param = ReplaceNumberByKey(
"wid1", param, widths[0],
"=",
";")
941 param = ReplaceNumberByKey(
"pos2", param, positions[1],
"=",
";")
942 param = ReplaceNumberByKey(
"wid2", param, widths[1],
"=",
";")
943 param = ReplaceNumberByKey(
"pos3", param, positions[2],
"=",
";")
944 param = ReplaceNumberByKey(
"wid3", param, widths[2],
"=",
";")
945 param = ReplaceNumberByKey(
"pos4", param, positions[3],
"=",
";")
946 param = ReplaceNumberByKey(
"wid4", param, widths[3],
"=",
";")
958 function test_shockley_anglefit(image, branch)
963 param = ReplaceStringByKey(
"branch", param, num2str(branch),
"=",
";")
971 string pkpos_name =
"saf_pkpos_" + s_branch
972 string pkwid_name =
"saf_pkwid_" + s_branch
974 wave /wave results = shockley_anglefit(image, param)
975 duplicate results[0], $pkpos_name
976 duplicate results[1], $pkwid_name
979 function prompt_Shockley_anglefit(param)
982 variable branch = NumberByKey(
"branch", param,
"=",
";")
984 prompt branch,
"Branch (-1 or +1)" 986 doprompt
"Shockley_anglefit_reduction Parameters", branch
988 param = ReplaceNumberByKey(
"branch", param, branch,
"=",
";")
1016 threadsafe
function /wave Shockley_anglefit(source, param)
1020 variable nx = dimsize(source, 0)
1021 variable ny = dimsize(source, 1)
1024 variable branch = NumberByKey(
"branch", param,
"=",
";")
1027 if (numtype(branch) != 0)
1032 make /wave /free /n=2 result_waves
1033 make /free /n=0 dest1, dest2
1034 result_waves[0] = dest1
1035 result_waves[1] = dest2
1059 duplicate /free dest1, center
1060 q0 = round((y0 - dimoffset(source, 1)) / dimdelta(source, 1))
1061 q1 = round((y1 - dimoffset(source, 1)) / dimdelta(source, 1))
1063 wavestats /q/m=1 center
1064 p0 = round((v_maxloc - dimoffset(source, 0)) / dimdelta(source, 0))
1065 p1 = round((v_maxloc + 0.4 - dimoffset(source, 0)) / dimdelta(source, 0))
1068 make /n=(ny)/d/free profile
1069 setscale /p x dimoffset(source,1), dimdelta(source,1), waveunits(source,1), profile
1072 for (pp = p0; pp <= p1; pp += 1)
1073 profile = source[pp][p]
1074 curvefit /Q /NTHR=1 /W=2 gauss profile(y0,y1)
1076 dest1[pp] = w_coef[2]
1077 dest2[pp] = w_coef[3]
1083 function scienta_norm(w, x): fitfunc
1087 return w[0] * (x^2 - w[1]^2)
1090 function /wave fit_scienta_ang_transm(data, params)
1094 if (!waveexists(params))
1095 make /n=12 /o params
1097 redimension /n=12/d params
1099 variable h = wavemax(data) - wavemin(data)
1112 FuncFit /NTHR=0 /q scienta_ang_transm params data
1117 threadsafe
function scienta_ang_transm(w, x): fitfunc
1134 make /free /n=4 /d w_int
1136 w_int[1,] = w[p - 1]
1137 variable pk1 = gauss1d(w_int, x)
1138 w_int[1,] = w[p + 2]
1139 variable pk2 = gauss1d(w_int, x)
1140 w_int[1,] = w[p + 5]
1141 variable pk3 = gauss1d(w_int, x)
1142 w_int[0,2] = w[9 + p]
1144 variable bg = poly(w_int, x)
1146 return bg + pk1 + pk2 + pk3
1149 function /wave fit_scienta_poly_bg(data, params, bgterms)
1154 if (!waveexists(params))
1155 make /n=15 /o params
1157 redimension /n=15 /d params
1159 variable wmax = wavemax(data)
1160 variable wmin = wavemin(data)
1173 params[12] = (wmax - wmin) / dimdelta(data,1) / dimsize(data,1)
1177 string h =
"0000000000000" 1188 FuncFitMD /NTHR=1 /q /h=h scienta_poly_bg params data
1193 function scienta_poly_bg(w, e, a): fitfunc
1219 make /free /n=4 /d w_int
1224 w_int[2,] = w[p0 + p - 2]
1225 variable pk1 = gauss1d(w_int, a)
1228 w_int[1,] = w[p0 + p - 1]
1229 variable pk2 = gauss1d(w_int, a)
1232 w_int[1,] = w[p0 + p - 1]
1233 variable pk3 = gauss1d(w_int, a)
1236 w_int[0,2] = w[p0 + p]
1238 variable base = poly(w_int, a)
1241 w_int[0,3] = w[p0 + p]
1242 variable bg = poly(w_int, e)
1244 return bg * (base + pk1 + pk2 + pk3)
threadsafe variable MultiGaussLinBG(wave w, variable x)
multiple gaussian peaks on a linear background fit function.
threadsafe variable MultiGaussLinBG_AO(wave pw, wave yw, wave xw)
multiple gaussian peaks on a linear background fit function (all at once).
variable prompt_gauss4_reduction(string *param)
prompt for the gauss4_reduction parameters
threadsafe wave redim_linbg_reduction(wave source, string *param)
linear background reduction function for incorrectly dimensioned scienta image
variable test_gauss4_reduction(wave image)
apply the gauss4_reduction function to a single image
threadsafe wave ad_profile_x_w(wave dataset, variable q1, variable q2, wave destwave, variable noavg=defaultValue)
1D cut through 2D dataset along X dimension, existing destination wave.
threadsafe variable adh5_setup_profile(wave image, wave profile, variable dim)
set up a one-dimensional wave for a line profile based on a 2D original wave.
variable prompt_int_quadbg_reduction(string *param)
threadsafe wave int_linbg_reduction(wave source, string *param)
linear-background subtracted integration reduction function.
threadsafe wave gauss4_reduction(wave source, string *param)
fit horizontal cuts of an image with up to four gaussian peaks on a linear background ...
variable prompt_redim_linbg_reduction(string *param)
parameter dialog for the redim_linbg_reduction() function
threadsafe wave ad_profile_y_w(wave dataset, variable p1, variable p2, wave destwave, variable noavg=defaultValue)
1D cut through 2D dataset along X dimension, existing destination wave.
threadsafe wave int_quadbg_reduction(wave source, string *param)
integrate peak area minus a quadratic background
variable prompt_int_linbg_reduction(string *param)
prompt the user for integrate on linear background reduction parameters.
string csr_int_linbg_reduction(string win)
calculate linear background reduction parameters from cursors in a graph.
string capture_int_linbg_cursors()
capture linear background reduction parameters from cursors in a graph.