<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?action=history&amp;feed=atom&amp;title=Plot_fit_model_%28xfig_example%29</id>
	<title>Plot fit model (xfig example) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?action=history&amp;feed=atom&amp;title=Plot_fit_model_%28xfig_example%29"/>
	<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Plot_fit_model_(xfig_example)&amp;action=history"/>
	<updated>2026-05-18T19:05:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.7</generator>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Plot_fit_model_(xfig_example)&amp;diff=1125&amp;oldid=prev</id>
		<title>Obst: Obst moved page Example: Plot fit model to Plot fit model (xfig example) without leaving a redirect</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Plot_fit_model_(xfig_example)&amp;diff=1125&amp;oldid=prev"/>
		<updated>2018-04-17T09:11:42Z</updated>

		<summary type="html">&lt;p&gt;Obst moved page &lt;a href=&quot;/wiki/index.php?title=Example:_Plot_fit_model&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Example: Plot fit model (page does not exist)&quot;&gt;Example: Plot fit model&lt;/a&gt; to &lt;a href=&quot;/wiki/index.php/Plot_fit_model_(xfig_example)&quot; title=&quot;Plot fit model (xfig example)&quot;&gt;Plot fit model (xfig example)&lt;/a&gt; without leaving a redirect&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:11, 17 April 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Obst</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Plot_fit_model_(xfig_example)&amp;diff=1055&amp;oldid=prev</id>
		<title>Niu at 14:58, 13 April 2018</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Plot_fit_model_(xfig_example)&amp;diff=1055&amp;oldid=prev"/>
		<updated>2018-04-13T14:58:48Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:58, 13 April 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:sedfitsmodel.png&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;?500&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:sedfitsmodel.png]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Note: This only contains parts of the original script, showing how to plot the fit model.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Note: This only contains parts of the original script, showing how to plot the fit model.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Niu</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Plot_fit_model_(xfig_example)&amp;diff=1054&amp;oldid=prev</id>
		<title>Niu: Created page with &quot;File:sedfitsmodel.png?500  Note: This only contains parts of the original script, showing how to plot the fit model.  &lt;pre&gt;  %For a Plot with Hz as x-axis % for keV axis u...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Plot_fit_model_(xfig_example)&amp;diff=1054&amp;oldid=prev"/>
		<updated>2018-04-13T14:58:36Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&lt;a href=&quot;/wiki/index.php?title=File:Sedfitsmodel.png%3F500&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;File:Sedfitsmodel.png?500 (page does not exist)&quot;&gt;File:sedfitsmodel.png?500&lt;/a&gt;  Note: This only contains parts of the original script, showing how to plot the fit model.  &amp;lt;pre&amp;gt;  %For a Plot with Hz as x-axis % for keV axis u...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[File:sedfitsmodel.png?500]]&lt;br /&gt;
&lt;br /&gt;
Note: This only contains parts of the original script, showing how to plot the fit model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
%For a Plot with Hz as x-axis&lt;br /&gt;
% for keV axis use built-in function eval_fun_keV&lt;br /&gt;
&lt;br /&gt;
require(&amp;quot;isisscripts&amp;quot;);&lt;br /&gt;
variable plan=4.135667516e-18; %Planck constant&lt;br /&gt;
define eval_fun_hz(hz_bin_lo, hz_bin_hi)&lt;br /&gt;
{  &lt;br /&gt;
    variable A_bin_lo = _A(hz_bin_hi*plan);&lt;br /&gt;
    variable A_bin_hi = _A(hz_bin_lo*plan);&lt;br /&gt;
    variable flux = eval_fun(A_bin_lo, A_bin_hi);&lt;br /&gt;
    return reverse(flux);  &lt;br /&gt;
}  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
%Load model&lt;br /&gt;
load_par(&amp;quot;best_fit.par&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
%Get unassorbed/dereddened model&lt;br /&gt;
%Chose whatever model or component you want to show&lt;br /&gt;
&lt;br /&gt;
fit_fun(&amp;quot;(logpar(1)+logpar(2)+zbbody(1))&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
%Get the x grid where you want to evaluate your model&lt;br /&gt;
variable lo,hi;&lt;br /&gt;
&lt;br /&gt;
(lo, hi) = log_grid (1e9, 1e26, 5000);&lt;br /&gt;
&lt;br /&gt;
%Evaluate model on the defined grid&lt;br /&gt;
variable a = eval_fun_hz(lo,hi);&lt;br /&gt;
%Note: Output is in bin-integrated photon flux: ph/s/cm^2/bin&lt;br /&gt;
&lt;br /&gt;
variable k = 1./624150636.3094;  %keV2ergs&lt;br /&gt;
&lt;br /&gt;
%Conversion to differential energy flux (assuming constant flux in bin): erg/s/cm^2&lt;br /&gt;
variable conv_factor = (0.5 * ((lo*plan) + (hi*plan)))^2/((hi*plan)-&lt;br /&gt;
(lo*plan))*k;&lt;br /&gt;
&lt;br /&gt;
%Apply flux conversion to model&lt;br /&gt;
variable model = conv_factor*a;&lt;br /&gt;
&lt;br /&gt;
%For log plotting: set 0 values to very small ones&lt;br /&gt;
model[where (model==0)]=1e-29;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
%In an initialized xfig plot:&lt;br /&gt;
%Note: linear center of bin not log, because grid is fine enough&lt;br /&gt;
pl.plot((lo+hi)/2., model;color=&amp;quot;black&amp;quot;,width=2,depth=50);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:SLxfig]]&lt;/div&gt;</summary>
		<author><name>Niu</name></author>
	</entry>
</feed>