firecrown.metadata_functions ============================ .. py:module:: firecrown.metadata_functions .. autoapi-nested-parse:: This module deals with two-point metadata functions. It contains functions used to manipulate two-point metadata, including extracting metadata from a sacc file and creating new metadata objects. Attributes ---------- .. autoapisummary:: firecrown.metadata_functions.TwoPointRealIndex firecrown.metadata_functions.TwoPointHarmonicIndex Functions --------- .. autoapisummary:: firecrown.metadata_functions.make_measurement firecrown.metadata_functions.make_measurements firecrown.metadata_functions.make_measurement_dict firecrown.metadata_functions.make_measurements_dict firecrown.metadata_functions.make_correlation_space firecrown.metadata_functions.match_name_type firecrown.metadata_functions.extract_all_tracers_inferred_galaxy_zdists firecrown.metadata_functions.extract_all_measured_types firecrown.metadata_functions.extract_all_real_metadata_indices firecrown.metadata_functions.extract_all_harmonic_metadata_indices firecrown.metadata_functions.extract_all_harmonic_metadata firecrown.metadata_functions.extract_all_real_metadata firecrown.metadata_functions.extract_all_photoz_bin_combinations firecrown.metadata_functions.extract_window_function firecrown.metadata_functions.make_all_photoz_bin_combinations firecrown.metadata_functions.make_two_point_xy firecrown.metadata_functions.measurements_from_index Module Contents --------------- .. py:data:: TwoPointRealIndex .. py:data:: TwoPointHarmonicIndex .. py:function:: make_measurement(value) Create a Measurement object from a dictionary. .. py:function:: make_measurements(value) Create a Measurement object from a dictionary. .. py:function:: make_measurement_dict(value) Create a dictionary from a Measurement object. :param value: the measurement to turn into a dictionary .. py:function:: make_measurements_dict(value) Create a dictionary from a Measurement object. :param value: the measurement to turn into a dictionary .. py:function:: make_correlation_space(value) Create a CorrelationSpace object from a string. .. py:function:: match_name_type(tracer1, tracer2, a, b, require_convetion = False) Use the naming convention to assign the right measurement to each tracer. .. py:function:: extract_all_tracers_inferred_galaxy_zdists(sacc_data, include_maybe_types=False) Extracts the two-point function metadata from a Sacc object. The Sacc object contains a set of tracers (one-dimensional bins) and data points (measurements of the correlation between two tracers). This function extracts the two-point function metadata from the Sacc object and returns it in a list. .. py:function:: extract_all_measured_types(sacc_data, include_maybe_types = False) Extracts the two-point function metadata from a Sacc object. The Sacc object contains a set of tracers (one-dimensional bins) and data points (measurements of the correlation between two tracers). This function extracts the two-point function metadata from the Sacc object and returns it in a list. .. py:function:: extract_all_real_metadata_indices(sacc_data, allowed_data_type = None) Extract all two-point function metadata from a sacc file. Extracts the two-point function measurement metadata for all measurements made in real space from a Sacc object. .. py:function:: extract_all_harmonic_metadata_indices(sacc_data, allowed_data_type = None) Extracts the two-point function metadata from a sacc file. .. py:function:: extract_all_harmonic_metadata(sacc_data, allowed_data_type = None, include_maybe_types=False) Extract the two-point function metadata and data from a sacc file. .. py:function:: extract_all_real_metadata(sacc_data, allowed_data_type = None, include_maybe_types=False) Extract the two-point function metadata and data from a sacc file. .. py:function:: extract_all_photoz_bin_combinations(sacc_data, include_maybe_types = False) Extracts the two-point function metadata from a sacc file. .. py:function:: extract_window_function(sacc_data, indices) Extract ells and weights for a window function. :params sacc_data: the Sacc object from which we read. :params indices: the indices of the data points in the Sacc object which are computed by the window function. :returns: the ells and weights of the window function that match the given indices from a sacc object, or a tuple of (None, None) if the indices represent the measured Cells directly. .. py:function:: make_all_photoz_bin_combinations(inferred_galaxy_zdists) Extract the two-point function metadata from a sacc file. .. py:function:: make_two_point_xy(inferred_galaxy_zdists_dict, tracer_names, data_type) Build a TwoPointXY object from the inferred galaxy z distributions. The TwoPointXY object is built from the inferred galaxy z distributions, the data type, and the tracer names. :param inferred_galaxy_zdists_dict: a dictionary of inferred galaxy z distributions. :param tracer_names: a tuple of tracer names. :param data_type: the data type. :returns: a TwoPointXY object. .. py:function:: measurements_from_index(index) Return the measurements from a TwoPointXiThetaIndex object.