Overhaul the MultiPeakFit package
Thu, 07/12/2018 - 08:39 pm
It is really nice how Igor Pro has come along lately, and got more and more user-friendly. I still have to try out Igor Pro 8 (My current version is 7.08 on Win8), so apologies if some things mentioned below are already implemented or worked on. I should mention first that I use Igor for analysis and graphing of spectroscopy data, and mainly use the powerful graphing features and write mostly my own programs. But one built-in feature I use often is the MultiPeakFit2 package, which however continues to give me some headaches. I have written a huge suggestion list some years back in the forum, of which almost all points were implemented thanks to the hard work of John Weeks.
Still, I feel that this package is really, really in need of a general overhaul. Below points may read like a rant, but that’s not my intention. I really love to use Igor and all of its features, and MultiPeakFit works when taking care of its quirks. I just would love to see MPF finally getting a brush-up like the other features of Igor. To be honest, for fitting of multiple peaks in a data set I cannot fully recommend to use Igor to others, who might be less patient. MPF2 is not really what I would call user friendly in its current state.
- It is difficult to resume fits after you close the graph window:
If the fit is done then one may want to clean up the graphs from fitting many sets. Bad idea. If the graph is gone, there is almost no way to resume the same set and adjust the fit. I only way I know of is to save the graph macro upon closing (make sure to close the panel first or error messages will appear out of nowhere), note down which fit set is which data. For resuming the fit open the correct graph again and select the right data and the right settings it the ‘Start MultiPeakFit’ panel. If you mess up one step it does not work. Why not just a ‘resume set xx’ option?
- It is difficult to extract the fit results for other purposes:
While you can create a graph, see the fit parameters in a table, or report everything in a notebook, it is not obvious how to access this data on your own. It is not possible (as far as I know) to just copy the values from the table in the result window. To access the values, or the fit/peak waves for that matter, you have to dive into the packages folder and have to know what to look for. The result table is not even in an easy-to-understand format (which value is which). I just wrote a script which extracts the values for my own purposes. But how many users will do that? This goes together with the next point.
- Data clutter builds up easily:
Besides that it is very easy to ‘accidentally’ create new MPF sets which you cannot delete easily, the fit folders itself contain so much stuff that it is difficult to navigate (which you currently have to). This is multiplied with the use of checkpoints or the ‘Initialization’ function in the ‘Start MultiPeakFit’ panel which creates copies of data waves, coefficient waves and so on.
- If the fit failed badly, there is often no way back:
Sometimes the fit goes wrong and peaks end up all over the place. Then you have a problem. There is the ‘revert guesses’ button which seems to restore the peaks sometimes, but not the values in the menu. So the only hope is to manually adjust the values in the menu afterwards and pray that the fit fixes itself. Or you managed to save a checkpoint, or you save the experiment (which I do almost every minute when working with fits). It is often best to just revert the experiment and start over.
- The menu is clunky:
This starts with too small panels to show all relevant information, options ‘hidden’ at various places (I often have to explain people how to generate a graph with the result for example), almost unusable constrains options, and a less-than optimal placement of controls. Also, the fit proceeds only so far on its own. For slowly converging fits I (and other users I talk to) end up slapping the ‘Do Fit’ button many times while looking for changes in the parameters.
- Still many bugs (I only name a few off the top of my head):
The ‘current folder’ often ends up placed deeply hidden in the package substructure (especially annoying when you run your own scripts alongside), window hooks which break easily and generate error messages if you do not follow the exact right steps, the fit failing badly if something is not set up correctly with the cursors (or the constrains or the initial guess), or the possibility to select impossible combinations of settings in the ‘Start MultiPeakFit’ panel.
Thank you for reading all this. I hope my suggestions are useful to work one the code. I know you are working hard on a ton of features, so this might not be on the top of the list. I offer to give a more detailed description or prepare working examples if necessary.