Re: any ways to create a fake (simple) RMF in isis?

From: John Houck <houck_at_email.domain.hidden>
Date: Tue, 1 Mar 2011 12:36:14 -0500
On Wed, Mar 02, 2011 at 01:15 +0900, Kazunori Ishibashi wrote:
> Hello all, 
> 
> Is there a simple way to create a fake response matrix with 
> a Gaussian profile with a fixed energy width (peaked at the 
> input energy) and load it into ISIS? 
>

Yes.  See the example below.

> I am trying to decode the description on load_slang_rmf, but 
> it is not entirely clear how the RMF profile needs to be
> defined from the example. 
> 

Sorry about that.  I'll try to clarify the documentation.

Here's an example that defines an RMF using the Gaussian
cumulative distribution function from the GSL module:

require ("gsl");

define gaussian_rmf (lo, hi, e0, parms)
{
   variable sigma = parms[0];
   return (cdf_gaussian_P (hi-e0, sigma)
                   - cdf_gaussian_P (lo-e0, sigma));
}

variable rmf_id = load_slang_rmf (&gaussian_rmf,
                                  linear_grid (0.1, 10, 1024),
                                  linear_grid (0.1, 10, 1024);
                                  grid="en",
                                  parms=[0.2]);

To show that this produces a Gaussian redistribution, you can
generate some fake data with a delta-function source model,
like so:

assign_rmf (rmf_id, 1);
set_data_exposure (1, 1.e5);

fit_fun ("delta");
set_par ("delta(1).norm", 1);
set_par ("delta(1).lambda", _A(2.45));

() = eval_counts;
fakeit;
plot_data_counts;

The resulting plot of the fake data shows a Gaussian peak at
2.45 keV.

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 Tue Mar 01 2011 - 12:36:29 EST

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