Skip to content

Commit

Permalink
old dsp format
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhrisca committed Oct 8, 2023
1 parent a0483ca commit e9d5dc5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/asammdf/blocks/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2123,15 +2123,21 @@ def parse_channels(display, conversions):
elif elem.tag == "CHANNEL_PATTERN":
try:
filter_type = elem.get("filter_type")
if filter_type == "None":
if filter_type in ("None", None):
filter_type = "Unspecified"
filter_value = 0
raw = False
else:
filter_value = float(elem.get("filter_value"))
raw = bool(int(elem.get("filter_use_raw")))

info = {
"pattern": elem.get("name_pattern"),
"name": elem.get("name_pattern"),
"match_type": "Wildcard",
"filter_type": filter_type,
"filter_value": float(elem.get("filter_value")),
"raw": bool(int(elem.get("filter_use_raw"))),
"filter_value": filter_value,
"raw": raw,
}

multi_color = elem.find("MULTI_COLOR")
Expand Down
1 change: 1 addition & 0 deletions src/asammdf/gui/widgets/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -5430,6 +5430,7 @@ def range_modified_handler(self, region):
def scale_curve_to_pixmap(self, x, y, y_range, x_start, delta):
if self.py:
y_low, y_high = y_range

y_scale = (np.float64(y_high) - np.float64(y_low)) / np.float64(self.py)
x_scale = self.px

Expand Down

0 comments on commit e9d5dc5

Please sign in to comment.