Beispiel #1
0
    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")
Beispiel #2
0
    def __init__(self):
        pzdir=zphot.photoz_dir()
        self.dir = path_join(pzdir,'training','original-2010-09-19')
        self.infile = path_join(self.dir,'primus.zerod.10oct29.fits.gz')
        self.outfile = path_join(self.dir,'primus.zerod.10oct29.zconf4.rec')

        self.data = eu.io.read(self.infile,lower=True,verbose=True)
        eu.numpy_util.to_native(self.data, inplace=True)
Beispiel #3
0
    def __init__(self, train_sample=None, no_photo_cuts=False):
        self.train_sample = train_sample
        self.dir_matched = None
        self.no_photo_cuts = no_photo_cuts

        pzdir = zphot.photoz_dir()
        self.basedir = path_join(pzdir, 'training')
        self.prefix = 'train'

        self.conf=None

        if self.train_sample is not None:
            self.init(self.train_sample)