de-bivort-lab / margo Goto Github PK
View Code? Open in Web Editor NEWHigh-throughput real-time tracker for delivery of stimuli and measurement of animal behavior.
License: MIT License
High-throughput real-time tracker for delivery of stimuli and measurement of animal behavior.
License: MIT License
de Bivort lab projector rig 1, MATLAB R2023a, latest version of margo
We set up a ymaze experiment and input the following labels:
Strain | Sex | Treatment | ROI start | ROI End | ID Start | ID End | Day # | Box # | Tray # | Comments |
---|---|---|---|---|---|---|---|---|---|---|
s1 | f | t1 | 11 | 40 | 1 | 30 | 1 | 1 | 10 | |
s1 | m | t1 | 47 | 51 | 31 | 35 | 1 | 1 | 10 |
This resulted in the following "Error encountered - tracking stopped" popup:
Undefined function 'isnan' for input arguments of type 'cell'.
Error in autoInitialize (line 119)
if ~isnan(expmt.meta.labels_table{1,i})
Error in run_ymaze (line 36)
[trackDat,expmt] = autoInitialize(trackDat,expmt,gui_handles);
Error in margo>run_pushbutton_Callback (line 770)
expmt = feval(handlesexperiments(exp_idx).run, expmt, handles);
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in margo (line 48)
gui_mainfcn(gui_State, varargin{:});
Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)margo('run_pushbutton_Callback',hObject,eventdata,guidata(hObject))
The error in the MATLAB command window:
Incorrect number or types of inputs or outputs for function 'isnan'.
Error in autoInitialize (line 119)
if ~isnan(expmt.meta.labels_table{1,i})
Error in run_ymaze (line 36)
[trackDat,expmt] = autoInitialize(trackDat,expmt,gui_handles);
Error in margo>run_pushbutton_Callback (line 770)
expmt = feval(handles.experiments(exp_idx).run, expmt, handles);
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in margo (line 48)
gui_mainfcn(gui_State, varargin{:});
Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)margo('run_pushbutton_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.
When putting in the following ROI sets in the labels, there was no issue starting up tracking:
Strain | Sex | Treatment | ROI start | ROI End | ID Start | ID End | Day # | Box # | Tray # | Comments |
---|---|---|---|---|---|---|---|---|---|---|
s1 | f | t1 | 11 | 40 | 1 | 30 | 1 | 1 | 10 | |
s1 | m | t1 | 1 | 10 | 31 | 40 | 1 | 1 | 10 |
I am not a MATLAB expert, and am trying to advise colleagues as to whether this is possible and seek your insights and corrections to my understanding of the issues in making a standalone MATLAB executable from Margo.
To answer this, we will need to refer in part to The following table shows the MATLAB toolboxes that you can use with MATLAB Compiler and describes which functionality can and cannot be compiled where we learn that, for the most part, only command line functionality of the toolboxes can be compiled into standalones (notably NOT UIs and Apps but also other aspects of selected toolboxes). Does Margo transgress any of these limitations (e.g. does it use UIs/Apps from the required toolboxes)? I further expect that your preprint's observation that "Software for control of all custom electronic hardware was written in C using Arduino libraries" will bear on what is possible in this regard. Do you agree? Finally, we only have an old compiler license - do you agree this will limit us (especially given the answer to this question: Is it possible the use of a MCR version different from the utilized version of Matlab Compiler? ).
Thanks for your consideration.
Blob size/ target rate controls did not properly enable following ROI detection after loading parameters from profile.
plotTraces
function scales the traces to the min/max of the traces rather than the ROI itself. This can create poorly scaled plots for animals with little activity. Recommend scaling to ROI and adding background image of ROI to place traces in their context within the image.
Had an issue, but it turned out to be the tracking settings in the options that changed.
Raw data fields are not attaching on loading into the MATLAB workspace and do not prompt any warning or error.
Failed to clear the Display none
gui axes notification after ending an experiment early with the delete function.
When pressing experiment parameters for larval sleep deprivation
No appropriate method, property, or field 'Position' for class 'matlab.graphics.GraphicsPlaceholder'.
Error in sleepdeprivation_parameter_sub_gui>slowphototaxis_parameter_gui_OpeningFcn (line 102)
handles.figure1.Position(1) = gui_fig.Position(1) + ...
When pressing "initialize tracking" dialogue box opens up often when running Margo across different computers. Dialogue may not always occur, and then the experiment can proceed. Matlab "red" code related to this issue is attached
margo_error.txt
Reason is filepath is unset.
COM object has no field "status" after device is disconnected. Re-check that devices exist before initialization.
I have been encountering a weird error with the newest MARGO version when trying to read in .raw files. Specifically, the error occurs when trying to assign an already attached .raw(). There is an orange notice referring to a path mismatch/repair when loading in the expmt.mat. When manually attaching the object, the raw mat shape does change to reflect the underlying structure (i.e., frames on one axis) but it still errors out when trying to assign/access the .raw().
Previously, we had been using Margo without any issues.
Recently however, when we try to do live tracking in Margo, our total processor utilisation across all cores hits 100% and the software fails to work properly. We don't believe it is a hardware issue.
We have noticed that the issue does not happen when we are tracking from a pre-recorded video, only when live tracking.
Automatic file path repair in the ExperimentData object is not compatible with MATLAB strings (introduced in 2016b)
Opposed to the recent batch of errors, Projector Rig 1 throws multiple that are different. Here is a log of two separate instances of running Margo today, 2/9/24
error_log_Proj_Rig1_02_09_24.txt
Add a separate control panel for different modes of reference calculation and other referencing parameters.
DESCRIPTION
I clicked on the preview camera button and then clicked on auto-detect-ROIs, then it spit out this error!
ERROR MSG
Invalid or deleted object.
Error in autoROIs (line 149)
imh.CData = binaryimage;
Error in autotracker>auto_detect_ROIs_pushbutton_Callback (line 1559)
expmt = autoROIs(handles, expmt);
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in autotracker (line 42)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)autotracker('auto_detect_ROIs_pushbutton_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback
The addROI
and subtractROI
make a reference to expmt
but the input is not provided.
Warning was printed even though the file paths were repaired correctly.
Warning: File path change detected, attempting to repair path meta data for raw data files Unsuccessful repair will result in non-functional raw data maps
I was wondering if there is functionality to use the ROI coordinates saved or copied from a user-defined grid ROI to position a new ROI on a new video. Essentially can an exact copy of a previosu ROI be imported for use on a new video? Thanks
Hi there,
I'm using Matlab 2016b with the bug updates to try and open MARGO, but keep getting some errors. Would hugely appreciate any help on this topic- I got it going once before but it won't seem to work anymore :( I've attached the error code here:
ls
. .gitignore README.md data classes experiments hardware tracking
.. LICENSE.md analysis and plots examples gui profiles utilities
addpath(genpath(pwd));
margo
Error using serial/fwrite (line 199)
Unsuccessful write: A timeout or Ctrl-C occurred during the write operation.
Error in writeInfraredWhitePanel (line 25)
fwrite(COM_obj,writeData,'uchar');
Error in refreshCOM (line 54)
writeInfraredWhitePanel(expmt.hardware.COM.light,1,...
Error in margo>margo_OpeningFcn (line 118)
[expmt, handles] = refreshCOM(expmt, handles);
Error in gui_mainfcn (line 220)
feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure), varargin{:});
Error in margo (line 48)
gui_mainfcn(gui_State, varargin{:});
The appropriate behavior is to prompt an error that says the map is not attached, and offer the user instructions on how to attach the map.
Recommend launching an additional window for editing ROIs.
When selecting "No COM detected":
Brace indexing is not supported for variables of this type.
Error in margo>microcontroller_popupmenu_Callback (line 539)
expmt.hardware.COM.light = serial(hObject.String{hObject.Value});
Box 4 of our PC's does not keep camera settings when you manually update them. Error log below appeared once, but not consistently (even though error is consistent over multiple attempts). Camera settings revert to a over-exposed default where flies cannot be tracked well
error_log_box4_02_09_24.txt
The circadian Lights ON parameter parameter sometimes does not receive a minute assignment. Possibly related to time strings in the format H:MM instead of HH:MM
addROI does not add roi.pixIdx to the new ROI which can create errors when adding and deleting multiple ROIs.
When selected "No Camera Detected" from dropdown:
Index exceeds the number of array elements (0).
Error in margo>cam_select_popupmenu_Callback (line 169)
if ~isempty(handles.cam_list(get(hObject,'value')).adaptor)
Our laboratory used Margo to track zebrafish larvae, but zebrafish moved too fast, resulting in the target being often lost.So what is the solution? Thank you!
Update the meta data during an error and output an error report.
This is occurring specifically in the noisy behavior room. Likely cause is refRawCrossPatch.m
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.