Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
6b0b653
extract method _parse_matched_data
jsmariegaard Aug 25, 2023
b4c94fc
towards allowing other inputs than xarray
jsmariegaard Aug 25, 2023
a78a17b
_matched_data_to_xarray and _parse_items
jsmariegaard Aug 26, 2023
d7e963a
pytest.fixture pt_df
jsmariegaard Aug 26, 2023
652bbd2
rename Comparer.from_compared_data to from_matched_data
jsmariegaard Aug 26, 2023
1307723
missing f string
jsmariegaard Aug 26, 2023
246998d
default name, type hints, more checks, allow non-xr-dataset input to …
jsmariegaard Aug 26, 2023
13fb2f3
test_matched_df_with_aux, test_matched_df, test_matched_df_int_items,…
jsmariegaard Aug 26, 2023
b4f7772
rename variable_name to quantity_name
jsmariegaard Aug 26, 2023
b63ff35
quantity setter
jsmariegaard Aug 26, 2023
fdbedff
let from_matched wrap Comparer.from_matched_data
jsmariegaard Aug 26, 2023
ad99275
remove unused import
jsmariegaard Aug 26, 2023
ca2ac6a
format with black
jsmariegaard Aug 26, 2023
7e0db67
remove unused
jsmariegaard Aug 26, 2023
0b75f8a
allow dfs0, mikeio.Dataset in from_matched
jsmariegaard Aug 26, 2023
efd0326
geometry undefined has no ndim
jsmariegaard Aug 26, 2023
718ce8b
Example with aux data
jsmariegaard Aug 26, 2023
69c4b47
Filter also raw_data if time
jsmariegaard Aug 26, 2023
c33dbb1
test_from_matched_dfs, test_from_matched_mikeio_dataset
jsmariegaard Aug 26, 2023
76a8b9d
Explicit aux_items not taken into account
ecomodeller Aug 28, 2023
c3f1b5c
Only include selected items
ecomodeller Aug 28, 2023
ca23c6b
data class instead of returning multiple values
ecomodeller Aug 28, 2023
7553cbc
Remove unused import
ecomodeller Aug 28, 2023
c21bd5e
Fix
ecomodeller Aug 28, 2023
0c2504b
No overlapping items
ecomodeller Aug 28, 2023
cd26cc3
allow from_matched to set name, x, y and z
jsmariegaard Aug 28, 2023
cda25ce
test_matched_data_name_xyz
jsmariegaard Aug 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions modelskill/comparison/_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def var_names(self) -> List[str]:
"""List of unique variable names"""
unique_names = []
for cmp in self.comparers.values():
n = cmp.variable_name
n = cmp.quantity_name
if n not in unique_names:
unique_names.append(n)
return unique_names
Expand Down Expand Up @@ -212,7 +212,7 @@ def to_dataframe(self) -> pd.DataFrame:
df["model"] = mod_name
df["observation"] = cmp.name
if self.n_variables > 1:
df["variable"] = cmp.variable_name
df["variable"] = cmp.quantity_name
df["x"] = cmp.x
df["y"] = cmp.y
df["obs_val"] = cmp.obs
Expand Down Expand Up @@ -323,7 +323,7 @@ def sel(
cc = ComparerCollection()
for cmp in self.comparers.values():
cmp: Comparer
if cmp.name in observation and cmp.variable_name in variable:
if cmp.name in observation and cmp.quantity_name in variable:
thismodel = [m for m in model if m in cmp.mod_names] if model else None
if (thismodel is not None) and (len(thismodel) == 0):
continue
Expand Down
Loading