Conversation
fmskill/comparison.py
Outdated
| title : str, optional | ||
| title of the plot, by default "Taylor diagram" | ||
| class SingleObsComparer(BaseComparer): | ||
| def __init__(self, observation, modeldata=None): |
There was a problem hiding this comment.
Why is modeldata an optional argument? What am I supposed to compare if I dont have any modeldata?
fmskill/comparison.py
Outdated
| self._var_names = [observation.variable_name] | ||
| self._itemInfos = [observation.itemInfo] | ||
|
|
||
| if modeldata is not None: |
There was a problem hiding this comment.
Related to comment above, why should modeldata be None
fmskill/comparison.py
Outdated
| self._var_names = [observation.variable_name] | ||
| self._itemInfos = [observation.itemInfo] | ||
|
|
||
| if modeldata is not None: |
There was a problem hiding this comment.
Related to comment above, why should modeldata be None
|
I think it is time to re-evaluate this inheritance structure and check if it all relationships makes sense. ---
title: Comparers
---
classDiagram
BaseComparer <|-- SingleObsComparer
SingleObsComparer <|-- PointComparer
SingleObsComparer <|-- TrackComparer
BaseComparer <|-- ComparerCollection
class BaseComparer{
+skill()
+scatter()
+sel_df()
}
class SingleObsComparer{
+float x
+float y
+score()
+taylor()
+hist()
+remove_bias()
+copy()
}
class ComparerCollection{
+score()
+hist()
+mean_skill()
+mean_skill_points()
+taylor()
+copy()
+add_comparer()
}
class PointComparer{
+plot_timeseries()
}
class TrackComparer{
+float[] x
+float[] y
}
|
|
Agree - this is also what I am working towards: to have a simplified structure most likely with just two classes: SingleObsComparer and ComparerCollection with no inheritance structure. The first should have an xarray structure "data" that completely defines it. The second should be a dictionary-like structure that holds a number of these Comparers. |
e.g. rename .df to .data, remove BaseComparer. All preparation for introducing new external data structure in comparer