Skip to content

Commit

Permalink
Adjust echem subsampling
Browse files Browse the repository at this point in the history
  • Loading branch information
ml-evs committed Aug 1, 2023
1 parent c201ac2 commit 96fc528
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pydatalab/pydatalab/blocks/echem_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,9 @@ def plot_cycle(self):
use_normalized_capacity=bool(characteristic_mass_g),
)

# Reduce df size to 100 points per cycle by default
df = reduce_echem_cycle_sampling(df, num_samples=100)
# Reduce df size to 100 points per cycle by default if there are more than a 100k points
if len(df) > 1e5:
df = reduce_echem_cycle_sampling(df, num_samples=100)

layout = bokeh_plots.double_axes_echem_plot(
df, cycle_summary=cycle_summary_df, mode=mode, normalized=bool(characteristic_mass_g)
Expand Down

0 comments on commit 96fc528

Please sign in to comment.