AllenInstitute / AllenSDK

code for reading and processing Allen Institute for Brain Science data
https://allensdk.readthedocs.io/en/latest/
Other
333 stars 149 forks source link

Ticket/2594/dev #2609

Closed mikejhuang closed 1 year ago

mikejhuang commented 1 year ago

This PR address three issues

  1. _build_stimulus_presentations method has pandas operations that trigger errors.
  2. stimulus_presentations['spatial_frequency'] contains numeric values of mixed str and float types, along with str(list)
  3. Replace instance of local_index to probe_channel_number as reported in ticket #2573
mikejhuang commented 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.

morriscb commented 1 year ago

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.

review-notebook-app[bot] commented 1 year ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

mikejhuang commented 1 year ago

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.

ZeroAda commented 7 months ago

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.pyto 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