Feature #1194
closed
Parametrization of Matlab algorithms
Added by Nicolas Coudray over 13 years ago.
Updated almost 12 years ago.
Description
Hello,
The feature request is about the Matlab node: add the possibility to do a parametrization of the algorithms... it would be convenient to allow the user to modify some parameters (like in the Leginon Hole Finder or JAHC Finder nodes for instance, where parameters like thresholds can be adapted...).
For instance, in our case, we would have a specific Matlab GUI associated with each Matlab file. The GUI would allow the user to change the default parameters which will then be saved into our database. So, just two other "elements" would be needed in the Leginon "set Parameters" GUI: another "link" box to another Matlab file (the appropriate GUI), and a kind of "run" button to launch this GUI (an image is attached to explain the suggestion). I guess when the button "Run GUI" is pressed a "pymat.eval(self.handle, '%s(Session_Id)' % f[:-2])" command would be executed (I guess no output variables are returned to Leginon if they are saved by the Matlab GUI; and the only input parameter which may be needed could be the ID of the current session...).
This is just a suggested way to implement it; there are probably better implementations. I hope anyway that such a feature can be added.
Thanks for your help,
Best,
Nicolas C.
Files
- Assignee changed from Anchi Cheng to Nicolas Coudray
Nicolas,
If you are happy with your implementation on this feature. do you want to commit it to our repository? We can either give you the permission to commit, or you can attach it to this issue and I can commit it for you.
Hi,
No problem. I attached the files here, please let me know if there is any problem. This is a compressed folder with 3 files: leginondata.py and matlabtargetfinder.py, both from the "leginon" folder, and MatlabTargetFinder.py from the "leginon/gui/wx" folder.
By the way, do you already know if you're planning to include this feature (and the conversion of the images into float for mlabwrap) in the next update of Leginon?
Thanks again for your help,
Nicolas
- Status changed from New to In Code Review
- Assignee changed from Nicolas Coudray to Anchi Cheng
- Modification of the Leginon-Matlab communication:
Leginon transmits to Matlab not only the image, but also its corresponding Def_ID index (from the database). So now, by searching this ID into the database, the Matlab algorithms can get additional information about the image (like the pixelsize...).
- Modification of the GUI:
In the Leginon GUI associated to the Matlab node settings, an addition "browse" box appears. It can be used to select a "Matlab GUI File" to parametrize the Matlab algorithms before running an automated acquisition.
When the additional button "Run parametrization GUI" is pressed, the file selected above is run (at nysbc, it launches a Matlab GUI which is used to modify the input parameters of our algorithms). The way the parameters are saved must be handled by the Matlab parametrization file (in our case, parameters are written into a mysql database. During the run, our algorithms access this database to read the parameters which have been set).
- Status changed from In Code Review to Closed
The revision for the change is r15775
Also available in: Atom
PDF