Skip to content

Commit

Permalink
gg
Browse files Browse the repository at this point in the history
  • Loading branch information
JaimeRZP committed Apr 17, 2024
1 parent 3cba6bd commit 3ab0a57
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions src/data_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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}()
Expand Down Expand Up @@ -119,4 +146,4 @@ function make_data(sacc_file, yaml_file; kwargs...)
end

return instructions, files
end
end

0 comments on commit 3ab0a57

Please sign in to comment.