catalystneuro / mease-lab-to-nwb

MIT License
3 stars 2 forks source link

'starting_time' type error for saving LFP objects #43

Closed ross-folkard closed 2 years ago

ross-folkard commented 3 years ago

Hi @luiztauffer I'm trying to save the raw traces from each channel in my probe (I downsampled and low-pass filtered at 300Hz) but it seems like it might be using the local memory again to save, is this the case? image image

I also have this issue with the 'starting _time' image

luiztauffer commented 3 years ago

hi @rf13734 just to check, are you using the recent code from the open PR ? can you please also check if you're using the current master branch version of nwb-conversion-tools?

ross-folkard commented 3 years ago

Hi @luiztauffer. Sorry for not replying to this sooner, been quite a hectic few weeks!

I think I'm up to date with the fixes #38 and the nwb-conversion tools, I'm now getting this error when I try to import spikeextractors: ModuleNotFoundError: No module named 'neo'. Have I done something wrong maybe?

image

ross-folkard commented 3 years ago

image image image

Hope this is all correct!

alejoe91 commented 3 years ago

@rf13734 can you pip install neo?

alejoe91 commented 3 years ago

Actually you have to install neo from master too..

ross-folkard commented 3 years ago

@alejoe91 Like this? image

I still get the error

image

ross-folkard commented 3 years ago

image Should I be on 'fixes' branch or main?

luiztauffer commented 3 years ago

@rf13734 you should be on fixes branch of this repo here. for NEO I believe you should be on main branch, please try the following:

pip uninstall neo
pip install git+https://github.com/NeuralEnsemble/python-neo.git
ross-folkard commented 3 years ago

Cool! I did this @luiztauffer, and it fixed the issue I was having up top.

image

However, I'm still getting this error about the starting time being int64 rather than float. image

Might this be because I'm loading in a bin file rather than smrx?

luiztauffer commented 3 years ago

@rf13734 please update nwb-conversion-tools and let us know if this was fixed:

pip install -U nwb-conversion-tools
ross-folkard commented 3 years ago

@luiztauffer Is this right?

image

image

It now asks me to install this opencv-pyhton, which I did image

image

but I still get the error.

image

ross-folkard commented 3 years ago

This also occurs in the same error message image

luiztauffer commented 3 years ago

@rf13734 ok, I believe opencv this shouldn't be required for your converter, I'll check with the dev team so we can remove this requirement, thanks for finding that out!

ross-folkard commented 3 years ago

@luiztauffer Okay thanks!

CodyCBakerPhD commented 3 years ago

@rf13734 @luiztauffer Sorry you ran into this problem - please try installing nwb-conversion-tools from master branch similar to how you did neo earlier.

pip install git+https://github.com/CatalystNeuro/nwb-conversion-tools.git

ross-folkard commented 3 years ago

Thanks for taking a look at it @CodyCBakerPhD @luiztauffer . It fixed the OpenCV issue. I'm still struggling to save the LFPs though, with the same error.

image

image image image image

image

CodyCBakerPhD commented 3 years ago

@rf13734 So sorry about these issues; the API has changed a lot in the past 6 months. It looks like we had originally developed and debugged these tools under nwb-conversion-tools v0.6.3. If you're willing, try

pip install nwb-conversion-tools==0.6.3

and see if that resolves the non-import issues you're observing. It should in theory work unless the repo uses newer features (@luiztauffer are they using any newer features developed since then?)

ross-folkard commented 3 years ago

@CodyCBakerPhD @luiztauffer

image

When I install 0.6.3 I get an different error with the imports image

CodyCBakerPhD commented 3 years ago

Ah, so the current CEDNWBConverter indeed uses the newer version of the API. Ignore the bit about v0.6.3, then.

@alejoe91 In your opinion, should we fix this on spikeextractors so that sampling frequencies always return floats, or on nwb-conversion-tools and just hard cast them before electrical series write?

alejoe91 commented 3 years ago

@CodyCBakerPhD doesn't hurt to hard cast in the conversion tools ;)

CodyCBakerPhD commented 3 years ago

The starting_time issue has now been fixed and merged to master; please try again

pip install git+https://github.com/CatalystNeuro/nwb-conversion-tools.git

ross-folkard commented 3 years ago

@CodyCBakerPhD

Thanks very much! Looks to have worked.

image

image