On Mon, Apr 25, 2011 at 17:43 -0500, Fabien Grisé wrote: > Hi all, > > I have been using Isis and I have succeeded in doing most things I wanted to. > > Doing some X-ray/UV/optical/IR fitting, I wanted to export unabsorbed > fluxes of data and models. I have been able to export the fluxes from > the models using eval_fun on a linear grid and then writing the values > in a table with writecol. > However, this may be obvious but I have not been able to export > unabsorbed X-ray fluxes from the data (that I prefer to get in units > of erg). I thought that fixing the nH to 0 would do the trick but > apparently that does not work. Here is what I used: > > load_par("fits/pldbb/pldbbsave"); > set_par("tbabs(1).nH",0,1,0,10000); > set_par("tbabs(2).nH",0,1,0,10000); > () = eval_counts; > plot_unfold(1;dsym=-4,dcol=4,decol=4,mcol=2,power=0,res=2); > write_plot("pldbb_total_dered";head=0); For what it's worth, plot_unfold and write_plot are functions contributed by Mike Nowak and are not part of the isis distribution. > > Is there another way to do this? > Any help would be appreciated. > To get the spectral model flux in units of photons/s/cm^2/bin you can use get_model_flux like so: load_par("fits/pldbb/pldbbsave"); set_par("tbabs(1).nH",0); set_par("tbabs(2).nH",0); () = eval_counts; f = _A(get_model_flux (1)); where the _A() function converts from a wavelength grid (angstrom) an energy grid (keV). To convert the model flux values from from photon flux to energy flux, do: photon_energy = 0.5 * (f.bin_lo + f.bin_hi) * 1.e3 * Const_eV; f.value *= photon_energy; At this point, the flux units of f.value are erg/sec/cm^2/bin and the bin edges, f.bin_lo, f.bin_hi, are in keV. To write these values with writecol: writecol ("filename.txt", f.bin_lo, f.bin_hi, f.value); 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 Apr 25 2011 - 21:07:39 EDT
This archive was generated by hypermail 2.3.0 : Fri May 02 2014 - 08:35:47 EDT