glotaran / pyglotaran-examples

This repository hold examples showcasing the use of the pyglotaran package
MIT License
5 stars 7 forks source link

🚧🩹 Suffix ex_doas_beta CA clp_labels with megcomplex name (_artifact) #90

Closed s-weigand closed 1 year ago

s-weigand commented 1 year ago

To be compatible with the bugfix of coherent artifacts using the same clp_labels for all megacomplexes we need to change the (data used in) comparison results. Specifically, the (labels in) dataset ex_doas_beta/target_analysis/dataset1.nc need updating.

I used the following code to update the cpl_labels for the coherent artifact in the ex_doas_beta case study.

from glotaran.io import load_dataset, save_dataset

data_path = "ex_doas_beta/target_analysis/dataset1.nc"

data = load_dataset(data_path)

new_clps = []

for val in data.coords["clp_label"].values:
    if val.startswith("coherent_artifact"):
        val = f'{val}_artifact'
    new_clps.append(val)
new_clps

new_data = data.assign_coords(clp_label=new_clps)

save_dataset(new_data, data_path, allow_overwrite=True)

Change summary

s-weigand commented 1 year ago

I made this a draft PR because we should first merge #89 and make a 0.7.0 release for the examples.

s-weigand commented 1 year ago

Note: The pre-commit CI is failing because this branch has no config.

s-weigand commented 1 year ago

Added a dummy pre-commit config with a step that will always pass 😅