Re: Re: gain command

From: Michael Nowak <mnowak_at_email.domain.hidden>
Date: Fri, 26 Jul 2013 13:14:39 -0400
On Jul 26, 2013, at 1:05 PM, John Houck <houck_at_email.domain.hidden
> From: Efrain Gatuzz <egatuzz_at_email.domain.hidden>> Is there an equivalent command on ISIS to the gain command from
>> XSPEC? In order to modify a response file gain. I want to
>> shifts the energies on which the response matrix is defined and
>> shifts the effective area curve too.
> 
> The gainshift kernel should provide the equivalent
> functionality.

Actually, to clarify, the ISIS and XSPEC versions are not equivalent.
The XSPEC version is not quite correct - it shifts the model inside of
the integral in the forward folding equation.  

ISIS shifts the model outside of the integral, as it's supposed to be.

Since you are redefining the fit kernel (as you should be) in ISIS
when applying a gain shift, the plot_unfold function I wrote won't
work anymore. (But my plot_data and plot_counts still will.)

If you did want to mimic the (incorrect) XSPEC code, the S-lang
code below will make an ISIS convolution model that will achieve
the same XSPEC functionality. (Which will also work with plot_unfold.)

-Mike




define gain_fit(lo,hi,par,fun)
{
   variable ahi, alo, rgrid_fun;

   % slope = par[0], intercept = par[1];

   alo = _A(_A(lo)/par[0] - par[1]);
   ahi = make_hi_grid(alo);

   rgrid_fun = rebin(lo,hi,alo,ahi,fun);

   return rgrid_fun;
}

add_slang_function("gain",["slope","intercept"]);

set_function_category("gain", ISIS_FUN_OPERATOR);

----
You received this message because you are
subscribed to the isis-users list.
To unsubscribe, send a message to
isis-users-request_at_email.domain.hiddenwith the first line of the message as:
unsubscribe
Received on Fri Jul 26 2013 - 13:14:52 EDT

This archive was generated by hypermail 2.2.0 : Wed Jul 31 2013 - 15:42:57 EDT