def show_isoc_phase_sim_hess(self, fig): opt_sim = self.planes.get_sim_hess(('f475w', 'f814w'), self.synth, self.lockfile) ir_sim = self.planes.get_sim_hess(('f110w', 'f160w'), self.synth, self.lockfile) opt_cmd = self.planes[('f475w', 'f814w')] ir_cmd = self.planes[('f110w', 'f160w')] gs = gridspec.GridSpec(2, 3, wspace=0.4, bottom=0.2, width_ratios=[1., 1., 0.1]) ax_opt = fig.add_subplot(gs[0, 0]) ax_ir = fig.add_subplot(gs[0, 1]) ax_obs_opt = fig.add_subplot(gs[1, 0]) ax_obs_ir = fig.add_subplot(gs[1, 1]) cb_ax = fig.add_subplot(gs[1, 2]) plot_hess(ax_opt, opt_sim.hess, opt_cmd, opt_sim.origin, imshow_args=None) plot_hess(ax_ir, ir_sim.hess, ir_cmd, ir_sim.origin, imshow_args=None) c = self.catalog.data['f475w_vega'] - self.catalog.data['f814w_vega'] contour_hess(ax_obs_opt, c, self.catalog.data['f814w_vega'], opt_cmd.x_span, opt_cmd.y_span, plot_args={'ms': 3}) plot_isochrone_phases(ax_obs_opt, 'F475W', 'F814W', show_cb=False) # opt_cmd.plot_mask(ax_obs_opt) ax_obs_opt.set_xlabel(opt_cmd.x_label) ax_obs_opt.set_ylabel(opt_cmd.y_label) ax_obs_opt.set_xlim(opt_cmd.xlim) ax_obs_opt.set_ylim(opt_cmd.ylim) c = self.catalog.data['f110w_vega'] - self.catalog.data['f160w_vega'] contour_hess(ax_obs_ir, c, self.catalog.data['f160w_vega'], ir_cmd.x_span, ir_cmd.y_span, plot_args={'ms': 3}) plot_isochrone_phases(ax_obs_ir, 'F110W', 'F160W', show_cb=True, cb_ax=cb_ax) # ir_cmd.plot_mask(ax_obs_ir) ax_obs_ir.set_xlabel(ir_cmd.x_label) ax_obs_ir.set_ylabel(ir_cmd.y_label) ax_obs_ir.set_xlim(ir_cmd.xlim) ax_obs_ir.set_ylim(ir_cmd.ylim) fig.show()
def plot_obs_hess(self, ax, dataset, plane_key, imshow=None): plane = self.planes[plane_key] x = dataset.get_phot(plane.x_mag) y = dataset.get_phot(plane.y_mag) obs_hess = StarCatalogHess(x, y, plane) return plot_hess(ax, obs_hess.hess, plane, obs_hess.origin, imshow_args=imshow)
def plot_sim_hess(self, ax, plane_key): plane = self.planes[plane_key] sim = self.planes.get_sim_hess(plane_key, self.synth, self.lockfile) plot_hess(ax, sim.hess, plane, sim.origin, imshow_args=None)
def plot_hess_array(self, ax, hess, plane_key, imshow=None, log=True): plane = self.planes[plane_key] return plot_hess(ax, hess, plane, plane.origin, imshow_args=imshow, log=log)
def plot_fit_hess(self, ax, fit_key, plane_key, imshow=None): plane = self.planes[plane_key] fit_hess = SimHess.from_sfh_solution(self.fits[fit_key], plane) return plot_hess(ax, fit_hess.hess, plane, fit_hess.origin, imshow_args=imshow)
def plot_sim_hess(self, ax, plane_key, imshow=None): plane = self.planes[plane_key] sim = self.get_sim_hess(plane_key) return plot_hess(ax, sim.hess, plane, sim.origin, imshow_args=imshow)