load_image("center_box_0.25pix.fits") image_data() image_getregion() notice2d("rotbox(88.16875,75.8625,70.416667,68.508334,0)") load_psf("psf0", "psf_f1_norm_0.25pix.fits") set_psf(psf0) psf0.size=[32,32] psf0.center=[128,129] print get_psf() image_psf() set_psf(psf0) psf0.center=[128,129] psf0.size=[72,72] print get_psf() image_psf() set_source(const2d.c1+gauss2d.g1) c1.c0=1 g1.fwhm = 6 g1.xpos = 90 g1.ypos = 80 g1.ampl = 100 show_source() show_model() set_stat("cash") freeze(c1.c0) set_method("neldermead") set_method_opt("iquad",0) set_method_opt("finalsimplex",0) fit() thaw(c1.c0) fit() contour_resid() limits(X_AXIS,55,120) limits(Y_AXIS,45,110) get_contour_zrange() image_crate = pack_image() set_imagevals(image_crate,get_model_image().y) write_file(image_crate,"2dpsf_model_image.fits") set_imagevals(image_crate, get_resid_image().y) write_file(image_crate, "2dpsf_resid_cnts.fits")