Skip to content
Snippets Groups Projects
Commit b0722597 authored by Lan Dam's avatar Lan Dam
Browse files

modify docstring, type hint

parent 1e0eeb08
No related branches found
No related tags found
1 merge request!165Fix SOH info not show for bottom of Jerk/DPS and display all info lines for the case data point clicked matches more than one SOH lines.
from typing import List, Optional
from typing import Dict, Optional
import numpy as np
def get_index_from_data_picked(
chan_data: List[np.ndarray], tm: float, val: float) -> Optional[int]:
chan_data: Dict, tm: float, val: float) -> np.ndarray:
"""
Get index of data picked
:param chan_data: dict of data to plot that includes 'times', 'data' key
:param tm: epoch time of a clicked point
:param val: data value of a clicked point
:return section_idx: index of tm inside np.ndarray found
:return real_indexes: list index of data point inside np.ndarray found
"""
if chan_data['chan_db_info']['plotType'] == 'upDownDots':
# actual plotting has value -0.5 or 0.5;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment