ISIS introduction for the new bachelor students
ISIS introduction for new students
General language features
- operators & mathematical functions
Plotting with ISIS
- FITS files
Fitting with ISIS
Loading and Evaluating a Local Model
In the following we will see how we can load and evaluate a local model. This will be done by the example of the
First, the model package is not automatically loaded, so it needs to be loaded first. We also need the isisscripts loaded for this.
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
You can see all parameters by typing
list_par; and set them using
set_par(...);. In order to see how to use this function, you can call
help set_par (note this is now without the ";").
After we have set the parameters how we want them to be, we need to define a grid and evaluate the model on it.
isis> variable lo,hi;
The log_grid() function takes three inputs, min, max and the number of bins. The values given here are arbitrary.
isis> (lo, hi) = log_grid(0.2, 10, 1000);
isis> variable spectrum = eval_fun_keV(lo, hi);
In order to convert the spectrum as energy flux, we need to convert it into the right units (hint: with
help eval_fun_keV you can see which units the function returns).
isis> spectrum *= 0.5*(lo+hi) / (hi-lo);
The above statements multiplies the output with the mean bin energy, and divides it by the bin width.
Now these data can be plotted logarithmically using
isis> xlog; ylog;
isis> hplot(lo,hi, spectrum);