Esempio n. 1
0
#!/usr/bin/env python
####################
# Example driver for maxlike sim masses
####################

import maxlike_controller, maxlike_masses, nfwmodel_normshapedistro, maxlike_sim_filehandler


makeController = lambda : maxlike_controller.Controller(modelbuilder = nfwmodel_normshapedistro.NormShapedistro(),
                                           filehandler = maxlike_sim_filehandler.SimFilehandler(),
                                           runmethod = maxlike_masses.ScanModelToFile())


if __name__ == '__main__':

    controller = makeController()

    controller.run_all()




Esempio n. 2
0
#!/usr/bin/env python
####################
# Example driver for maxlike sim masses
####################

import maxlike_controller, maxlike_masses, nfwmodel_voigtnorm_shapedistro, maxlike_subaru_secure_filehandler

controller = maxlike_controller.Controller(
    modelbuilder=maxlike_masses,
    shapedistro=nfwmodel_voigtnorm_shapedistro.VoigtnormShapedistro(
        '/nfs/slac/g/ki/ki06/anja/SUBARU/shapedistro/voigt_posterior.enlarged.normapprol.pkl'
    ),
    filehandler=maxlike_subaru_secure_filehandler.SubaruSecureFilehandler(),
    runmethod=maxlike_masses.SampleModelToFile())

if __name__ == '__main__':

    controller.run_all()
Esempio n. 3
0
#!/usr/bin/env python
####################
# Example driver for maxlike masses in Clusters project
####################

import maxlike_controller
import maxlike_bentstep_voigt
import maxlike_masses
import astropytable_filehandler as atf


#######################

makeTestingController = lambda: maxlike_controller.Controller(modelbuilder=maxlike_masses.LensingModel(),
                                                              filehandler=atf.AstropyTableFilehandler(),
                                                              runmethod=maxlike_masses.ScanModelToFile())

makeController = lambda: maxlike_controller.Controller(modelbuilder=maxlike_bentstep_voigt.BentVoigtShapedistro(),
                                                       filehandler=atf.AstropyTableFilehandler(),
                                                       runmethod=maxlike_masses.SampleModelToFile())

controller = makeController()


if __name__ == '__main__':

    controller.run_all()

Esempio n. 4
0
#!/usr/bin/env python
####################
# Example driver for maxlike sim masses
####################

import maxlike_controller, maxlike_bentstep_voigt as mbv
import maxlike_subaru_secure_filehandler as mssf, maxlike_masses

#######################

makeController = lambda: maxlike_controller.Controller(
    modelbuilder=mbv.BentVoigtShapedistro(),
    filehandler=mssf.SubaruSecureFilehandler(),
    runmethod=maxlike_masses.SampleModelToFile())

controller = makeController()

if __name__ == '__main__':

    controller.run_all()
Esempio n. 5
0
        self.mu += np.array(value)

    ########################

    def addCLOps(self, parser):

        parser.add_option(
            '--offset',
            help=
            'offsets applied to shape distributions [sigma gamma]. Expects 2 floats',
            action='callback',
            callback=self.addOffsetCallback,
            type='float',
            nargs=2)


###############################

controller = maxlike_controller.Controller(
    modelbuilder=maxlike_masses,
    shapedistro=SimVoigtShapeDistro(),
    filehandler=maxlike_sim_filehandler,
    runmethod=maxlike_masses.ScanModelToFile())

###############################

if __name__ == '__main__':

    controller.run_all()
Esempio n. 6
0
class SimFloatVoigtShapeDistro(mfs.FloatVoigtShapedistro):
    def calcMC(self, data):

        return 0., 0.

    #########################

    def bin_selectors(self, cat):

        return [np.ones(len(cat)) == 1]

    #########################

    ###############


###############################

makeController = lambda: maxlike_controller.Controller(
    modelbuilder=SimFloatVoigtShapeDistro(),
    filehandler=maxlike_sim_filehandler.SimFilehandler(),
    runmethod=maxlike_masses.SampleModelToFile())

###############################

if __name__ == '__main__':

    controller = makeController()

    controller.run_all()
Esempio n. 7
0
        lensingdir = '%s/LENSING_%s_%s_aper/%s' % (clusterdir, options.filter, options.filter, options.image)



        manager.inputPDZ = '%s/%s.%s.pdz.cat' % (options.workdir, options.cluster,
                                                 options.filter)



        manager.open('pdzmanager', manager.inputPDZ, pdzfile_utils.PDZManager.open)
        manager.store('pdzrange pdz'.split(), manager.pdzmanager.associatePDZ(manager.inputcat['SeqNr']))
        
        manager.replace('pdzmanager', None)
    


##############################################


controller = maxlike_controller.Controller(modelbuilder = maxlike_masses,
                                           shapedistro = nfwmodel_voigtnorm_shapedistro.VoigtnormShapedistro(),
                                           filehandler = CovarFilehandler(),
                                           runmethod = maxlike_masses.SampleModelToFile())


#################

if __name__ == '__main__':

    controller.run_all()
Esempio n. 8
0
#!/usr/bin/env python
####################
# Example driver for maxlike sim masses
####################

import maxlike_controller, maxlike_nfw2param as m2p
import maxlike_subaru_secure_filehandler as mssf

#######################

makeController = lambda: maxlike_controller.Controller(
    modelbuilder=m2p.NFW2Param(),
    filehandler=mssf.SubaruSecureFilehandler(),
    runmethod=m2p.SampleModelToFile())

controller = makeController()

if __name__ == '__main__':

    controller.run_all()