Skip to content

Commit

Permalink
parameterize opto_tagging
Browse files Browse the repository at this point in the history
  • Loading branch information
corbennett committed May 7, 2024
1 parent 03f2d6a commit 1ea3815
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions src/np_workflows/shared/base_experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,15 +610,27 @@ def get_latest_optogui_txt(self, opto_or_optotagging: Literal['opto', 'optotaggi


@property
def optotagging_params(self) -> dict[str, str]:
def optotagging_params(self):
"""For sending to runTask.py"""
return dict(
if hasattr(self, '_optotagging_params'):
return self._optotagging_params

else:
#set to defaults through setter
self.optotagging_params = {}
return self._optotagging_params

@optotagging_params.setter
def optotagging_params(self, paramsdict):

self._optotagging_params = dict(
rigName = str(self.rig).replace('.',''),
subjectName = str(self.mouse),
taskScript = 'OptoTagging.py',
optoTaggingLocs = self.get_latest_optogui_txt('optotagging').as_posix(),
)

)
self._optotagging_params.update(paramsdict)

@property
def opto_params(self) -> dict[str, str | bool]:
"""Opto params are handled by runTask.py and don't need to be passed from
Expand Down

0 comments on commit 1ea3815

Please sign in to comment.