Added feedbacks.list, necessary for the FeedbackControler to recognize the feedback
Added a folder with pics. Added a file with a fixation cross. Added a folder /bin with test.py, which is necessary to run the Feedback from FeedbackControler. poly_feedback.py was modified as follows: now two different feedbacks are presented: one which displays a random image from the folder /Pics and a fixation cross latter on, and a second feedback (the usual one) which displays random polygons.
Feedback for polygons and feedback for images have been put into separate folders. A file "localTest.py" was added to call both feedbacks as a script with all paths being local (as opossed to "bin/test.py" where paths refer to the folder where the FeedbackControler is stored).
Colors of polygons made random. Class "ManyPoly" added in file "poly_stim.py" to display overlapping polygons, or many polygons at a time. File "manyPoly_feedback.py" added to test this last feature.
Modified README.mp to add an overview description of the different files and folders in the repository. Most of changes in this commit deal with reading the polygons from data files instead of generating them randomly each time that the feedback is called. This will be handy when the polygons to be presented are the decompositions of some complex image instead of just random stuff. Therefore: a folder "PolygonPool" has been added with a file in it were the info to build some beforehand-given polygons is stored. The module "helper.py" has been added: it includes some functions to read/write polygons from/into a pool, to operate some transformations in them (e.g. to make them fit for a canvas), and also to generate objects of class Poly with info drawn from the pool of polygons.
Now polygons are filled, as required for the experiment.
Deleted fixCross.jpg and added background.jpg: a neutral background to separate stimuli. Modified "img_feedback.jpg" to adjust image size to canvas size. Created "training_feedback.py": a feedback that, when completed, should train the subjects in the task to be performed.
Some improvements in "training_feedback.py": target and non target stimuli are differenciated. Therefore, files in "PolygonPool" associated to the different images in "Pics".
Renamed "Pics/brandenburgerTor.jpg": name was wrong written and yielded errors when paired with the file containing its polygonal decomposition. Modified "helper.py": operations over certain objects produced funny errors and it was necessary to operate in copies of these objects to avoid malfunctioning. Modified "training_feedback.py": run function is better structured, functions to build stimuli based on a difficulty parameter and to handle what difficulty is to be set next have been added, though this last needs further development.
Comments added at "training_feedback.py". Added "constructive_feedback.py": this feedback implements the original idea of stimuli which attempt to reconstruct some image. Stimuli are selected (by random, by now! but based on if the subject recognizes them in the future) and new stimuli are displayed together with the selected ones.
Functions from helper module and feedbacks adapted to write/read the info of polygons from files using the "json" module.
Minor changes to "constructive_feedback.py" and "training_feedback.py"
Some minor changes include: changes in README.md; changes in feedbacks.list; now detailed_feedback.py is tracked, although this feedback is not implemented at all; an outdated function has been moved from training_feedback.py to helper.py, although this function is redundant (has been wirtten many times in different modules) and already useless: it will be delated eventually. Most important changes were made on training_feedback: logging has been set up and communication from feedback to parallel port has also been implemented. It remains to be done comunication from parallel port to feedback, which should follow shortly afterwards.
Removed ./Pics and ./PolygonPool.
Created new folder ./data where the subfolders Pics and PolygonPool are to be found.
Definitively removed Pics and decompositions.
Silly file background.jpg moved inside data. For convenience, let us retain this file by now. Major changes in training_feedback.py: extensive documentation; refinement of the comunication with the parallel port, more information is conveyed, also to the log; implemented function to handle the complexity of the presented stimulus; implemented function to evaluate the subjects activity. This last thing relays in the BCI updating the variable activity of the feedback object. This last implementation is a little bit messy and a great way to improve it would be if the BCI could explicitly call a function of the feedback object passing as a parameter the results of the classifier. This last thing must be easily done, but I dont know how...
Comunication from the BCI back to the Feedback has been solved by implementing a function which the classifier calls once it is done with the classification of the brain activity during a stimulus presentation. The classifier must pass back as arguments the outcome of the classification task and the ID of the corresponding stimulus to assert that both the classifier and the feedback are handling the same event.
Moved the encapsulated TrainingFeedback into its own folder. Some changes in TrainingFeedback to properly work with the genetics decompositions.
Added one picture and its decomposition to show the structure of the data which is read in the current code.