Hi, John. Thanks for the response. Sorry I'm following up on this slowly. So it sounds like the one part I need to work out is the bin-integration of the model M(E). For a powerlaw model, I was using M(E_mid)*dE, but are you saying that it should technically be integral{ m(E)dE } over the bin, which would be similar to what I used but slightly different? On 12/22/10 6:44 AM, John Houck wrote: > On Wed, Dec 15, 2010 at 15:52 -0800, Rob Gibson wrote: >> I'm trying to reproduce the formula used in ISIS (XSPEC, etc.) to >> calculate model counts given an ARF, RMF, and flux model. >> >> The equation is apparently: C(h) = B(h) + \int dE R(h, E) A(E) m(E), >> where R, A, and m are the RMF, ARF, and model respectively. >> >> Can anyone tell me if the following is accurate? (It seems to work.) > The exposure time and background scaling aren't explicit in the > above expression, but the expression is essentially accurate. > >> What are the gotchas here? >> >> 1) Use the CIAO tool rmfimg to convert an rmf file to a 2D R(h, E) data >> structure. >> 2) Load A(E) directly from the ARF file. >> 3) m(E) returns a value of photons/keV/cm^2/s; e.g., for a powerlaw >> model it would be: >> m(E) = norm * Emid^(-gamma), where Emid is the center of the RMF >> energy bin and (norm, gamma) are the usual powerlaw model parameters. > Because the integral is discretized, the model values must be > bin-integrated. > >> 4) Evaluate the integral (R*A*m dE) using energy bins (Emid, dE) from >> the RMF grid. >> 5) Convert channel h to Energy using the second data table of the >> original RMF file. >> 6) Plot energy (converted from channel h) vs. C(h); this seems to match >> plot_model_counts in bin_integral space. >> >> Is that the correct specification of the model term m(E) in the >> equation, or is does there need to be some sort of bin-integral value >> like in add_slang_function()? > Yes, the bin-integration is necessary. > >> Apparently ISIS evaluates these models on a wavelength grid, so would >> convert the above integral to wavelength space. Is that right? > Isis uses a wavelength grid internally, but since it doesn't > move the bin edges. For the purposes of checking the > calculation, the units shouldn't be important. > > 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: unsubscribeReceived on Mon Jan 10 2011 - 12:45:05 EST
This archive was generated by hypermail 2.3.0 : Fri May 02 2014 - 08:35:47 EDT