Skip to content

Commit

Permalink
Fixed timeseries bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamsTravis committed Oct 29, 2024
1 parent bc9dc2d commit e70af92
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions reView/pages/rev/controller/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ def dropdown_composite_scenarios(
filters,
filter_ids,
_
):
):
"""Update the options given a project."""
logger.debug("URL: %s", url)
config = Config(project)
Expand Down Expand Up @@ -674,7 +674,7 @@ def dropdown_scenarios(
__,
filter_ids,
___,
):
):
"""Update the scenario options given a project."""
# Find all available project files
config = Config(project)
Expand Down Expand Up @@ -1168,7 +1168,7 @@ def figure_timeseries(
map_selection,
map_click,
project
):
):
"""Render timeseries plots if possible."""
# read in signal
signal_dict = json.loads(signal)
Expand Down Expand Up @@ -1220,7 +1220,7 @@ def figure_timeseries(
datasets=datasets,
plot_title=title,
point_size=10,
user_scale=(0, 1),
user_scale=(0, 1), # this assumes cf
alpha=1,
)

Expand Down
1 change: 1 addition & 0 deletions reView/pages/rev/controller/element_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,7 @@ def _plot_range(self, var):
ymax = max([df[var].max() for df in self.datasets.values()])
if ymax and not ymin:
ymin = min([df[var].min() for df in self.datasets.values()])

return [ymin, ymax]

def _update_fig_layout(self, fig, y_var=None):
Expand Down
2 changes: 1 addition & 1 deletion reView/utils/readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ def read_timeseries(file, project, gids=None, nsteps=None,
nsteps = ds["time_index"].shape[0]

# Find site indices
if gids is not None:
if gids:
meta = meta[meta["sc_point_gid"].isin(gids)]
idx = list(meta.index)

Expand Down

0 comments on commit e70af92

Please sign in to comment.