Skip to content

Commit

Permalink
Merge pull request #908 from flatironinstitute/MWB_fixes
Browse files Browse the repository at this point in the history
bug fixes for NWB demo, and pin pynwb momentarily
  • Loading branch information
pgunn authored Aug 25, 2021
2 parents db3367f + 62a6817 commit a34f945
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
8 changes: 4 additions & 4 deletions caiman/source_extraction/cnmf/estimates.py
Original file line number Diff line number Diff line change
Expand Up @@ -1638,9 +1638,9 @@ def save_NWB(self,
ps.add_column('snr', 'signal to noise ratio')
ps.add_column('accepted', 'in accepted list')
ps.add_column('rejected', 'in rejected list')
if self.cnn_preds:
if self.cnn_preds is not None:
ps.add_column('cnn', 'description of CNN')
if self.idx_components:
if self.idx_components is not None:
ps.add_column('keep', 'in idx_components')

# Add ROIs
Expand All @@ -1651,9 +1651,9 @@ def save_NWB(self,
add_roi_kwargs.update(accepted=i in self.accepted_list)
if hasattr(self, 'rejected_list'):
add_roi_kwargs.update(rejected=i in self.rejected_list)
if self.cnn_preds:
if self.cnn_preds is not None:
add_roi_kwargs.update(cnn=self.cnn_preds[i])
if self.idx_components:
if self.idx_components is not None:
add_roi_kwargs.update(keep=i in self.idx_components)

ps.add_roi(**add_roi_kwargs)
Expand Down
5 changes: 2 additions & 3 deletions demos/general/demo_pipeline_NWB.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ def main():
session_id='Session 1',
var_name_hdf5='TwoPhotonSeries')
#%% First setup some parameters for data and motion correction


# motion correction parameters
dxy = (2., 2.) # spatial resolution in x and y in (um per pixel)
# note the lower than usual spatial resolution here
Expand Down Expand Up @@ -109,7 +107,8 @@ def main():
'overlaps': overlaps,
'max_deviation_rigid': max_deviation_rigid,
'border_nan': 'copy',
'var_name_hdf5': 'acquisition/TwoPhotonSeries'
#'var_name_hdf5': 'acquisition/TwoPhotonSeries'
'var_name_hdf5': 'TwoPhotonSeries'
}

opts = params.CNMFParams(params_dict=mc_dict)
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies:
- peakutils
- pims
- psutil
- pynwb
- pynwb==1.4.0
- pyqtgraph
- scikit-image
- scikit-learn
Expand Down

0 comments on commit a34f945

Please sign in to comment.