Loving ISIS - Confessions of a Former XSPEC User | ||
|
Parameters:
As discussed on the models page, the model
parameters can be edited via the ISIS
isis> model("powerlaw(1)");
isis> list_par;
powerlaw(1)
idx param tie-to freeze value min max
1 powerlaw(1).norm 0 0 1 0 1e+10
2 powerlaw(1).PhoIndex 0 0 1 -2 9
isis> set_par(2,1.7,0,1,3); % set_par(2,1.7,1); would have frozen it
I have wrapped a function around this, newpar(), which will
also take -1 as indicating a frozen parameter. (Bowing to my
XSPEC days...)
Parameters can be tied together, and they can be arbitrary
functions of one another. This allows greater flexibility than the
improved parameter handling of XSPEC 12. The ISIS intrinsic command
public define offset ()
{
if (Isis_Active_Dataset == 2)
return 3.0;
else
return 2.5;
}
set_par_fun ("gauss(2).center", "gauss(1).center + offset()");
I.e., Isis_Active_Dataset is used to define an offset();
function which has the value 3.0 for dataset 2, but is 2.5 for all
other datasets. This function is then used to tie together two
gaussian line mid-points.
Here is another example from the analysis script
that ensures that the inner and outer edges of the
define dummy_fit(lo,hi,par)
{
return 1;
}
add_slang_function("dummy","Delta_R");
model("dummy(1)*constant(Isis_Active_Dataset)*phabs(1)*highecut(1)*(bkn2pow(1)+diskline(1))");
newpar(1,get_par(16)-get_par(15),0,0.1,994);
set_par_fun(16,"_par(1)+_par(15)");
That is, we are setting the outer line radius (_par(16)) to be
the inner line radius (_par(15)) plus an offset
(_par_1). Notice also that in the above example, we were able
to use functions as arguments in other function calls. Important
Note: Use of the "_par(idx)" syntax will not automatically
properly carry forward if the model is redefined, and the parameter
indices change. (Hence the recent update to the more robust
"model_name(id).parameter" syntax above.)
Finally, ISIS of course allows you to save and subsequently reload
models and parameters via the Next Up: At long last - fitting! |
This page was last updated Mar 22, 2006 by Michael Nowak. To comment on it or the material presented here, send email to mnowak@space.mit.edu.
![]()