示例#1
0
def bin_data():
    if gp.investigate == 'hern':
        import grh_com
        import grh_Pos
        import grh_MCMCbin
        grh_MCMCbin.run()
    elif gp.investigate == 'gaia':
        import grg_COM, grg_MCMCbin
        grg_COM.run()
        grg_MCMCbin.run()
    elif gp.investigate == 'walk':
        # TODO: call main again after first iteration, if gp.metalpop set
        import grw_COM, grw_MCMCbin # inside there, split by metallicity
        grw_COM.run()
        grw_MCMCbin.run()
        # run for 3D models as well if model is set (needed in rhowalktot)
        if gp.model:
            import grw_com, grw_mcmcbin
            grw_com.run()
            grw_mcmcbin.run()
    elif gp.investigate == 'discsim':
        import grs_com_align # centering, if not aligned yet
        import grs_rho
        import grs_siglos
    return
示例#2
0
def get_pos_and_COM(gp):
    if gp.investigate == 'hern':
        import grh_com
        grh_com.run(gp)
    elif gp.investigate == 'gaia':
        import grg_COM
        grg_COM.run(gp)
    elif gp.investigate == 'walk':
        import grw_COM
        grw_COM.run(gp)
        # run for 3D models as well if model is set (needed in rhotot_walk)
        if gp.walker3D:
            import grw_com
            grw_com.run()
    elif gp.investigate == 'coll':
        import grc_COM
        grc_COM.run(gp)
        # run for 3D models as well if model is set (needed in rhotot_walk)
    elif gp.investigate == 'triax':
        import grt_com
        grt_com.run(gp)
    elif gp.investigate == 'obs':
        if gp.pops == 1:
            if gp.case == 1:
                # in case we work with Fornax dwarf, use deBoer data
                import grd_photo_for
                grd_photo_for.run(gp)
                import grd_COM
                grd_COM.run(gp)
            elif gp.case == 5:
                print('TODO: include photometric data for Draco')
                #import grd_photo_dra
                #grd_photo_dra.run(gp)
                import grd_COM_dra
                grd_COM_dra.run(gp)
            else:
                import grd_COM
                grd_COM.run(gp)
        elif gp.pops == 2:
            import grd_metalsplit
            grd_metalsplit.read(gp.Rdiff, gp)
            #grd_metalsplit.run(gp)
            if gp.case < 5:
                import grd_COM
                grd_COM.run(gp)
            elif gp.case == 5:
                import grd_COM_dra
                grd_COM_dra.run(gp)
        else:
            print('implement >2 populations for observed galaxies')
            exit(1)
    else:
        print('wrong investigation')
        exit(1)
示例#3
0
def get_pos_and_COM(gp):
    if gp.investigate == 'hern':
        import grh_com
        grh_com.run(gp)
    elif gp.investigate == 'gaia':
        import grg_COM
        grg_COM.run(gp)
    elif gp.investigate == 'walk':
        import grw_COM
        grw_COM.run(gp)
        # run for 3D models as well if model is set (needed in rhotot_walk)
        if gp.walker3D:
            import grw_com
            grw_com.run()
    elif gp.investigate == 'coll':
        import grc_COM
        grc_COM.run(gp)
        # run for 3D models as well if model is set (needed in rhotot_walk)
    elif gp.investigate == 'triax':
        import grt_com
        grt_com.run(gp)
    elif gp.investigate == 'obs':
        if gp.pops == 1:
            if gp.case == 1:
                # in case we work with Fornax dwarf, use deBoer data
                import grd_photo_for
                grd_photo_for.run(gp)
                import grd_COM
                grd_COM.run(gp)
            elif gp.case == 5:
                print('TODO: include photometric data for Draco')
                #import grd_photo_dra
                #grd_photo_dra.run(gp)
                import grd_COM_dra
                grd_COM_dra.run(gp)
            else:
                import grd_COM
                grd_COM.run(gp)
        elif gp.pops == 2:
            import grd_metalsplit
            grd_metalsplit.read(gp.Rdiff, gp)
            #grd_metalsplit.run(gp)
            if gp.case < 5:
                import grd_COM
                grd_COM.run(gp)
            elif gp.case == 5:
                import grd_COM_dra
                grd_COM_dra.run(gp)
        else:
            print('implement >2 populations for observed galaxies')
            exit(1)
    else:
        print('wrong investigation')
        exit(1)