def _get_struct(self): nobj = self.objs.size npars_psf = self._get_psf_npars() npars = 6 self.npars = npars dt = get_dtype(self["obj_fitter"], npars, npars_psf, self["psf_model"], models=self["obj_models"]) st = numpy.zeros(nobj, dtype=dt) for n in st.dtype.names: if "flag" in n: st[n] = NO_MEASUREMENT else: st[n] = -9999 st["photoid"] = sdsspy.get_photoid(self.objs) st["run"] = self.objs["run"] st["rerun"] = self.objs["rerun"] st["camcol"] = self.objs["camcol"] st["field"] = self.objs["field"] st["id"] = self.objs["id"] st["ra"] = self.objs["ra"] st["dec"] = self.objs["dec"] st["filter"] = self["filter"] st["fnum"] = self["fnum"] st["cmodelmag_dered_r"] = self.objs["rmag"] st["fitter"] = self["obj_fitter"] return st
def _set_object_seed(self, obj): pid = sdsspy.get_photoid(obj) numpy.random.seed(int(pid))