Re: Tweaking the model counts

From: John Houck <houck_at_email.domain.hidden>
Date: Fri, 5 May 2006 12:04:00 -0400
On Fri, May 05, 2006 at 11:46 -0400, John E. Davis wrote:
> Hi,
> 
> The standard kernel computes the following:
> 
>    C(h) = T \int R(h,E) A(E)s(E)dE
>    
> What is the easiest may to tweak this to become
> 
>    C(h) = T F(h) \int R(h,E) A(E)s(E)dE
> 
> where F(h) is an arbitrary function of h?  Is there a
> "post_model_counts" evaluation hook?  If E and h were on the same
> grid, the it would be easy.  Of course I can always interpolate F(h)
> to the E grid and absorb it into s(E), but I was hoping for something
> a bit simpler.
> 
> Thanks,
> --John


Yes -- see the help page for set_post_model_hook.

You should be able to do something like this:

      define arbitrary_fcn (lo, hi)
      {         
         % .. compute F(h)...
         return f;
      }
      define post_model (lo, hi, c, b)
      {
         % lo,hi = full-resolution data grid
         % c = model counts array
         % b = background counts array
         
         variable f = arbitrary_fcn (lo, hi);
         
         return (f*c + b);
      }
      set_post_model_hook (id, &post_model);

Note that the hook works with the full-resolution model counts
and scaled background counts arrays.

Thanks,
-John
----
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 May 05 2006 - 12:04:13 EDT

This archive was generated by hypermail 2.3.0 : Fri May 02 2014 - 08:35:44 EDT