From 3ab0a57b4c3b9992bcdaee35c2f6fbbf11c71cae Mon Sep 17 00:00:00 2001 From: jaimerzp Date: Wed, 17 Apr 2024 09:51:53 +0100 Subject: [PATCH] gg --- src/data_utils.jl | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/src/data_utils.jl b/src/data_utils.jl index 9dce28d..8b9b69f 100644 --- a/src/data_utils.jl +++ b/src/data_utils.jl @@ -49,6 +49,33 @@ function _apply_scale_cuts(s, yaml_file) return s end + +""" + make_data(sacc_file, yaml_file) + +Process `sacc` and `yaml` files into a `Meta` structure \ +containing the instructions of how to compose the theory \ +vector and a `npz` file with the neccesary redshift distributions \ +of the tracers involved. + +Arguments: +- `sacc_file` : sacc file +- `yaml_file` : yaml_file + +Returns: +``` +struct Instructions + names : names of tracers. + pairs : pairs of tracers to compute angular spectra for. + types : types of the tracers. + idx : positions of cls in theory vector. + data : data vector. + cov : covariance of the data. + inv_cov : inverse covariance of the data. +end +``` +-files: npz file +""" function make_data(sacc_file, yaml_file; kwargs...) kwargs=Dict(kwargs) @@ -88,7 +115,7 @@ function make_data(sacc_file, yaml_file; kwargs...) # build struct instructions = Instructions(names, pairs, types, idx, - cls, cov, inv_cov) + cls, cov, inv_cov) # Initialize files = Dict{String}{Vector}() @@ -119,4 +146,4 @@ function make_data(sacc_file, yaml_file; kwargs...) end return instructions, files -end \ No newline at end of file +end \ No newline at end of file