コード例 #1
0
ファイル: pycymatch_v5.py プロジェクト: jodarie/python_lib
def main():

    ##
    # Read arguments
    opts = get_opts().parse_args()

    ##
    # Check input files
    for file in opts.input_files:
        errors.file_name_error(file)

    h_line()

    ##
    # Read mock halo catalogue
    mock = read_mock(opts)

    ##
    # Read observed catalogue
    obs = read_obs(opts)

    h_line()

    ##
    # Find Matches
    matches = find_matches(mock, obs, 2.0 * opts.delta_z, opts)
    print_matches(mock[matches[2]], obs, matches[0], matches[1], opts)

    ##
    # Define completeness and purity of sample
    c_matrix = get_completeness(mock, matches, opts)
    p_matrix = get_purity(obs, matches, opts)

    ##
    # Define mass-observable matrix for matched objects
    matrix, hm_matrix, ranges = mo_matrix(mock, obs, matches, opts)

    h_line()

    ##
    # Make plots
    make_plots(matrix, hm_matrix, ranges, opts)
    plot_complete(c_matrix[0], 'mass', opts)
    plot_complete(c_matrix[1], 'ngal', opts)
    plot_pure(p_matrix, opts)

    ##
    # Save matrix to file
    print_matrix(matrix, hm_matrix, ranges, opts)

    h_line()
コード例 #2
0
ファイル: pycymatch_v5.py プロジェクト: jodarie/python_lib
def main():

    ##
    # Read arguments
    opts = get_opts().parse_args()

    ##
    # Check input files
    for file in opts.input_files:
        errors.file_name_error(file)

    h_line()
    
    ##
    # Read mock halo catalogue
    mock = read_mock(opts)

    ##
    # Read observed catalogue
    obs = read_obs(opts)

    h_line()

    ##
    # Find Matches
    matches = find_matches(mock, obs, 2.0 * opts.delta_z, opts)
    print_matches(mock[matches[2]], obs, matches[0], matches[1], opts)

    ##
    # Define completeness and purity of sample
    c_matrix = get_completeness(mock, matches, opts)
    p_matrix = get_purity(obs, matches, opts)

    ##
    # Define mass-observable matrix for matched objects
    matrix, hm_matrix, ranges = mo_matrix(mock, obs, matches, opts)
        
    h_line()
    
    ##
    # Make plots
    make_plots(matrix, hm_matrix, ranges, opts)
    plot_complete(c_matrix[0], 'mass', opts)
    plot_complete(c_matrix[1], 'ngal', opts)
    plot_pure(p_matrix, opts)
    
    ##
    # Save matrix to file
    print_matrix(matrix, hm_matrix, ranges, opts)

    h_line()
コード例 #3
0
ファイル: pymemmatch_v1.py プロジェクト: jodarie/python_lib
from pycymatch_lib.pycymatch_extra import h_line
from pymemmatch_lib.pymemmatch_match import mo_matrix
from pymemmatch_lib.pymemmatch_io import *
from pycymatch_lib.pycymatch_plot import *

# READ ARGUMENTS

opts = get_opts().parse_args()

# READ DATA

# - check files
for file in opts.input_files:
    errors.file_name_error(file)

h_line()

# - read mock catalogue
mock = read_mock(opts)

# - read observed catalogue
obs = read_obs(opts)

h_line()

# FIND MATCHES

matrix, x_range, z_range = mo_matrix(mock, obs, opts)

# PLOT
コード例 #4
0
ファイル: pymemmatch_v1.py プロジェクト: EiffL/python_lib
from pycymatch_lib.pycymatch_extra import h_line
from pymemmatch_lib.pymemmatch_match import mo_matrix
from pymemmatch_lib.pymemmatch_io import *
from pycymatch_lib.pycymatch_plot import *

# READ ARGUMENTS

opts = get_opts().parse_args()

# READ DATA

# - check files
for file in opts.input_files:
    errors.file_name_error(file)

h_line()

# - read mock catalogue
mock = read_mock(opts)

# - read observed catalogue
obs = read_obs(opts)

h_line()

# FIND MATCHES

matrix, x_range, z_range = mo_matrix(mock, obs, opts)

# PLOT