Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/csg_filling' into csg_filling
Browse files Browse the repository at this point in the history
  • Loading branch information
JGuetschow committed Nov 28, 2024
2 parents 87d0746 + 19f69fe commit c17de4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/source/usage/csg.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,15 @@ lower-priority timeseries was used to fill the holes.
The {py:func}`primap2.csg.compose` function creates a composite time series according to
the given priorities and strategies, but it does not take care of pre- and postprocessing
of the data. It will carry along unnecessary data and the resulting dataset will miss the
priority coordinates. The {py:func}`primap2.csg.create_composite_source` function takes acre
priority coordinates. The {py:func}`primap2.csg.create_composite_source` function takes care
of these steps and prepares the input data and completes the output data to a primap2 dataset
with all desired dimensions and metadata.

The function takes the same inputs as {py:func}`primap2.csg.compose` with additional input to
define pre- and postprocessing:

* **result_prio_coords** Defines the vales for the priority coordinates in the output dataset. As the
priority coordinates differ for all input sources there is no canonical vale
priority coordinates differ for all input sources there is no canonical value
for the result and it has to be explicitly defined
* **metadata** Set metadata values such as title and references

Expand Down
5 changes: 1 addition & 4 deletions primap2/csg/_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ def set_priority_coords(
"""
for dim in dims.keys():
if "terminology" in dims[dim].keys():
terminology = dims[dim]["terminology"]
else:
terminology = None
terminology = dims[dim].get("terminology", None)
ds = ds.pr.expand_dims(dim=dim, coord_value=dims[dim]["value"], terminology=terminology)

return ds
Expand Down

0 comments on commit c17de4c

Please sign in to comment.