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

RHD2000, 128ch-amp #16

Open
kota-toku opened this issue Jan 16, 2019 · 4 comments
Open

RHD2000, 128ch-amp #16

kota-toku opened this issue Jan 16, 2019 · 4 comments

Comments

@kota-toku
Copy link

Thank you for developing this kind of online sorting system.
I'm setting it up under macOS Mojave and Julia(ver 0.6.4).
Is this software available for "RHD2000 128ch-amplifier board" ?
I had a following error.


julia> Intan_GUI("Desktop/JL/file.jl")
ERROR: LoadError: UndefVarError: RHD2000 not defined
Stacktrace:
[1] include_from_node1(::String) at ./loading.jl:576
[2] include(::String) at ./sysimg.jl:14
[3] Intan_GUI(::String) at /Users/Kota/.julia/v0.6/Intan/src/rhd2000evalboard.jl:1593

"file.jl"
myamp=RHD2000("PortA1")
myfpga=FPGA(1,myamp)
mt=Task_NoTask()
mys=SaveNone()
(myrhd,sss,fpgas)=makeRHD([myfpga],sav=mys)
handles=makegui(myrhd,sss,mt,fpgas)

I think there are functions for loading RHD2116 or 2132, but not for RHD2000(128ch).
Do you have any solutions??

@paulmthompson
Copy link
Owner

I haven't used the 128 channel board, but I believe the 128 channel board behaves the same as if two RHD2164 boards were connected to the same port with the dual headstage adapter.

If that is true, the code below should work. Could you try saving the code below in a file named "start_gui.jl"

using Intan, SpikeSorting, Gtk.ShortNames, Cairo

myt=Task_NoTask() 
myamps=[RHD2164("PortA1"); RHD2164("PortA2")] #An array of the amplifiers you will use
myfpga=FPGA(1,myamps) 
myparams=Algorithm[DetectNeg(),ClusterTemplate(49),AlignProm(),FeatureTime(),ReductionNone(),ThresholdMeanN()]; #I am exposing the spike sorting parameters here.
(myrhd,ss,myfpgas)=makeRHD([myfpga],params=myparams);

handles = makegui(myrhd,ss,myt,myfpgas);

#This code is needed to keep the GUI open. 
if !isinteractive()
    c = Condition()
    signal_connect(handles.win, :destroy) do widget
        notify(c)
    end
    wait(c)
end

Then call this script in your terminal with the command

julia /path/to/start_gui.jl

Could you let me know what happens if you use that?

I don't think I have ever used this package on a mac. The Intan libraries are mac-compatible, so I see no reason why it shouldn't work, but it is untested...

While I use this package everyday, I think I'm probably the only person who uses it, so I am sure there are lots of bugs lurking. I'm happy to help but be aware it might take some time to get fully operational for your purposes.

@kota-toku
Copy link
Author

kota-toku commented Jan 18, 2019

Thank you for your help.
I did it, but I had 2 errors when I was clicking on the "Init" button in the GUI.
The error message is below.

julia> using Intan
julia> Intan_GUI("Desktop/JL/start_gui.jl")
julia> FATAL ERROR: Gtk state corrupted by error thrown in a callback:
ERROR: could not load library "/Users/Kota/.julia/v0.6/Intan/src/../lib/libokFrontPanel_0118.so"
dlopen(/Users/Kota/.julia/v0.6/Intan/src/../lib/libokFrontPanel_0118.so.dylib, 2): image not found

Stacktrace:
[1] dlopen(::String, ::UInt32) at ./libdl.jl:97
[2] open_board(::Intan.FPGA) at /Users/Kota/.julia/v0.6/Intan/src/rhd2000evalboard.jl:162
[3] _collect(::Array{Intan.FPGA,1}, ::Base.Generator{Array{Intan.FPGA,1},Intan.#open_board},::Base.EltypeUnknown, ::Base.HasShape) at ./array.jl:483
[4] init_board!(::Intan.RHD_Single,::Array{Intan.FPGA,1})at/Users/Kota/.julia/v0.6/Intan/src/rhd2000evalboard.jl:70
[5] init_cb(::Ptr{Gtk.GLib.GObject},::Tuple{Intan.Gui_Handles,Intan.RHD_Single,Intan.Task_NoTask,Array{Intan.FPGA,1}}) at /Users/Kota/.julia/v0.6/Intan/src/gui.jl:1313
[6] (::Gtk.##233#234)() at /Users/Kota/.julia/v0.6/Gtk/src/events.jl:2
[7] g_sigatom(::Any) at /Users/Kota/.julia/v0.6/Gtk/src/GLib/signals.jl:167
[8] gtk_main() at /Users/Kota/.julia/v0.6/Gtk/src/events.jl:1

ERROR (unhandled task failure): could not load library"/Users/Kota/.julia/v0.6/Intan/src/../lib/libokFrontPanel_0118.so"
dlopen(/Users/Kota/.julia/v0.6/Intan/src/../lib/libokFrontPanel_0118.so.dylib, 2): image not found

Stacktrace:
[1] dlopen(::String, ::UInt32) at ./libdl.jl:97
[2] open_board(::Intan.FPGA) at /Users/Kota/.julia/v0.6/Intan/src/rhd2000evalboard.jl:162
[3] _collect(::Array{Intan.FPGA,1}, ::Base.Generator{Array{Intan.FPGA,1},Intan.#open_board},::Base.EltypeUnknown, ::Base.HasShape) at ./array.jl:483
[4] init_board!(::Intan.RHD_Single, ::Array{Intan.FPGA,1}) at/Users/Kota/.julia/v0.6/Intan/src/rhd2000evalboard.jl:70
[5] init_cb(::Ptr{Gtk.GLib.GObject},::Tuple{Intan.Gui_Handles,Intan.RHD_Single,Intan.Task_NoTask,Array{Intan.FPGA,1}}) at /Users/Kota/.julia/v0.6/Intan/src/gui.jl:1313
[6] (::Gtk.##233#234)() at /Users/Kota/.julia/v0.6/Gtk/src/events.jl:2
[7] g_sigatom(::Any) at /Users/Kota/.julia/v0.6/Gtk/src/GLib/signals.jl:167
[8] gtk_main() at /Users/Kota/.julia/v0.6/Gtk/src/events.jl:1

@paulmthompson
Copy link
Owner

paulmthompson commented Jan 18, 2019

Okay thank you. It looks like the package is trying to load the linux Intan library on both mac and linux, rather than using the mac specific library from intan. Let me incorporate that into the package and add some OSX specific testing to make sure it works. I can comment here once that is done.

@paulmthompson
Copy link
Owner

Sorry for the delay. I think this should work now with Macs. Can you try that run script again?

Which acquisition board are you using? It should work as is with the green evaluation board, but we will have to change a few flags in the run script if you are using Open Ephys or the 512 channel version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants