Skip to content

Commit

Permalink
renamed "find_change_points_with_scipy" to "find_change_points" for m…
Browse files Browse the repository at this point in the history
…aintainability
  • Loading branch information
lrdossan committed Aug 27, 2024
1 parent ebecd49 commit 6707b40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion caimira/apps/calculator/co2_model_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def validate(self):
if not re.compile("^(2[0-3]|[01]?[0-9]):([0-5]?[0-9])$").match(time):
raise TypeError(f'Wrong time format - "HH:MM". Got "{time}".')

def find_change_points_with_scipy(self) -> list:
def find_change_points(self) -> list:
"""
Perform change point detection using scipy library (find_peaks method) with rolling average of data.
Incorporate existing state change candidates and adjust the result accordingly.
Expand Down
2 changes: 1 addition & 1 deletion caimira/apps/calculator/co2_report_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def build_initial_plot(
elif isinstance(CO2model.number, IntPiecewiseConstant):
occupancy_transition_times = list(CO2model.number.transition_times)

ventilation_transition_times: list = form.find_change_points_with_scipy()
ventilation_transition_times: list = form.find_change_points()
# The entire ventilation changes consider the initial and final occupancy state change
all_vent_transition_times: list = sorted(
[occupancy_transition_times[0]] +
Expand Down

0 comments on commit 6707b40

Please sign in to comment.