thanks!by lucast4 - Questions and Answers
If i have an instance of a class as part of TrialRecord.User, I have run into this error while saving (automiatcally) between trials: 'isvalid' requires one of the following: Image Acquisition Toolbox Instrument Control Toolbox OPC Toolbox Error in mlbhv2/write_recursively (line 207) if isobject(val), if isvalid(val), type = 'struct'; else, vaby lucast4 - Questions and Answers
If I try to convert from .bhv2 to .h5, by running this: f = <filename>.bhv2 convert_format('h5', {f}); at this line in mlhdf5.m: write(obj,val{m},); I get error: The variable class, 'uint64', is unknown Error in mlhdf5/write (line 129) write(obj,val{m},); Error in mlhdf5/write (line 129)by lucast4 - Questions and Answers
Yes, sorry you're right. This is not a "bug" as I originally suggested. I was debugging a colleagues code and did not realize they had already used reward_dur as an editable. My point in this post was a bit different. It was that one might really struggle by inadvertently registering reward_dur as an editable in the beginning of the timing script, then try to use reward_dur asby lucast4 - Questions and Answers
in timing file, I get error if I have: dur1=100; dur2= 100; reward_dur = dur1 + dur2; The error is in embed_timingfile.m I believe this is because "reward_dur" is hard coded as an editable name, and so it tries to run eval('dur1 + dur2') even though dur1 and dur2 are not in scope. If I do the following, things are fine: dur1=100; dur2= 100; reward_dur =by lucast4 - Questions and Answers
Hi, is there a way to output a periodic TTL signal with any arbitrary frequency? e..g, a 50hz signal output from a digital port. e.g., this running in the background during a trial? Thanksby lucast4 - Questions and Answers
I run into this error, when I try to run the following scene: secondscreen = PolygonGraphic(null_); EC = [0.5 0.5 0.5]; FC = [0.5 0.5 0.5]; SI = ; PO = [0 0]; tmp2 = 0.5*pts_poly; % pts_poly is N x 2, in norm coords. secondscreen.List = {... EC, EC, SI, PO, pts_poly, 1, 0; ... EC/2, EC/2, SI, PO, tmp2, 1,by lucast4 - Questions and Answers
Hi, is there code for converting a .bhv2 file to .h5? (Analogous to bhv2mat). The reason is that I have written a large code base for analyzing .h5 files in python. I used to save data as .h5, but now I would like to start saving data in .bhv2 because h5 slows down the ITIs considerably. I've tried first converting bhv2 to mat in MATLAB (using bhv2mat), then loading mat using scipy in Pytby lucast4 - Questions and Answers
Hi, If I want to store times of digital inputs, is it recommended to use TTL or General Input? I will not need to access it during the task. It is ~40-60hz signal that will not be synchornized with the ML2 frames. Thanks!by lucast4 - Questions and Answers
Thanks, I am actually trying to synchronize Monkeylogic with a separate computer that is acquiring video camera. The video acquisiion is triggered on trial onset signal sent from ML2. I would like to send and eventcode signalling both trial number and whether it is trial "on" or "off". Regarding the eventcodes, that makes sense - however, I cannot tell how to assign thoseby lucast4 - Questions and Answers
Hi, sorry but I cannot find this anywhere - how are eventcode encoded in the digital output signal? e.g., would a code be converted to a binary word, sent out by modulating the a single channel over time? If so, the strobe would be sent once for each bit for the word? or just the first bit? Thanksby lucast4 - Questions and Answers
The idea is that each session might start with a unique set of values, but during that session I could update the values as needed (just for that session). This way I have default values based on experimental parameters (which I specify for each session) but also the option to modify those parameters based on how the subject is performing.by lucast4 - Questions and Answers
Is there any workaround for this? The problem is that I have parameters whose names and values vary from expt. to expt. There is no way for me to hard code those values. Is the following an alternative: hard code those variables the same way always, but immediately in the first trial assign the correct values to these variables. And every trial read out those values appropriately? Thanksby lucast4 - Questions and Answers
More generally, I would like to assign editable variables in cases where I do not need to pre-specify both the variable name and the values. Ideally something like: list_of_strings = getVariableNames() % length-N cell array of strings list_of_values = getValues() % length-N cell array, each element an numerical array of values for i=1:length(list_of_strings) eval(' ]) end editablby lucast4 - Questions and Answers
Hi Jaewon, I noticed that editable requires passing in variables for which values have been directly assigned. For example: This works fine: behfeat= [1 2 3]; editable('behfeat'); However, this does not: values = [1 2 3]; behfeat = values; editable('behfeat'); Traceback: Error using eval Unrecognized function or variable 'values&by lucast4 - Questions and Answers
I modifed "monkeylogic.m" to allow AI sample rate of 125. It seems to work fine - I just want to confirm that this doesn't mess up any of the downstream code/functionality? Thanksby lucast4 - Questions and Answers
I recently been running into an error with webcam video. At some random point I will lose the webcam stream and video-saving will stop. At this point I have to restart matlab to regain stream. It doesn't seem to be a hardware issue, since I can stream the webcam using another software. This only started happening a few weeks ago, and, suspiciously, it happens for two independent computer/webby lucast4 - Questions and Answers
I think there is a bug where if you try to select "100" for the AI sample rate, it reverts to "1000". I think it is because "set_listbox_item()" in monkeylogic.m compares strings using the first shared number of characters (so 100 reverts to 1000). I wrote a new function "set_listbox_item_exact()" using strcmp instead of strncmpi and it works.by lucast4 - Questions and Answers
I didn't use the installer, I just added the files to my path. So matlab.apputil.getInstalledAppInfo is actually empty. I also confirmed that dashboard works for timing files you wrote, so seems like something about my timing file?by lucast4 - Questions and Answers
It still only shows "Trial 1" on the first trail, and is then blank on subsequent trials... I sent you the timing file by PM in case that helps.by lucast4 - Questions and Answers
I still have not figured it out. To reiterate: I see the text on trial 1, but do not see anything on trials 2, 3, .... This is true even though I run idle() or run_scene() after calling dashboard(). Thanksby lucast4 - Questions and Answers
amazing - it works, thank youby lucast4 - Questions and Answers
Is there a property for mgl objects that controls something like alpha? to control transparency?by lucast4 - Questions and Answers
Amazing! I can't believe I did not see this. Thanksby lucast4 - Questions and Answers
I am trying to leave a trail of little circles (let's say with color A) wherever the animal has touched. Those circles should be on top of the stimuli present at the start, which includes, for example, a line of circles (with color . One option would be to create the circle trail at trial onset, before making the stimulus circles. But the difficulty is that I don't know how many cirby lucast4 - Questions and Answers
Hi, if I am writing my own adapter, my understanding is that the order in which objects are displayed depends on the order in which they are created (with most recently created objects being "under" other objects). The problem is that on each frame I would like to create new objects that go on top of the older objects. I have implemented this in the following way: On draw() for eacby lucast4 - Questions and Answers
Hi, is there an easy implementation to disable autofocus on webcams? Disabling using the proprietary software (e.g.,, Logitech) doesn't seem to work for me. Thanksby lucast4 - Questions and Answers
thanks - my problem is not that I see static text, it's that I see text for the first trial and nothing on subsequent trials. I used static text there for debugging purposes. I will look closely at your other suggestions. THanksby lucast4 - Questions and Answers
sorry I could not find this information in the docs - what are reasonable values for frame interval and drawing time? If this is the average frame interval and drawing time I would guess I'd want "frame interval" < 16ms and "drawing time" even less than that? However I sometimes see frame interval up to 33 ms, and drawing time even up to 48. Is this because this reby lucast4 - Questions and Answers