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, "=", ";")
69 svar /z global_params = root:packages:pearl_explorer:s_reduction_params
70 if (svar_exists(global_params))
96 make /n=(nc) /free positions
100 string tracename = ""
103 for (ic = 0; ic < nc; ic += 1)
104 sc = num2char(char2num("A") + ic)
105 wave /z wc = CsrWaveRef($sc, win)
106 info = CsrInfo($sc, win)
107 tracename = StringByKey("TNAME", info, ":", ";")
108 if (waveexists(wc) && (wavedims(wc) == 2))
109 if (!waveexists(image))
111 imagename = tracename
113 if (cmpstr(tracename, imagename) == 0)
114 positions[np] = pcsr($sc, win)
120 np = floor(np / 2) * 2
121 redimension /n=(np) positions
122 sort positions, positions
124 positions = p >= np / 2 ? positions + 1 : positions
125 positions = positions / dimsize(image, 0)
128 variable ip2 = np / 2
129 variable ip1 = ip2 - 1
130 variable Cpos = (positions[ip1] + positions[ip2]) / 2
131 variable Csize = positions[ip2] - positions[ip1]
133 Cpos = (positions[ip1] + positions[ip2]) / 2
134 Csize = positions[ip2] - positions[ip1]
147 Lsize = positions[ip1]
148 Hsize = 1 - positions[ip2]
151 Lsize = Cpos - Csize / 2
152 Hsize = 1 - (Cpos + Csize / 2)
161 Lcrop = positions[ip1]
162 Hcrop = 1 - positions[ip2]
168 Lsize = max(Lsize - Lcrop, 0)
169 Hsize = max(Hsize - Hcrop, 0)
172 param = ReplaceNumberByKey("Lcrop", param, Lcrop, "=", ";")
173 param = ReplaceNumberByKey("Lsize", param, Lsize, "=", ";")
174 param = ReplaceNumberByKey("Hcrop", param, Hcrop, "=", ";")
175 param = ReplaceNumberByKey("Hsize", param, Hsize, "=", ";")
176 param = ReplaceNumberByKey("Cpos", param, Cpos, "=", ";")
177 param = ReplaceNumberByKey("Csize", param, Csize, "=", ";")
218 variable nx = dimsize(source, 0)
219 variable ny = dimsize(source, 1)
222 variable lcrop = NumberByKey("Lcrop", param, "=", ";")
223 variable lsize = NumberByKey("Lsize", param, "=", ";")
224 variable hcrop = NumberByKey("Hcrop", param, "=", ";")
225 variable hsize = NumberByKey("Hsize", param, "=", ";")
226 variable cpos = NumberByKey("Cpos", param, "=", ";")
227 variable csize = NumberByKey("Csize", param, "=", ";")
229 make /wave /free /n=2 result_waves
230 make /free /n=0 dest1, dest2
231 result_waves[0] = dest1
232 result_waves[1] = dest2
238 if (numtype(lcrop) != 0)
241 if (numtype(lsize) != 0)
244 if (numtype(hcrop) != 0)
247 if (numtype(hsize) != 0)
250 if (numtype(Cpos) != 0)
251 redimension /n=0 result_waves
254 if (numtype(Csize) != 0)
255 redimension /n=0 result_waves
259 variable lpos = lcrop + lsize / 2
260 variable hpos = 1 - (hcrop + hsize / 2)
265 duplicate /free dest1, lbg, hbg
267 p0 = round(lcrop * nx)
268 p1 = round((lcrop + lsize) * nx)
274 p0 = round((1 - hcrop - hsize) * nx)
275 p1 = round((1 - hcrop) * nx)
281 p0 = round((cpos - csize/2) * nx)
282 p1 = round((cpos + csize/2) * nx)
288 variable scale = (cpos - lpos) / (hpos - lpos)
290 dest1 -= scale * (hbg - lbg) + lbg
291 dest2 = sqrt(dest2 + scale^2 * (hbg + lbg))
295 sprintf s_note1, "AxisLabelD=peak integral"
296 sprintf s_note2, "KineticEnergy=%.3f", cpos * nx * dimdelta(source, 0) + dimoffset(source, 0)
308 variable Lcrop = NumberByKey("Lcrop", param, "=", ";")
309 variable Lsize = NumberByKey("Lsize", param, "=", ";")
310 variable Hcrop = NumberByKey("Hcrop", param, "=", ";")
311 variable Hsize = NumberByKey("Hsize", param, "=", ";")
312 variable Cpos = NumberByKey("Cpos", param, "=", ";")
313 variable Csize = NumberByKey("Csize", param, "=", ";")
315 prompt Lcrop, "Lower cropping region"
316 prompt Hcrop, "Upper cropping region"
317 prompt Lsize, "Lower background region"
318 prompt Hsize, "Upper background region"
319 prompt Cpos, "Center position"
320 prompt Csize, "Center integration region"
324 param = ReplaceNumberByKey("Lcrop", param, Lcrop, "=", ";")
325 param = ReplaceNumberByKey("Lsize", param, Lsize, "=", ";")
326 param = ReplaceNumberByKey("Hcrop", param, Hcrop, "=", ";")
327 param = ReplaceNumberByKey("Hsize", param, Hsize, "=", ";")
328 param = ReplaceNumberByKey("Cpos", param, Cpos, "=", ";")
329 param = ReplaceNumberByKey("Csize", param, Csize, "=", ";")
371 variable nx = dimsize(source, 0)
372 variable ny = dimsize(source, 1)
375 variable lcrop = NumberByKey("Lcrop", param, "=", ";")
376 variable lsize = NumberByKey("Lsize", param, "=", ";")
377 variable hcrop = NumberByKey("Hcrop", param, "=", ";")
378 variable hsize = NumberByKey("Hsize", param, "=", ";")
379 variable cpos = NumberByKey("Cpos", param, "=", ";")
380 variable csize = NumberByKey("Csize", param, "=", ";")
382 make /wave /free /n=2 result_waves
383 make /free /n=0 dest1, dest2
384 result_waves[0] = dest1
385 result_waves[1] = dest2
391 if (numtype(lcrop) != 0)
394 if (numtype(lsize) != 0)
397 if (numtype(hcrop) != 0)
400 if (numtype(hsize) != 0)
403 if (numtype(Cpos) != 0)
404 redimension /n=0 result_waves
407 if (numtype(Csize) != 0)
408 redimension /n=0 result_waves
413 variable pcl = round(lcrop * nx)
414 variable pch = round((1 - hcrop) * nx)
416 variable pfl = round((lcrop + lsize) * nx)
417 variable pfh = round((1 - hcrop - hsize) * nx)
419 variable pil = round((cpos - csize/2) * nx)
420 variable pih = round((cpos + csize/2) * nx)
423 make /n=(nx) /d /free profile, mask, fit
424 setscale /p x dimoffset(source,0), dimdelta(source,0), waveunits(source,0), profile, mask, fit
425 mask = ((p >= pcl) && (p < pfl)) || ((p >= pfh) && (p < pch))
429 variable xil = x2pnt(profile, pil)
430 variable xih = x2pnt(profile, pih)
432 make /n=3 /free /d w_coef
433 for (qq = 0; qq < ny; qq += 1)
434 profile = source[p][qq]
435 curvefit /Q /NTHR=1 /W=2 poly 3, kwCWave=w_coef, profile /M=mask
436 fit = poly(w_coef, x)
437 sp = sum(profile, xil, xih)
438 sf = sum(fit, xil, xih)
445 sprintf s_note1, "AxisLabelD=peak integral"
446 sprintf s_note2, "KineticEnergy=%.3f", cpos * nx * dimdelta(source, 0) + dimoffset(source, 0)
466 variable Lcrop = NumberByKey("Lcrop", param, "=", ";")
467 variable Lsize = NumberByKey("Lsize", param, "=", ";")
468 variable Hcrop = NumberByKey("Hcrop", param, "=", ";")
469 variable Hsize = NumberByKey("Hsize", param, "=", ";")
470 variable Cpos = NumberByKey("Cpos", param, "=", ";")
471 variable Csize = NumberByKey("Csize", param, "=", ";")
473 prompt Lcrop, "Lower cropping region"
474 prompt Hcrop, "Upper cropping region"
475 prompt Lsize, "Lower background region"
476 prompt Hsize, "Upper background region"
477 prompt Cpos, "Center position"
478 prompt Csize, "Center integration region"
482 param = ReplaceNumberByKey("Lcrop", param, Lcrop, "=", ";")
483 param = ReplaceNumberByKey("Lsize", param, Lsize, "=", ";")
484 param = ReplaceNumberByKey("Hcrop", param, Hcrop, "=", ";")
485 param = ReplaceNumberByKey("Hsize", param, Hsize, "=", ";")
486 param = ReplaceNumberByKey("Cpos", param, Cpos, "=", ";")
487 param = ReplaceNumberByKey("Csize", param, Csize, "=", ";")
530 variable nx = dimsize(source, 0)
531 variable ny = dimsize(source, 1)
533 duplicate /free source, source_redim
534 redimension /n=(nx * ny) source_redim
536 redimension /n=(nx, ny) source_redim
551 param = ReplaceNumberByKey("rngl", param, -inf, "=", ";")
552 param = ReplaceNumberByKey("rngh", param, inf, "=", ";")
553 param = ReplaceNumberByKey("npeaks", param, 4, "=", ";")
554 param = ReplaceNumberByKey("ybox", param, 1, "=", ";")
555 param = ReplaceNumberByKey("pos1", param, 11, "=", ";")
556 param = ReplaceNumberByKey("wid1", param, 0.1, "=", ";")
557 param = ReplaceNumberByKey("pos2", param, 12, "=", ";")
558 param = ReplaceNumberByKey("wid2", param, 0.2, "=", ";")
559 param = ReplaceNumberByKey("pos3", param, 13, "=", ";")
560 param = ReplaceNumberByKey("wid3", param, 0.3, "=", ";")
561 param = ReplaceNumberByKey("pos4", param, 14, "=", ";")
562 param = ReplaceNumberByKey("wid4", param, 0.4, "=", ";")
566 variable npk = numpnts(results) / 2
569 for (ipk = 0; ipk < npk; ipk += 1)
570 sw = "test_int_" + num2str(ipk + 1)
571 duplicate /o results[ipk], $sw
572 sw = "test_sig_" + num2str(ipk + 1)
573 duplicate /o results[ipk + npk], $sw
583 variable rngl = NumberByKey("rngl", param, "=", ";")
584 variable rngh = NumberByKey("rngh", param, "=", ";")
585 variable pos1 = NumberByKey("pos1", param, "=", ";")
586 variable wid1 = NumberByKey("wid1", param, "=", ";")
587 variable pos2 = NumberByKey("pos2", param, "=", ";")
588 variable wid2 = NumberByKey("wid2", param, "=", ";")
589 variable pos3 = NumberByKey("pos3", param, "=", ";")
590 variable wid3 = NumberByKey("wid3", param, "=", ";")
591 variable pos4 = NumberByKey("pos4", param, "=", ";")
592 variable wid4 = NumberByKey("wid4", param, "=", ";")
593 variable npeaks = NumberByKey("npeaks", param, "=", ";")
594 variable ybox = NumberByKey("ybox", param, "=", ";")
596 prompt rngl, "range low"
597 prompt rngh, "range high"
598 prompt pos1, "position 1"
599 prompt wid1, "width 1"
600 prompt pos2, "position 2"
601 prompt wid2, "width 2"
602 prompt pos3, "position 3"
603 prompt wid3, "width 3"
604 prompt pos4, "position 4"
605 prompt wid4, "width 4"
606 prompt npeaks, "number of peaks"
607 prompt ybox, "ybox (1 or 3)"
609 doprompt "
gauss4_reduction reduction parameters (1/2)", rngl, rngh, npeaks, ybox
611 param = ReplaceNumberByKey("rngl", param, rngl, "=", ";")
612 param = ReplaceNumberByKey("rngh", param, rngh, "=", ";")
613 param = ReplaceNumberByKey("npeaks", param, npeaks, "=", ";")
614 param = ReplaceNumberByKey("ybox", param, ybox, "=", ";")
616 doprompt "
gauss4_reduction reduction parameters (2/2)", pos1, wid1, pos2, wid2, pos3, wid3, pos4, wid4
618 param = ReplaceNumberByKey("pos1", param, pos1, "=", ";")
619 param = ReplaceNumberByKey("wid1", param, wid1, "=", ";")
620 param = ReplaceNumberByKey("pos2", param, pos2, "=", ";")
621 param = ReplaceNumberByKey("wid2", param, wid2, "=", ";")
622 param = ReplaceNumberByKey("pos3", param, pos3, "=", ";")
623 param = ReplaceNumberByKey("wid3", param, wid3, "=", ";")
624 param = ReplaceNumberByKey("pos4", param, pos4, "=", ";")
625 param = ReplaceNumberByKey("wid4", param, wid4, "=", ";")
676 variable nx = dimsize(source, 0)
677 variable ny = dimsize(source, 1)
680 variable rngl = NumberByKey("rngl", param, "=", ";")
681 variable rngh = NumberByKey("rngh", param, "=", ";")
682 variable pos1 = NumberByKey("pos1", param, "=", ";")
683 variable wid1 = NumberByKey("wid1", param, "=", ";")
684 variable pos2 = NumberByKey("pos2", param, "=", ";")
685 variable wid2 = NumberByKey("wid2", param, "=", ";")
686 variable pos3 = NumberByKey("pos3", param, "=", ";")
687 variable wid3 = NumberByKey("wid3", param, "=", ";")
688 variable pos4 = NumberByKey("pos4", param, "=", ";")
689 variable wid4 = NumberByKey("wid4", param, "=", ";")
690 variable npeaks = NumberByKey("npeaks", param, "=", ";")
691 variable ybox = NumberByKey("ybox", param, "=", ";")
697 duplicate /free xprof, xprof_sig
698 variable pl = max(x2pnt(xprof, rngl), 0)
699 variable ph = min(x2pnt(xprof, rngh), numpnts(xprof) - 1)
701 make /free /n=(npeaks) peak_coef
702 peak_coef = p * 3 + 2
703 variable n_coef = npeaks * 3 + 2
704 make /free /d /n=14 w_coef, W_sigma
705 w_coef[0] = {0, 0, 1, pos1, wid1, 1, pos2, wid2, 1, pos3, wid3, 1, pos4, wid4}
706 redimension /n=(n_coef) w_coef, w_sigma
712 make /free /n=(npeaks + 2, numpnts(w_coef)) cmat
713 make /free /n=(npeaks + 2) cvec
720 for (ipk=0; ipk < npeaks; ipk += 1)
722 cmat[2 + ipk][2 + ipk*3] = -1
726 make /free /n=(npeaks * 2) /wave result_waves
728 for (ipk = 0; ipk < npeaks; ipk += 1)
729 make /free /n=0 pk_int
732 sprintf s_note,
"AxisLabelD=peak %u integral", ipk+1
734 sprintf s_note,
"KineticEnergy=%.3f", w_coef[3 + ipk * 3]
736 result_waves[ipk] = pk_int
738 make /free /n=0 pk_sig
741 sprintf s_note,
"AxisLabelD=peak %u sigma", ipk+1
743 sprintf s_note,
"KineticEnergy=%.3f", w_coef[3 + ipk * 3]
745 result_waves[ipk + npeaks] = pk_sig
747 waveclear pk_int, pk_sig
752 variable p1 = dimsize(source, 1) - 1
757 p0 += ceil((ybox - 1) / 2)
758 p1 -= ceil((ybox - 1) / 2)
760 variable V_FitNumIters
762 for (pp = p0; pp <= p1; pp += 1)
764 xprof = source[p][pp]
766 xprof += source[p][pp-1] + source[p][pp+1]
768 xprof_sig = max(sqrt(xprof), 1)
773 wmin = wavemin(xprof)
774 wmax = wavemax(xprof)
778 for (ipk=0; ipk < npeaks; ipk += 1)
779 w_coef[2 + ipk*3] = wmax - wmin
781 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]
785 if (V_FitNumIters < 40)
786 for (ipk = 0; ipk < npeaks; ipk += 1)
787 wave val = result_waves[ipk]
788 wave sig = result_waves[ipk + npeaks]
789 val[pp] = max(w_coef[peak_coef[ipk]], 0)
790 sig[pp] = max(w_sigma[peak_coef[ipk]], 0)
796 for (ipk = 0; ipk < npeaks; ipk += 1)
797 wave val = result_waves[ipk]
798 wave sig = result_waves[ipk + npeaks]
799 val *= w_coef[peak_coef[ipk] + 2] * sqrt(pi)
800 sig *= w_coef[peak_coef[ipk] + 2] * sqrt(pi)
838 function /s find_gauss4_reduction_params(spectrum, peakpos)
843 variable wmin = wavemin(spectrum)
844 variable wmax = wavemax(spectrum)
847 variable rngl = dimoffset(spectrum, 0)
848 variable rngh = dimoffset(spectrum, 0) + dimdelta(spectrum, 0) * (dimsize(spectrum, 0) - 1)
849 make /n=4 /free positions, widths
850 variable npeaks = numpnts(peakpos)
853 positions[0, npeaks-1] = peakpos[p]
856 variable n_coef = npeaks * 3 + 2
857 make /free /d /n=(n_coef) w_coef
862 make /free /n=(2+npeaks, numpnts(w_coef)) cmat
863 make /free /n=(2+npeaks) cvec
870 for (ip=0; ip < npeaks; ip += 1)
871 cmat[2 + ip][2 + ip*3] = -1
872 w_coef[2 + ip*3] = wmax - wmin
873 w_coef[3 + ip*3] = peakpos[ip]
874 w_coef[4 + ip*3] = widths[ip]
877 variable V_FitNumIters
880 for (ip=0; ip < npeaks; ip += 1)
881 positions[ip] = w_coef[3 + ip * 3]
882 widths[ip ] = abs(w_coef[4 + ip * 3])
884 for (ip=npeaks; ip < 4; ip += 1)
889 param = ReplaceNumberByKey(
"rngl", param, rngl,
"=",
";")
890 param = ReplaceNumberByKey(
"rngh", param, rngh,
"=",
";")
891 param = ReplaceNumberByKey(
"npeaks", param, npeaks,
"=",
";")
892 param = ReplaceNumberByKey(
"ybox", param, ybox,
"=",
";")
893 param = ReplaceNumberByKey(
"pos1", param, positions[0],
"=",
";")
894 param = ReplaceNumberByKey(
"wid1", param, widths[0],
"=",
";")
895 param = ReplaceNumberByKey(
"pos2", param, positions[1],
"=",
";")
896 param = ReplaceNumberByKey(
"wid2", param, widths[1],
"=",
";")
897 param = ReplaceNumberByKey(
"pos3", param, positions[2],
"=",
";")
898 param = ReplaceNumberByKey(
"wid3", param, widths[2],
"=",
";")
899 param = ReplaceNumberByKey(
"pos4", param, positions[3],
"=",
";")
900 param = ReplaceNumberByKey(
"wid4", param, widths[3],
"=",
";")
912 function test_shockley_anglefit(image, branch)
917 param = ReplaceStringByKey(
"branch", param, num2str(branch),
"=",
";")
925 string pkpos_name =
"saf_pkpos_" + s_branch
926 string pkwid_name =
"saf_pkwid_" + s_branch
928 wave /wave results = shockley_anglefit(image, param)
929 duplicate results[0], $pkpos_name
930 duplicate results[1], $pkwid_name
933 function prompt_Shockley_anglefit(param)
936 variable branch = NumberByKey(
"branch", param,
"=",
";")
938 prompt branch,
"Branch (-1 or +1)" 940 doprompt
"Shockley_anglefit_reduction Parameters", branch
942 param = ReplaceNumberByKey(
"branch", param, branch,
"=",
";")
970 threadsafe
function /wave Shockley_anglefit(source, param)
974 variable nx = dimsize(source, 0)
975 variable ny = dimsize(source, 1)
978 variable branch = NumberByKey(
"branch", param,
"=",
";")
981 if (numtype(branch) != 0)
986 make /wave /free /n=2 result_waves
987 make /free /n=0 dest1, dest2
988 result_waves[0] = dest1
989 result_waves[1] = dest2
1013 duplicate /free dest1, center
1014 q0 = round((y0 - dimoffset(source, 1)) / dimdelta(source, 1))
1015 q1 = round((y1 - dimoffset(source, 1)) / dimdelta(source, 1))
1017 wavestats /q/m=1 center
1018 p0 = round((v_maxloc - dimoffset(source, 0)) / dimdelta(source, 0))
1019 p1 = round((v_maxloc + 0.4 - dimoffset(source, 0)) / dimdelta(source, 0))
1022 make /n=(ny)/d/free profile
1023 setscale /p x dimoffset(source,1), dimdelta(source,1), waveunits(source,1), profile
1026 for (pp = p0; pp <= p1; pp += 1)
1027 profile = source[pp][p]
1028 curvefit /Q /NTHR=1 /W=2 gauss profile(y0,y1)
1030 dest1[pp] = w_coef[2]
1031 dest2[pp] = w_coef[3]
1037 function scienta_norm(w, x): fitfunc
1041 return w[0] * (x^2 - w[1]^2)
1044 function /wave fit_scienta_ang_transm(data, params)
1048 if (!waveexists(params))
1049 make /n=12 /o params
1051 redimension /n=12/d params
1053 variable h = wavemax(data) - wavemin(data)
1066 FuncFit /NTHR=0 /q scienta_ang_transm params data
1071 threadsafe
function scienta_ang_transm(w, x): fitfunc
1088 make /free /n=4 /d w_int
1090 w_int[1,] = w[p - 1]
1091 variable pk1 = gauss1d(w_int, x)
1092 w_int[1,] = w[p + 2]
1093 variable pk2 = gauss1d(w_int, x)
1094 w_int[1,] = w[p + 5]
1095 variable pk3 = gauss1d(w_int, x)
1096 w_int[0,2] = w[9 + p]
1098 variable bg = poly(w_int, x)
1100 return bg + pk1 + pk2 + pk3
1103 function /wave fit_scienta_poly_bg(data, params, bgterms)
1108 if (!waveexists(params))
1109 make /n=15 /o params
1111 redimension /n=15 /d params
1113 variable wmax = wavemax(data)
1114 variable wmin = wavemin(data)
1127 params[12] = (wmax - wmin) / dimdelta(data,1) / dimsize(data,1)
1131 string h =
"0000000000000" 1142 FuncFitMD /NTHR=1 /q /h=h scienta_poly_bg params data
1147 function scienta_poly_bg(w, e, a): fitfunc
1173 make /free /n=4 /d w_int
1178 w_int[2,] = w[p0 + p - 2]
1179 variable pk1 = gauss1d(w_int, a)
1182 w_int[1,] = w[p0 + p - 1]
1183 variable pk2 = gauss1d(w_int, a)
1186 w_int[1,] = w[p0 + p - 1]
1187 variable pk3 = gauss1d(w_int, a)
1190 w_int[0,2] = w[p0 + p]
1192 variable base = poly(w_int, a)
1195 w_int[0,3] = w[p0 + p]
1196 variable bg = poly(w_int, e)
1198 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)
set reduction parameters from cursors in a graph.
string capture_int_linbg_cursors()
this function is for testing only, until we implement a proper interface