On Tue, 2008-07-15 at 22:29 -0500, John ZuHone wrote:
> Aneta,
>
> Thanks for the helpful comments and code. Just one quick question:
>
> Would I create the 1D PSF by creating a 2D PSF (with, e.g. mkpsf) and
> then using dmextract to create a radial profile?
>
You should use CHART to create a PSF rays, then MARX to make a PSF
event file and then extract radial profile. Check the Thread on CIAO
web pages:
http://cxc.harvard.edu/chart/threads/index.html
Good Luck,
Aneta
> Thanks again,
>
> John Z
>
> On Jul 15, 2008, at 10:17 PM, Aneta Siemiginowska wrote:
>
> >
> > Hello,
> >
> > There are two options depending on whether you are using CIAO 3.4 or
> > CIAO 4 version of Sherpa.
> >
> > In CIAO 3.4 the psf data file can be input into "fpsf1d" instrument
> > model. You should see an example on the command line when you type
> > "ahelp fpsf1d"
> >
> > CIAO4 contains Sherpa Beta, but you should be able to work with radial
> > profile in CIAO4 too. There is no thread example. I include a list of
> > the commands in CIAO4 Python Sherpa Beta below.
> >
> > Hope this helps
> > Aneta Siemiginowska
> >
> >
> >
> >
> > ---------------------------------
> > In CIAO4 Sherpa beta - Python version use the following commands:
> >
> > load_table("rprofile_rmid.fits[cols RMID, SUR_BRI, SUR_BRI_ERR]")
> >
> > # check the data
> > get_data()
> >
> > # plot and modify plots
> >
> > plot_data()
> > log_scale(XY_AXIS)
> > set_plot_xlabel("RMID [ pixel ]")
> > set_plot_ylabel("SUR BRI [ cnts/pixel^{2} ]")
> >
> >
> > # read psf 1d data file
> >
> > load_table("psf","psf_rprofile_rmids.fits[cols RMID, SUR_BRI]")
> > print (get_data("psf"))
> >
> >
> > # plot psf
> >
> > get_data_plot_prefs()["yerrorbars"]=False
> > plot_data("psf")
> > log_scale(XY_AXIS)
> > set_plot_xlabel("RMID [ pixel ]")
> > set_plot_ylabel("SUR BRI [ cnts/pixel^{2} ]")
> > get_data_plot_prefs()["yerrorbars"]=True
> >
> > #check statistics
> > print get_stat_name()
> >
> > # check optimization method
> > print(get_method_name())
> >
> > # change optimization method
> >
> > set_method("neldermead")
> >
> > # set beta model
> >
> > set_model(beta1d.src)
> > src.r0 = 105
> > src.beta = 4
> > src.xpos = 0
> > src.ampl = 0.01
> > src.ampl.max = 10
> > freeze(src.xpos)
> >
> > # check the model
> > print get_model()
> >
> >
> > # set psf data file as a 1d psf model
> >
> > set_psf_model(get_data("psf"), psf1d.pf)
> > pf.radial = 1
> > pf.xsize = 36
> > pf.xcenter = 18
> >
> > # check model expression with the psf
> >
> > print("sherpa> print get_full_model()")
> > print(get_full_model())
> >
> >
> > fit()
> >
> > # plot and modify the plot labels, axes etc.
> >
> > plot_fit()
> >
> > print('sherpa> log_scale XY_AXIS')
> > print('sherpa> set_plot_xlabel "RMID [ pixel ]"')
> > print('sherpa> set_plot_ylabel "SUR BRI [ cnts/pixel^{2} ]"')
> > log_scale(XY_AXIS)
> > set_plot_xlabel("RMID [ pixel ]")
> > set_plot_ylabel("SUR BRI [ cnts/pixel^{2} ]")
> >
> >
> > # You should be careful of the soft parameter limits
> >
> >
> > On Tue, 2008-07-15 at 18:33 -0500, John ZuHone wrote:
> >> Hello,
> >>
> >> I was wondering how to convolve a 1d radial profile model (such as
> >> beta1d) in sherpa with a file-based PSF and fit it to a radial
> >> profile.
> >>
> >> Thanks,
> >>
> >> John Z
> >>
>
This archive was generated by hypermail 2b29 : Thu Dec 13 2012 - 01:00:10 EST