Skip to content

Commit

Permalink
correct class check in plotter
Browse files Browse the repository at this point in the history
  • Loading branch information
zm711 authored Dec 4, 2023
1 parent 2d05598 commit e5584d9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/spikeanalysis/spike_plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from .plotbase import PlotterBase
from .spike_analysis import SpikeAnalysis
from .curated_spike_analysis import CuratedSpikeAnalysis
from .merged_spike_analysis import MergedSpikeAnalysis
from .merged_spike_analysis import MSA


_z_scores_code = ("get_raw_psths", "z_score_data")
Expand All @@ -19,7 +19,7 @@ class SpikePlotter(PlotterBase):
"""SpikePlotter is a plotting class which allows for plotting of PSTHs, z score heatmaps
in the future it will plot other values"""

def __init__(self, analysis: Optional[SpikeAnalysis | CuratedSpikeAnalysis | MergedSpikeAnalysis] = None, **kwargs):
def __init__(self, analysis: Optional[SpikeAnalysis | CuratedSpikeAnalysis | MSA] = None, **kwargs):
"""
SpikePlotter requires a SpikeAnalysis object, which can be set during init
or in the set_analysis function. Not including the SpikeAnalysis object
Expand Down Expand Up @@ -57,7 +57,7 @@ def __repr__(self):
final_methods = [method for method in methods if "plot" in method]
return f"The methods are {final_methods}"

def set_analysis(self, analysis: SpikeAnalysis | CuratedSpikeAnalysis | MergedSpikeAnalysis):
def set_analysis(self, analysis: SpikeAnalysis | CuratedSpikeAnalysis | MSA):
"""
Set the SpikeAnalysis object for plotting
Expand All @@ -68,7 +68,7 @@ def set_analysis(self, analysis: SpikeAnalysis | CuratedSpikeAnalysis | MergedSp
"""
assert isinstance(
analysis, (SpikeAnalysis, CuratedSpikeAnalysis, MergedSpikeAnalysis)
analysis, (SpikeAnalysis, CuratedSpikeAnalysis, MSA)
), "analysis must be a SpikeAnalysis dataset"
self.data = analysis

Expand Down

0 comments on commit e5584d9

Please sign in to comment.