define_counts question

From: <rgibson_at_email.domain.hidden>
Date: Thu, 10 Jul 2008 13:18:03 -0400
Can someone explain what is happening here, and the right way to do this?

I'm trying to:
  1) load an arf and rmf, assign them to an empty data set
  2) define a model and evaluate that model on the arf/rmf grid to get a counts
spectrum
  3) use x=get_model_counts and then define_counts(x) to generate a counts
spectrum that exactly corresponds to the model
  4) use flux_corr to convert the new counts spectrum into a flux spectrum

But when I compare the plot_data_flux spectrum to that of my model, they don't
quite match.  They match up in the hard X-rays, but are notably off in the
soft.  (And the plot_data_flux spectrum seems to deviate from a pure power
law.)  Is there some bin-density issue that I need to account for?

Thanks much,
Rob


---------

   dad();
   variable dI = 1;
   variable a = load_arf(specDir + "cSource.arf.gz");
   t1 = load_rmf(specDir + "cSource.rmf.gz");
   assign_arf(a, dI);
   assign_rmf(t1, dI);
   set_data_exposure(dI, expo0);
   set_arf_exposure(a, expo0);

   % Doesn't matter if powerlw or zpowerlw, really, since norm is arbitrary
   fit_fun("powerlaw(1)");
   set_par(1, baseNorm, 1);
   set_par(2, gamma0, 1);
   notice(dI); flux_corr(dI);
   ignore(dI); notice(dI, g_hc / 20., g_hc / 0.1);
   () = eval_flux(); () = eval_counts();

   variable oMC = get_model_counts(dI);
   variable oMF = get_model_flux(dI);
   dad;
   variable dI1 = define_counts(
      oMC.bin_lo, oMC.bin_hi, oMC.value, sqrt(oMC.value));
   variable a1 = load_arf(specDir + "cSource.arf.gz");
   t1 = load_rmf(specDir + "cSource.rmf.gz");
   assign_arf(a1, dI1);
   assign_rmf(t1, dI1);
   set_data_exposure(dI1, expo0);
   set_arf_exposure(a1, expo0);
   flux_corr(dI1);

   xrange(0.1, 20); yrange; xlog; ylog; plot_bin_density;
   plot_data_flux(dI1);
   ohplot(g_hc / oMF.bin_hi, g_hc / oMF.bin_lo, oMF.value);

----
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 Thu Jul 10 2008 - 13:18:19 EDT

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