<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.sternwarte.uni-erlangen.de/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rose</id>
	<title>Remeis-Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.sternwarte.uni-erlangen.de/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rose"/>
	<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php/Special:Contributions/Rose"/>
	<updated>2026-04-06T02:25:27Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.7</generator>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=ISIS_introduction_for_the_new_bachelor_students&amp;diff=2101</id>
		<title>ISIS introduction for the new bachelor students</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=ISIS_introduction_for_the_new_bachelor_students&amp;diff=2101"/>
		<updated>2020-10-07T14:45:16Z</updated>

		<summary type="html">&lt;p&gt;Rose: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ISIS introduction for new students == &lt;br /&gt;
&lt;br /&gt;
=== General language features ===&lt;br /&gt;
* arrays&lt;br /&gt;
** operators &amp;amp; mathematical functions&lt;br /&gt;
** &amp;lt;code&amp;gt;where&amp;lt;/code&amp;gt;&lt;br /&gt;
* structs&lt;br /&gt;
&lt;br /&gt;
=== Plotting with ISIS ===&lt;br /&gt;
* &amp;lt;code&amp;gt;[o][h]plot&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;{x,y}label&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;{x,y}range&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;{x,y}log&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;color&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;linestyle&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;connect_points&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;pointstyle&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;multiplot&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Data analysis ===&lt;br /&gt;
* FITS files&lt;br /&gt;
* histograms&lt;br /&gt;
&lt;br /&gt;
=== Fitting with ISIS ===&lt;br /&gt;
* &amp;lt;code&amp;gt;load_data&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;group&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;group_data&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;rebin_data&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[x]notice[_en]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;fit_fun&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;set_par&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;edit_par&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;fit_counts&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;define_counts&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Loading and Evaluating a Local Model ===&lt;br /&gt;
&lt;br /&gt;
In the following we will see how we can load and evaluate a local model. This will be done by the example of the &amp;lt;code&amp;gt;relxill&amp;lt;/code&amp;gt; model.&lt;br /&gt;
&lt;br /&gt;
First, the model package is not automatically loaded, so it needs to be loaded first. We also need the isisscripts loaded for this.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;isis&amp;gt; require(&amp;quot;isisscripts&amp;quot;); &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;isis&amp;gt; use_localmodel(&amp;quot;relxill&amp;quot;); &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then we can use it to define the fit funtion we want to use. For now we want to use the lamp post version of the relxill model. Therefore we need to execute&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;isis&amp;gt; fit_fun(&amp;quot;relxilllp&amp;quot;); &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see all parameters by typing &amp;lt;code&amp;gt;list_par;&amp;lt;/code&amp;gt; and set them using &amp;lt;code&amp;gt;set_par(...);&amp;lt;/code&amp;gt;. In order to see how to use this function, you can call &amp;lt;code&amp;gt;help set_par&amp;lt;/code&amp;gt; (note this is now without the &amp;quot;;&amp;quot;). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After we have set the parameters how we want them to be, we need to define a grid and evaluate the model on it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;isis&amp;gt; variable lo,hi; &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The log_grid() function takes three inputs, min, max and the number of bins. The values given here are arbitrary.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;isis&amp;gt; (lo, hi) = log_grid(0.2, 10, 1000); &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;isis&amp;gt; variable spectrum = eval_fun_keV(lo, hi); &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to convert the spectrum as energy flux, we need to convert it into the right units (hint: with &amp;lt;code&amp;gt;help eval_fun_keV&amp;lt;/code&amp;gt; you can see which units the function returns).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;isis&amp;gt; spectrum *= 0.5*(lo+hi) / (hi-lo); &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above statements multiplies the output with the mean bin energy, and divides it by the bin width.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now these data can be plotted logarithmically using&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;isis&amp;gt; xlog; ylog;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;isis&amp;gt; hplot(lo,hi, spectrum);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Isis / Slang]]&lt;/div&gt;</summary>
		<author><name>Rose</name></author>
	</entry>
</feed>