{"id":7201,"date":"2016-11-03T11:27:32","date_gmt":"2016-11-03T15:27:32","guid":{"rendered":"http:\/\/blog.originlab.com\/?p=7201"},"modified":"2018-12-06T03:42:31","modified_gmt":"2018-12-06T08:42:31","slug":"sequentially-initialize-fitting-parameters-in-batch-peak-analysis","status":"publish","type":"post","link":"https:\/\/blog.originlab.com\/ja\/sequentially-initialize-fitting-parameters-in-batch-peak-analysis","title":{"rendered":"Sequentially initialize fitting parameters in batch peak analysis"},"content":{"rendered":"<p>One scenario frequently encountered in batch peak analysis is the peak positions keep\u00a0changing\u00a0between datasets. It would be helpful for the peak analysis tool to remember the fitted parameters from the last dataset and use them as the initial guess for the next dataset in batch processing. Origin 2017 allows user to initialize the\u00a0fitting parameters\u00a0with\u00a0the\u00a0values of\u00a0last fitting\u00a0so that peak positions are well tracked to guarantee reliable fitting results. This example demonstrates the way to do batch peak analysis on a series of spectra where the peak position are moving with a certain trend.<\/p>\n<p>This <a href=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/ESRdata.zip\">esrdata<\/a>\u00a0contains a traditional ESR (electron spin resonance) experiment data where the single crystal\u00a0Ni4 sample is radiated with a rf magnetic field and the reflected power of the\u00a0sample as a function of the static field magnitude is measured. The orientation of the crystal to the static field affect the resonance peak position largely\u00a0as\u00a0can be seen below. We want\u00a0to fit each spectrum with a sum of two Gaussian functions and automate the process\u00a0by\u00a0batch processing.<\/p>\n<p><a href=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/11\/ESRspectrum.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-7406\" src=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/11\/ESRspectrum-300x198.png\" alt=\"esrspectrum\" width=\"527\" height=\"348\" srcset=\"https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/11\/ESRspectrum-300x198.png 300w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/11\/ESRspectrum-768x507.png 768w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/11\/ESRspectrum.png 996w\" sizes=\"auto, (max-width: 527px) 100vw, 527px\" \/><\/a><\/p>\n<p><strong>Step 1. Create a Peak Analysis Theme<\/strong><\/p>\n<ol>\n<li>Open moving_peaks.ogw. We want to customize Peak Analysis settings with one dataset first. Highlight column B, click <strong>Analysis:Peaks and baseline:Peak Analyzer:Open dialog <\/strong>to open the peak analyzer dialog. Under <strong>Goal<\/strong>, select <strong>Fit Peaks(Pro)<\/strong>. Click <strong>Next.<\/strong><br \/>\n<a href=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/PeakAnlyzer1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-7208\" src=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/PeakAnlyzer1-300x246.png\" alt=\"peakanlyzer1\" width=\"408\" height=\"335\" srcset=\"https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/PeakAnlyzer1-300x246.png 300w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/PeakAnlyzer1-768x629.png 768w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/PeakAnlyzer1.png 806w\" sizes=\"auto, (max-width: 408px) 100vw, 408px\" \/><\/a><\/li>\n<li>In the <strong>base\u00a0line\u00a0<\/strong>page, select <strong>User Defined<\/strong>\u00a0as\u00a0<strong>Baseline Mode<\/strong>. and click <strong>Next<\/strong> three times to\u00a0<strong>find peak<\/strong> page.<\/li>\n<li>Clear the checkbox of <strong>Enable Auto Find.\u00a0<\/strong>Click <strong>Find\u00a0<\/strong>and\u00a0two peaks are identified on the graph.<br \/>\n<a href=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/PeakAnlyzer2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-7209\" src=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/PeakAnlyzer2-300x123.png\" alt=\"peakanlyzer2\" width=\"800\" height=\"328\" srcset=\"https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/PeakAnlyzer2-300x123.png 300w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/PeakAnlyzer2-768x315.png 768w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/PeakAnlyzer2-1024x421.png 1024w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/PeakAnlyzer2.png 1495w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><\/li>\n<li>You\u00a0don&#8217;t really need to go to next page and finish the peak fitting. If you are satisfied with all settings, click the &gt;\u00a0button next to Dialog Theme box on the top of the dialog and click <strong>Save as&#8230;\u00a0<\/strong>to save the theme with name\u00a0PeakShift.<br \/>\n<a href=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/PeakAnlyzer3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-7210\" src=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/PeakAnlyzer3-300x193.png\" alt=\"peakanlyzer3\" width=\"520\" height=\"334\" srcset=\"https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/PeakAnlyzer3-300x193.png 300w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/PeakAnlyzer3-768x493.png 768w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/PeakAnlyzer3-80x50.png 80w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/PeakAnlyzer3.png 955w\" sizes=\"auto, (max-width: 520px) 100vw, 520px\" \/><\/a><\/li>\n<li>You can cancel the dialog now. Or click <strong>Finish<\/strong> to finish peak fitting. If you click Finish button, four resulting sheets are generated. Notice that\u00a0<strong>PeakProperties1<\/strong> worksheet contains the fitted parameter values for each peak.<br \/>\n<a href=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/PeakAnlyzer4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-7212\" src=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/PeakAnlyzer4-300x100.png\" alt=\"peakanlyzer4\" width=\"618\" height=\"206\" srcset=\"https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/PeakAnlyzer4-300x100.png 300w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/PeakAnlyzer4-768x255.png 768w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/PeakAnlyzer4.png 861w\" sizes=\"auto, (max-width: 618px) 100vw, 618px\" \/><\/a><\/li>\n<\/ol>\n<p><strong>Step 2. Batch Peak Analysis using Fitting Parameters of Previous Fit\u00a0<\/strong><\/p>\n<ol>\n<li>Go to the worksheet with the ESR data\u00a0and\u00a0highlight all columns. Select\u00a0<strong>Analysis:Peaks and baseline:Batch Peak Analysis using theme&#8230;<\/strong><\/li>\n<li>In the dialog, Under Theme, select <strong>PeakShift<\/strong>. \u00a0Set <strong>Result Sheet<\/strong> as <strong>Peak Properties(Pro)<\/strong>. Check <strong>Sequentially Initialize Parameter Values<\/strong>. Set <strong>Dataset Identifier<\/strong> as <strong>Comments<\/strong>. Click OK.<br \/>\n<a href=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/BatchPeak-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-7253\" src=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/BatchPeak-2-275x300.png\" alt=\"batchpeak\" width=\"411\" height=\"448\" srcset=\"https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/BatchPeak-2-275x300.png 275w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/BatchPeak-2.png 522w\" sizes=\"auto, (max-width: 411px) 100vw, 411px\" \/><\/a><\/li>\n<li>The peaks for all spectra are well fitted in the result sheet. Note: if you didn&#8217;t check the\u00a0<strong> Sequentially Initialize Parameter Values, <\/strong>the peak position will\u00a0get\u00a0lost in batch processing\u00a0and\u00a0the result will go wrong:<br \/>\n<a href=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/batchresult-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-7254\" src=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/batchresult-1-300x81.png\" alt=\"batchresult\" width=\"915\" height=\"247\" srcset=\"https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/batchresult-1-300x81.png 300w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/batchresult-1-768x208.png 768w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/batchresult-1-1024x278.png 1024w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/batchresult-1.png 1724w\" sizes=\"auto, (max-width: 915px) 100vw, 915px\" \/><\/a><\/li>\n<\/ol>","protected":false},"excerpt":{"rendered":"<p>One scenario frequently encountered in batch peak analysis is the &hellip; <\/p>","protected":false},"author":875,"featured_media":7267,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[4],"tags":[],"class_list":["post-7201","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-analysis"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7DvU2-1S9","jetpack_likes_enabled":true,"jetpack_featured_media_url":"https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/10\/SquentialInitFeatureImage.png","post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/posts\/7201","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/users\/875"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/comments?post=7201"}],"version-history":[{"count":11,"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/posts\/7201\/revisions"}],"predecessor-version":[{"id":10183,"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/posts\/7201\/revisions\/10183"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/media\/7267"}],"wp:attachment":[{"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/media?parent=7201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/categories?post=7201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/tags?post=7201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}