-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error while running extract_data #127
Comments
Hi Jay, For the first issue could you run the following code and paste the output here import numpy as np
from pathlib import Path
out_path = Path('') # This should be the same out_path used above in the extraction
attributes = ['clusters', 'amps', 'times', 'depths']
for att in attributes:
data = np.load(out_path.joinpath(f'spikes.{att}.npy'))
print(f'spikes.{att}: {data.shape}, {np.nanmin(data)}, {np.nanmin(data)}')
data = np.load(out_path.joinpath('clusters.channels.npy'))
print(f'clusters.channels: {data.shape}') For the second issue can you expand on how you got your xyz_picks.json. Did you make sure to transform it to the IBL coordinates? |
for the second issue, I obtained probe_ccf.npy from AP_histology % Pick filename
filename = uiputfile('*.npy');
% Write probe_ccf coordinates as NPY file
writeNPY(probe_ccf.trajectory_coords,filename) import numpy as np
from pathlib import Path
import json
from ibllib.atlas import AllenAtlas
atlas = AllenAtlas(25)
brainreg_path = Path(r'C:\Neuropixels_sorting_folder\JL101_20240914_g0\JL101_1_processed\probe_ccf.npy')
xyz_apdvml = np.load(brainreg_path)
xyz_mlapdv = atlas.ccf2xyz(xyz_apdvml, ccf_order='apdvml') * 1e6
xyz_picks = {'xyz_picks': xyz_mlapdv.tolist()}
output_path = Path(r'C:\Neuropixels_sorting_folder\JL101_20240914_g0\alf')
with open(Path(output_path, 'xyz_picks.json'), "w") as f:
json.dump(xyz_picks, f, indent=2)` |
Hi, Thanks for the response. Is there any chance you could share your ks output and also the proce_ccf.npy file that you have. On dropbox or gdrive? I can then take a look. Many thanks! |
Thanks for your help! |
Yes, this is the coordinates!! Thanks for your help, and will give this a try now |
I fixed it by changing the _phy_spikes_subset.waveforms.npy to _phy_spikes_subset_waveforms.npy For some reason, python didn't like the double dot notation. |
I encountered this error while running extract_data:
I was wondering if this is a problem???
Best,
Jay
The text was updated successfully, but these errors were encountered: