// InitPeakMacros TEXT, V1.2.1 // This macro creates all the global variables and strings // needed to use TN020's procedure file. // // You will need to execute this macro in order to compile // the TN020 Peak Measurement Experiment's procedure file. // // Please read the documentation on how to install the required XOP(s), // and how to use the experiment macros. // // This InitPeakMacros TEXT file replaces the version that shipped with // Igor 1.28 or earlier, and that shipped with Igor Pro 2.0.1 or earlier. Macro InitPeakMacros() Silent 1;PauseUpdate String/G m_mp,m_so String/G m_b,m_bi,m_ba,m_bd,m_bf,m_bs String/G m_a,m_ai,m_aa,m_ala String/G m_ii,m_ia,m_id,m_iap String/G m_f,m_ff,m_fo,m_fr,m_fs,m_fh String/G m_s String/G m_cug String/G m_cw m_mp="Make Peaksƒ" m_so="Initialize Most Everythingƒ" m_b="Baseline" m_bi="Init Baseline Fit..." m_ba="Add Region To Fit/1" m_bd="Delete Region From Fit/2" m_bf="Fit Baseline At Regionsƒ" m_bs="Subtract Baseline..." m_a="Area" m_ai="Init Area Between Cursorsƒ" m_aa="Area Between Cursors/3" m_ala="List Areas" m_f="Fit Peaks" m_ii="Init Identify Peaksƒ" m_ia="Identify Peak With Cursors/4" m_id="Delete Pks Between Cursors/5" m_iap="Auto Identify Peaksƒ/6" m_ff="Fit Peaks And Baselineƒ/7" m_fr="Reportƒ" m_fs="Show Fitted Peaksƒ" m_fh="Hide Fitted Peaks" m_s="Show Fit Residualƒ" m_cug="Show Only Data And Base/0" m_cw="Color Waves" String/G g_w,g_wx,g_b,g_keep String/G p_w,p_wx,p_b,p_wd,p_wxd,p_bx p_w = "peak data wave, including baseline" p_wd = "data wave" p_wx = "X coordinates for peak data wave" p_wxd = "X coordinates for data wave" p_b = "baseline" p_bx="approximate peak x width at 50%" Variable/G g_bx String/G p_aipw p_aipw="ADD to existing peak list;OVERWRITE peak list" Variable/G mp_kind,mp_pnts=8,mp_noise,mp_log,mp_minx,mp_maxx String/G p_pts p_pts="(2;(4;(8;16;32;64;128;256;512;1024;2048;4096;8192;16384" String/G fbar_wr,fbar_fit,fbar_wobase Variable/G mpr_pol Variable/G mir_what,mir_anno String/G mir_pwh mir_pwh="counts;integrate rectangular;integrate trapezoidal" variable/G fp_pol=1,fp_minamp Variable/G tfp_pol,tfp_extent,tfp_mw,tfp_what String/G S_funcs String s s =" line 2;" s += " poly 3 ;" s += " poly 4 ;" s += " poly 5 ;" s += " sin 4;" s += " dblexp 4;" s += " exp 3;" s += " lor 4;" s += " gauss 4;" S_funcs=s Variable/G fpks_extent String/G ar_wfit,ar_ow Variable/G ar_anno,ar_ex Variable/G afp_anno String/G pfr_title String/G S_Wave,new,none,calc new="_New_;" none="_None_;" calc="_Calculated_;" String/G bcw,bdcw,breg,pcw,pdcw bcw="W_BaseCoefs" bdcw="W_BasePM" breg="W_BaseRegion" pcw="W_PeakFitCoefs" pdcw="W_PeakPM" String/G areg,areaNB,areaX1,areaX2 areg="W_AreaRegion" areaNB="W_AreaNoBase" areaX1="W_AreaX1";areaX2="W_AreaX2" String/G ampsY,ctrsX,widsX,edgsP,ctrsP ampsY="W_EstAmpsY" ctrsX="W_EstCentersX" widsX="W_EstWidthsX" edgsP="W_EstEdgesP" ctrsP="W_EstCentersP" // Other global variables and waves Make/N=5 W_PM Variable/G V_tol=1e-10,V_peakX,V_peakP,V_start,V_theEnd,V_startX,V_theEndX // Variables and Strings not in the shipping version V1.2, that should be String/G m_ah= "Hide Area Tags" String/G rb_b String/G fpks_b String/G afp_b String/G rb_ow Variable/G afp_pks Variable/G g_ptgn Variable/G g_atgn Variable/G/D V_npnts // Otherwise Identify Peaks with Cursors fails. // Mistakes in the shipping version V1.2, corrected // String/G fpks_pktype,fpks_weights String/G fpks_weights Variable/G fpks_pktype // Variable/G pfr_sort,pfr_order,pfr_bi Variable/G pfr_order,pfr_bi String/G pfr_sort End