# %% [markdown] # # QOF culler # %% cull_config = Config() cull_config.photometry_iterations = 1 cull_config.threshold_factor = -0.1 cull_config.fwhm_guess = 5 cull_config.max_epsf_stars = 150 cull_config.oversampling = 2 cull_config.cutout_size = 13 cull_config.fitshape = 15 cull_config.smoothing = util.make_gauss_kernel(1.2) cull_session = Session(cull_config, 'gausscluster_N2000_mag22_subpixel') cull_session.find_stars().select_epsfstars_auto().make_epsf() detections = cull_session.tables.finder_table # %% plt.figure() plt.imshow(cull_session.image, norm=LogNorm()) input_table = cull_session.tables.input_table plt.plot(input_table['x'], input_table['y'], 'o', fillstyle='none', markersize=7, markeredgewidth=0.6, markeredgecolor='black', alpha=0.8,
show_image(sg_session.image) save_plot(outdir, 'photutils_grid') show_image(gc_session.image) save_plot(outdir, 'photutils_gausscluster') # %% [markdown] # # EPSF derivation # %% gauss_config = config.Config() gauss_config.smoothing = util.make_gauss_kernel(1.5) sg_gauss_session = Session(gauss_config, sg_session.image_name) sg_session.find_stars().select_epsfstars_auto().make_epsf() sg_gauss_session.find_stars().select_epsfstars_auto().make_epsf() # %% fig, axs = plt.subplots(1, 2) im = axs[0].imshow(sg_session.epsf.data) axs[0].set_title('quartic smoothing kernel') plt.colorbar(im, ax=axs[0], shrink=0.5) im = axs[1].imshow(sg_gauss_session.epsf.data) axs[1].set_title('gaussian $σ=1$ smoothing kernel') plt.colorbar(im, ax=axs[1], shrink=0.5) save_plot(outdir, 'epsf_smoothing_comparison') # %% from astropy.modeling.functional_models import AiryDisk2D