Writing a front-end
February 12, 2010 7:40 PM Subscribe
I'm looking to write a graphical front-end for a text-based data fitting and plotting program. Is it better to program an interface from scratch or write an extension for a plotting program such as Igor, Origin, Mathematica, etc.?
I'm fitting data from some neutron scattering experiments using a very tedious command-line program developed by my colleagues. The program first imports experimental data from a text file. The user then enters various experimental parameters that influence the fit, as well as upper and lower fitting bounds. The program next uses a chi-square minimization routine to fit the data, based on the user's constraints.
Currently all of the data, constraints, and fitting bounds are entered manually into a text file, which is loaded by the program; it then outputs a plot of the fit and its data points to a file. I would like to write a simple front-end that will allow me to input the constraints in a more visually appealing and intuitive form. I'd also like immediate feedback whenever a fitting parameter is changed (i.e. include a plot of the results in the interface).
I have some prior programming experience, but I don't know whether it's better to write an front-end from scratch or write a plugin for an existing plotting program, such as Mathematica, Origin, Igor, etc. Has anyone done something like this, and if so, can you share your experiences or suggestions? Thanks!
I'm fitting data from some neutron scattering experiments using a very tedious command-line program developed by my colleagues. The program first imports experimental data from a text file. The user then enters various experimental parameters that influence the fit, as well as upper and lower fitting bounds. The program next uses a chi-square minimization routine to fit the data, based on the user's constraints.
Currently all of the data, constraints, and fitting bounds are entered manually into a text file, which is loaded by the program; it then outputs a plot of the fit and its data points to a file. I would like to write a simple front-end that will allow me to input the constraints in a more visually appealing and intuitive form. I'd also like immediate feedback whenever a fitting parameter is changed (i.e. include a plot of the results in the interface).
I have some prior programming experience, but I don't know whether it's better to write an front-end from scratch or write a plugin for an existing plotting program, such as Mathematica, Origin, Igor, etc. Has anyone done something like this, and if so, can you share your experiences or suggestions? Thanks!
What language is the data fitting program written in? If it's done in MATLAB, then it's relatively easy to write a GUI wrapper for it. If it's written in something other than MATLAB, you can still consider using MATLAB for the GUI or you might consider what Rhomboid suggested. The advantage of using MATLAB for the GUI wrapper is that its bulit in plotting features are quite flexible and relatively easy to work with.
If you do decide to use MATLAB, here are some helpful links to the documentation:
Creating Graphical User Interfaces
Graphics (and Plotting)
posted by scalespace at 9:35 PM on February 12, 2010
If you do decide to use MATLAB, here are some helpful links to the documentation:
Creating Graphical User Interfaces
Graphics (and Plotting)
posted by scalespace at 9:35 PM on February 12, 2010
I'd do this in MATLAB. Igor is a good choice as well, especially because as you build your script, the GUI dialog boxes tell you how command lines will look.
posted by fatllama at 7:54 AM on February 13, 2010
posted by fatllama at 7:54 AM on February 13, 2010
« Older One Book to Bring Them, Into the Sci-fi and Hook... | "What's done is done." in Latin? Newer »
This thread is closed to new comments.
posted by Rhomboid at 8:03 PM on February 12, 2010