def __init__(self, photo_sample, nchunk=None): """ E.g. procrun='prim04' """ self.prefix='zinput' self.photo_sample = photo_sample self.nchunk = nchunk self.data = None self.keep_indices=None pzdir = zphot.photoz_dir() self.dir = path_join(pzdir,'inputs',self.photo_sample) print("photo dir: ",self.dir) self.conf = zphot.read_config('zinput',photo_sample) if self.conf['photo_sample'] != photo_sample: raise ValueError("photo_sample in config is not '%s'" \ % photo_sample) pprint.pprint(self.conf) if self.conf['weighting']: self.conf['filetype'] = 'dat' source = self.conf.get('source','dr8_final') if source != 'dr8_final': raise ValueError("only set up for dr8_final source")
def init(self, train_sample): self.types = {'primus':'primus.zerod.10oct29.zconf4', '2slaq':'2slaq', 'cfrs':'cfrs', 'cnoc2':'cnoc2.cut', 'deep2':'deep2.form.fix', 'sdss':'sdssobjids', 'tkrs':'tkrs-fix', 'vvds':'vvds', 'zcosmos':'zcosmos'} self.dir_matched = path_join(self.basedir, 'matched', train_sample) if self.no_photo_cuts: self.dir_matched = path_join(self.dir_matched,'no_photo_cuts') self.conf = zphot.read_config('train',self.train_sample) self.photo_conf = zphot.read_config('zinput',self.conf['photo_sample']) pprint.pprint(self.conf)
def __init__(self, wrun): """ type='all' by default, meaning the combined file """ raise ValueError("fix to work with new photo_dtype") self.wrun=wrun self.conf = zphot.read_config('weights',self.wrun) self.wt = zphot.weighting.WeightedTraining(self.wrun) self.types = self.wt.types