Skip to content
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 in probe info #30

Closed
mwawra opened this issue Nov 23, 2022 · 6 comments
Closed

Error in probe info #30

mwawra opened this issue Nov 23, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@mwawra
Copy link
Contributor

mwawra commented Nov 23, 2022

Sorry, but I have found another problem. When I want to view the probe info of a probe with at least 2 pieces on different atlas-overlays I get the following error:

something went wrong, 
Traceback (most recent call last):
  File "C:\Users\Matthias\Documents\Neurophys-INSERM\herbs_git\herbs\object_control.py", line 930, in info_btn_clicked
    self.obj_info_on_click()
  File "C:\Users\Matthias\Documents\Neurophys-INSERM\herbs_git\herbs\object_control.py", line 940, in obj_info_on_click
    self.info_window = ProbeInfoWindow(da_name, da_data)
  File "C:\Users\Matthias\Documents\Neurophys-INSERM\herbs_git\herbs\object_control.py", line 425, in __init__
    sites_u_color.append(group_region_color[temp[0]])
IndexError: index 0 is out of bounds for axis 0 with size 0

I'm quite sure that this worked in the old pip version. Unfortunately, I can't test this specific project there due to incompatibilities between the versions in pip and on github.

@JingyiGF
Copy link
Owner

Thanks for finding this. Before there were only NP 1.0 and NP 2.0 in HERBS, the plotting in the info window was only count for the sites. The sites for NP 1.0 and 2.0 are so close to each other, so I just use the sites label to draw the probe. But this is not the case if the sites are so far from each other (there is a request for other linear silicon probes). So to make the code generic for both cases, a fine grids for labels along the probe is created to plot probe and sites labels for plot sites. If the grids are not fine enough, there might be problem that the probe labels could not cover all sites labels. That is the error reported. Now the code updated on GitHub. did not test for all possible cases. Need to work on this.

@mwawra
Copy link
Contributor Author

mwawra commented Dec 6, 2022

Hey, coming back to this. With the latest version on git I don't get this error anymore, but somehow the anatomical regions are odd. I have one data set where the probe has two pieces. With the old version (pip) of the program the tip of the probe is in the ventral hippocampus, but with the latest version from git HERBS tells me some part of the tip is in the corpus callosum, which makes no sense. When I unmerge the two pieces and make two probes out of them the regions are much more correct.

@JingyiGF
Copy link
Owner

JingyiGF commented Dec 6, 2022

Hi, I found the new code for calculating the probe info has some problem also, and I am trying to fix it now, but very slow. I am still one week ok, one week sick. It is a ridiculous time of the year for families who has small kids. My kiddo get sick every other week and so do I. Sorry for the inconvenience, will fix it this week.

@mwawra
Copy link
Contributor Author

mwawra commented Dec 8, 2022

Hi, don't worry, kids are definitely a higher priority! :)

@JingyiGF JingyiGF added the bug Something isn't working label Dec 19, 2022
@JingyiGF
Copy link
Owner

Hi Matthias, I finallllllly fixed the bugs and uploaded the code to GitHub and PyPI. Let me know if there is anything wrong or not clear. Or any idea to change anything. you are always welcome to modify anything.

Thank you so much for all your help in 2022. Wish you a happy holiday season and see you in 2023!

@mwawra
Copy link
Contributor Author

mwawra commented Dec 23, 2022

Hello, thanks for the fix. Now the assignment of the anatomical regions is much better.

Thank you for the nice support and see you in 2023! Happy holidays!

@mwawra mwawra closed this as completed Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants