Closed mikejhuang closed 1 year ago
One other issue is making sure that the data that is currently released and accessed via the ecephys_session objects can still be loaded from it's NWBs.
Does the ephys_session notebook do this? It currently runs through the notebook.
Does the ephys_session notebook do this? It currently runs through the notebook.
You'll have to check. As I said during sprint planning, you're about the first of the current Pika's to look at this code. My guess is yes, but it wouldn't hurt to double check.
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
You'll have to check. As I said during sprint planning, you're about the first of the current Pika's to look at this code. My guess is yes, but it wouldn't hurt to double check.
I believe it does do it. I committed the re-ran notebook. You can see the comparison here: 2020 pre-release run current PR re-run
The table values are now either floating point or tuples instead of string. Cell 17 is a good overview in the differences.
The re-run is oddly cut off at cell 36 in this preview. It isn't cut off when I view it locally. Seems like it's something to do with the animation.jhtml.
just to follow up the first issue: _build_stimulus_presentations
method has pandas operations that trigger errors. I change the lines # stimulus_presentations.replace("", nonapplicable, inplace=True)
in ecephys_session.py
to the following:
bool_columns = stimulus_presentations.select_dtypes(include=['bool']).columns stimulus_presentations[bool_columns] = stimulus_presentations[bool_columns].astype('object') stimulus_presentations[bool_columns] = stimulus_presentations[bool_columns].fillna(nonapplicable)
and it works
This PR address three issues
_build_stimulus_presentations
method has pandas operations that trigger errors.stimulus_presentations.fillna
triggering an error when replacing pd.NA values with a string in a boolean type column (opacity).stimulus_presentations['spatial_frequency']
contains numeric values of mixed str and float types, along with str(list)['0.08', '[0.0, 0.0]', '0.04', 0.08, 0.04, 0.32, 0.02, 0.16]
['0.02' '0.04' '0.08' '0.16' '0.32' '[0.0, 0.0]']
local_index
toprobe_channel_number
as reported in ticket #2573