def corner_observed(self, **kwargs):
tot_mags = []<EOL>names = []<EOL>truths = []<EOL>rng = []<EOL>for n in self.obs.get_obs_nodes():<EOL><INDENT>labels = [l.label for l in n.get_model_nodes()]<EOL>band = n.band<EOL>mags = [self.samples['<STR_LIT>'.format(band, l)] for l in labels]<EOL>tot_mag = addmags(*mags)<EOL>if n.relative:<EOL><INDENT>name = '<STR_LIT>'.format(n.instrument, n.band)<EOL>ref = n.reference<EOL>if ref is None:<EOL><INDENT>continue<EOL><DEDENT>ref_labels = [l.label for l in ref.get_model_nodes()]<EOL>ref_mags = [self.samples['<STR_LIT>'.format(band, l)] for l in ref_labels]<EOL>tot_ref_mag = addmags(*ref_mags)<EOL>tot_mags.append(tot_mag - tot_ref_mag)<EOL>truths.append(n.value[<NUM_LIT:0>] - ref.value[<NUM_LIT:0>])<EOL><DEDENT>else:<EOL><INDENT>name = '<STR_LIT>'.format(n.instrument, n.band)<EOL>tot_mags.append(tot_mag)<EOL>truths.append(n.value[<NUM_LIT:0>])<EOL><DEDENT>names.append(name)<EOL>rng.append((min(truths[-<NUM_LIT:1>], np.percentile(tot_mags[-<NUM_LIT:1>],<NUM_LIT:0.5>)),<EOL>max(truths[-<NUM_LIT:1>], np.percentile(tot_mags[-<NUM_LIT:1>],<NUM_LIT>))))<EOL><DEDENT>tot_mags = np.array(tot_mags).T<EOL>return corner.corner(tot_mags, labels=names, truths=truths, range=rng, **kwargs)<EOL>
Makes corner plot for each observed node magnitude