{"id":360,"date":"2013-07-13T03:13:59","date_gmt":"2013-07-13T02:13:59","guid":{"rendered":"http:\/\/antonpotocnik.com\/?p=360"},"modified":"2024-05-26T15:29:26","modified_gmt":"2024-05-26T14:29:26","slug":"eprfit","status":"publish","type":"post","link":"https:\/\/antonpotocnik.com\/?p=360","title":{"rendered":"eprFit"},"content":{"rendered":"<p><strong>eprFit<\/strong> is a Matlab-based tool for analysis of electron paramagnetic resonance (EPR) spectra. The program allows to load a series of spectra, typically as a function of temperature, and then perform various analysis on the entire series.<\/p>\n<h3>Features<\/h3>\n<ul>\n<li>Spectral moment analysis<\/li>\n<li>Fitting spectra with analytical functions including errorbar estimates (Curve Fitting Tool)<\/li>\n<li>Fitting spectra with numerical simulations (fminsearch)<\/li>\n<li>Background correction<\/li>\n<li>Spectra multiplication, subtraction, shift, normalization, and binning<\/li>\n<li>Phase correction and Hilbert transform<\/li>\n<li>Possible integration with EasySpin<\/li>\n<li>EPR intensity calibration<\/li>\n<\/ul>\n<p>Analytical and numerical functions are defined in separate files, so one can easily add new functions.<\/p>\n<h3>Recognized file formats<\/h3>\n<ul>\n<li>In-house EPR file format<\/li>\n<li>Bruker file format (*.DSC, *.DAT)<\/li>\n<li>High-field EPR formats (<a href=\"http:\/\/www.magnet.fsu.edu\/\">NHMFL<\/a>)<\/li>\n<li>Plain ASCII (two or three columns, no header)<\/li>\n<\/ul>\n<h3>Screen shots<\/h3>\n\n\t\t<style type=\"text\/css\">\n\t\t\t#gallery-1 {\n\t\t\t\tmargin: auto;\n\t\t\t}\n\t\t\t#gallery-1 .gallery-item {\n\t\t\t\tfloat: left;\n\t\t\t\tmargin-top: 10px;\n\t\t\t\ttext-align: center;\n\t\t\t\twidth: 33%;\n\t\t\t}\n\t\t\t#gallery-1 img {\n\t\t\t\tborder: 2px solid #cfcfcf;\n\t\t\t}\n\t\t\t#gallery-1 .gallery-caption {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\t\t\t\/* see gallery_shortcode() in wp-includes\/media.php *\/\n\t\t<\/style>\n\t\t<div id='gallery-1' class='gallery galleryid-360 gallery-columns-3 gallery-size-thumbnail'><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/antonpotocnik.com\/?attachment_id=291'><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/antonpotocnik.com\/wp-content\/uploads\/2013\/07\/eprFit1-150x150.png\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" aria-describedby=\"gallery-1-291\" \/><\/a>\n\t\t\t<\/dt>\n\t\t\t\t<dd class='wp-caption-text gallery-caption' id='gallery-1-291'>\n\t\t\t\tFitting analytical functions\n\t\t\t\t<\/dd><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/antonpotocnik.com\/?attachment_id=292'><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/antonpotocnik.com\/wp-content\/uploads\/2013\/07\/eprFit2-150x150.png\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" aria-describedby=\"gallery-1-292\" \/><\/a>\n\t\t\t<\/dt>\n\t\t\t\t<dd class='wp-caption-text gallery-caption' id='gallery-1-292'>\n\t\t\t\tNumerical moment analysis\n\t\t\t\t<\/dd><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/antonpotocnik.com\/?attachment_id=293'><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/antonpotocnik.com\/wp-content\/uploads\/2013\/07\/eprFit3-150x150.png\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" aria-describedby=\"gallery-1-293\" \/><\/a>\n\t\t\t<\/dt>\n\t\t\t\t<dd class='wp-caption-text gallery-caption' id='gallery-1-293'>\n\t\t\t\tFitting simulated data\n\t\t\t\t<\/dd><\/dl><br style=\"clear: both\" \/><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/antonpotocnik.com\/?attachment_id=294'><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/antonpotocnik.com\/wp-content\/uploads\/2013\/07\/eprFit4-150x150.png\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" aria-describedby=\"gallery-1-294\" \/><\/a>\n\t\t\t<\/dt>\n\t\t\t\t<dd class='wp-caption-text gallery-caption' id='gallery-1-294'>\n\t\t\t\tOther features\n\t\t\t\t<\/dd><\/dl>\n\t\t\t<br style='clear: both' \/>\n\t\t<\/div>\n\n<h3>Source code<\/h3>\n<p>Distributed under GNU GPL license. If the analysis obtained by this tool is going to be published in any journal, the authors are required to cite this webpage.<\/p>\n<p><a href=\"https:\/\/github.com\/apotocnik\/eprFit\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/apotocnik\/eprFit\u00a0<\/a><\/p>\n<h3><\/h3>\n<h3>What is new?<\/h3>\n<h4>25. 3. 2014 eprFit4.6<\/h4>\n<ul>\n<li>Improved ascii file reading with column choosing<\/li>\n<li>Added Gaussian and Lorentzian powder functions<\/li>\n<\/ul>\n<h4>31. 8. 2013 eprFit4.4<\/h4>\n<ul>\n<li>added pseudo Voigt fitting function from Origin library http:\/\/www.originlab.com\/www\/helponline\/origin\/en\/UserGuide\/PsdVoigt1.html<\/li>\n<li>added show components after Plot button is pressed in Fitting panel<\/li>\n<li>added undo and reundo for Fitting.<\/li>\n<li>improved undo and reundo for fitting and simulations: if parameters don&#8217;t change uicoefs is not saved one more time.<\/li>\n<li>after fitting is finnished the whole uicoefs is saved under epr.fit.fits{idx}.uiconf, not only parameters. And when update function is called the whole uicoefs is restored. Works only if fitting one spectrum at a time.<\/li>\n<li>number of fitting functions can now be up to 50, instead of 5.<\/li>\n<li>when normal functions are added min values are now set to 0 instead to -inf.<\/li>\n<li>improved remove function: if the function is removed, ones with higher numbers get one number less. So there is no number jump in functions and coefficients.<\/li>\n<li>when loading ASCII files frequency is set to 0 (instead to 1). When converting xc to g-factor, in case of freq = 0, resulting g-factor in results equals to xc (g=xc). This is necessary for non-EPR spectra.<\/li>\n<li>removed bug: edit when right-clicking on the filename did not work when only one element was present.<\/li>\n<\/ul>\n<h4>18. 7. 2013 eprFit4.3<\/h4>\n<ul>\n<li>Added the whole new panel for EasySpin and improved compatibility<\/li>\n<li>Sim panel now has Undo and ReUndo buttons to restore old simulation parameters.<\/li>\n<\/ul>\n<h4>13. 7. 2013 eprFit 4.2<\/h4>\n<ul>\n<li>dGauss function in simulation tab is now corrected.<\/li>\n<li>dGaussDisp and GaussDisp are added. These two function include calculation of Gaussian dispersion set by phase parameter which mixes absorption and dispersion. These two functions do not work close to <em>H<\/em> = 0 G, sice the other component (x+xc) would give NaN for narrow spectra. This will be corrected in future.<\/li>\n<li>When creating new experiment, data is automatically set to now.<\/li>\n<\/ul>\n<h4>12. 7. 2012 eprFit 4.1<\/h4>\n<ul>\n<li>now calibration edit boxes are saved and reloaded on open<\/li>\n<\/ul>\n<h3>Documentation<\/h3>\n<p>To start using eprFit, first go to <em>Data-&gt;Load Data<\/em>. One ore more spectra can be selected.<\/p>\n<p>To find the position on a spectra in units of magnetic field or <em>g<\/em>-factor two pointers are available at the bottom of the program. After a pointer is clicked on the graph the magnetic field value is saved to the clipboard. The magnetic field difference between two pointers is shown in between the two pointer buttons at the bottom.<\/p>\n<p>For plotting, simulating, or fitting first add the appropriate function in the right panel. Definitions of available functions can be found in <em>fun_lib.m <\/em>or <em>fun_lib_sim.m<\/em> files for <em>Fitting<\/em> and <em>Sim<\/em> panels, respectively. When adding new functions be sure to add the name of a function also in the <em>otherwise<\/em> casein the switch statement.<\/p>\n<p>Every analysis (<em>Fit<\/em>, <em>Analyse,<\/em> or <em>Fit to Data<\/em> in the right panels) contains <em>Run<\/em> button which iterates the analysis over the spectra in the left listbox. This process can be stopped only with <em>Ctrl+C <\/em>key combination in Matlab.<\/p>\n<p><em>Update parameters <\/em>checkbox in the left bottom corner if checked updates fitting parameters if they are available. Parameters are updated when new spectre is selected in the left listbox, either by clicking on it or by <em>Run<\/em> procedure.<\/p>\n<p>Range text box searches for pairs of numbers and plots or analyses only regions defined by these pairs. For example, Range: [300 400 500 600] will plot or analyse spectrum only between 300-400 mT and 500-600 mT.<\/p>\n<p>In the menu <em>Data-&gt;Sort<\/em> will sort spectra in the left listbox according to the temperature parameter.<\/p>\n<p>In the menu <em>Data-&gt;Parse Temp<\/em> will extract values of temperature from the filenames. This is useful when temperatures are not correctly set in the file parameters section.<\/p>\n<p>In the <em>Sim<\/em> panel <em>Phi step [\u00b0]<\/em>: defines the angle step for powder average simulations. In principle, smaller step means longer computational time and better accuracy. <em>dLorentzPowd<\/em> and <em>dGaussPowd<\/em>\u00a0 functions use ZCW method for determining spherical angles distribution.<\/p>\n<p>In the <em>Other<\/em> panel <em>Phase correction<\/em> mixes real and imaginary part of data. For X-band measurements with auto frequency control (AFC) real data is always zero. Plotted is always imaginary component which correspond to the absorption of the microwaves in EPR. <em>Hilbert transform<\/em> mixes absorption and dispersion from single component (imaginary).<\/p>\n<p>In the EasySpin part, by clicking on the <em>Execute<\/em> button the <em>Exp<\/em> structure and\u00a0<em>spc<\/em> vector containing selected spectrum from the left listbox are loaded before the given file is evaluated. <em>spc<\/em> does not contain magnetic field values as these can be calculated from fields in the <em>Exp<\/em> structure.<\/p>\n<p>For more information or bug report please <a title=\"Contact Page\" href=\"https:\/\/antonpotocnik.com\/?page_id=83\">contact me<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>eprFit is a Matlab-based tool for analysis of electron paramagnetic resonance (EPR) spectra. The program allows to load a series of spectra, typically as a function of temperature, and then perform various analysis on the entire series. Features Spectral moment analysis Fitting spectra with analytical functions including errorbar estimates (Curve Fitting Tool) Fitting spectra with&hellip;<\/p>\n","protected":false},"author":1,"featured_media":291,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[18],"tags":[14,19],"class_list":["post-360","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","tag-epr","tag-tools"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/antonpotocnik.com\/wp-content\/uploads\/2013\/07\/eprFit1.png","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/s3Hjcy-eprfit","_links":{"self":[{"href":"https:\/\/antonpotocnik.com\/index.php?rest_route=\/wp\/v2\/posts\/360","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/antonpotocnik.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/antonpotocnik.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/antonpotocnik.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/antonpotocnik.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=360"}],"version-history":[{"count":17,"href":"https:\/\/antonpotocnik.com\/index.php?rest_route=\/wp\/v2\/posts\/360\/revisions"}],"predecessor-version":[{"id":721653,"href":"https:\/\/antonpotocnik.com\/index.php?rest_route=\/wp\/v2\/posts\/360\/revisions\/721653"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/antonpotocnik.com\/index.php?rest_route=\/wp\/v2\/media\/291"}],"wp:attachment":[{"href":"https:\/\/antonpotocnik.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=360"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/antonpotocnik.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=360"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/antonpotocnik.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=360"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}