Using structures in IPF files is great. Extending this functionality to being able to create and use instances of structs defined in the procedure editor from the command line would be amazing.
Just remembered why I thought of this feature. This would be very useful when creating complex results from functions. Sometimes a function will create multiple waves and sometimes it would also be useful to be able to attach additional information to the output - as of now I just make a bunch of waves and global variables and/or export all of it into a new data folder. Instead all of this information could be output as a Structure that you can then access at the command line just as you would in a function (via the . operator). Accessing members of a structure is much easier than members in a data folder (much less typing) plus you could have custom functions attached to the structure for printing information in a report or some complex plot routine to display the results. This would allow me to have multiple structure definitions for different data objects each containing simple functions like "plot" or "report" that do unique things for each defined structure. I guess I'm talking about applying a basic OOP style to working within Igor.
Anyways - I think it would be useful to be able to create instances of defined structures dynamically at the command line and also to be able to return structures from functions to struct variables at the command line (as well as within functions).
Anyways - I think it would be useful to be able to create instances of defined structures dynamically at the command line and also to be able to return structures from functions to struct variables at the command line (as well as within functions).
November 8, 2011 at 03:24 pm - Permalink