Skip to content

Commit

Permalink
Fixed deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
iguinn committed Jan 2, 2024
1 parent fec8960 commit a00d959
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/dspeed/vis/waveform_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
import sys

import lgdo
from lgdo.lh5 import LH5Iterator
import matplotlib.pyplot as plt
import numpy as np
import pandas
import pint
from cycler import cycler
from lgdo import lh5
from matplotlib.lines import Line2D

from ..processing_chain import build_processing_chain
Expand All @@ -29,7 +29,7 @@ class WaveformBrowser:

def __init__(
self,
files_in: str | list[str] | lh5.LH5Iterator, # noqa: F821
files_in: str | list[str] | LH5Iterator, # noqa: F821
lh5_group: str | list[str] = "",
base_path: str = "",
entry_list: list[int] | list[list[int]] = None,
Expand Down Expand Up @@ -152,12 +152,12 @@ def __init__(
self.next_entry = 0

# data i/o initialization
if isinstance(files_in, lh5.LH5Iterator):
if isinstance(files_in, LH5Iterator):
self.lh5_it = files_in
else:
# HACK: do not read VOV "tracelist", cannot be handled correctly by LH5Iterator
# remove this hack once VOV support is properly implemented
self.lh5_it = lh5.LH5Iterator(
self.lh5_it = LH5Iterator(
files_in,
lh5_group,
base_path=base_path,
Expand Down Expand Up @@ -418,9 +418,9 @@ def find_entry(
self._update_auto_limit(x, y)

elif isinstance(
data, (lh5.Array, lh5.ArrayOfEqualSizedArrays, lh5.VectorOfVectors)
data, (lgdo.Array, lgdo.ArrayOfEqualSizedArrays, lgdo.VectorOfVectors)
):
if isinstance(data, lh5.Array):
if isinstance(data, lgdo.Array):
vals = [data.nda[i_tb]]
else:
vals = data[i_tb]
Expand Down

0 comments on commit a00d959

Please sign in to comment.