Use a wave in multiple experiments
annalisa
Hello everyone,
I created a "dynamic" wave, which appends a point to the wave everytime I press a button. Everything works well, however I would like to use this exact wave in another experiment and append new points (the Wave is created if it does not exist yet and the procedure for this is part of every experiment)
My question: is there a way to create a "global" wave that could be accessed and elongated in every experiment.
Thanks a lot in advance and if you want to see a code snippet let me know :)
Annalisa
Do you mean that the wave will be accessed from two instances of Igor Pro simultaneously, or do you want to open the experiments separately (not at the same time) and access the same saved wave? The latter can be achieved by saving the wave separately from the experiment as an igor binary wave file:
DisplayHelpTopic "Sharing Versus Copying Igor Binary Wave Files"
Rather than sharing the wave, you could achieve the same thing by loading the wave at the start of your analysis and overwriting the saved wave on disk when you are done. That way you will have to look after the bookkeeping, but it's perhaps less likely to result in confusion when things go wrong.
September 24, 2024 at 06:45 am - Permalink
Yes, you can create a 'shared' wave, which is a wave in form of a file on disk, external to the experiment file. If you use the default settings, Igor asks you if you want to 'copy' or 'share' when loading a binary wave into Igor. The latter just references to the file on disc. Similarly, you can save the wave with the 'Relocate to File' option, which externalizes the wave in the mentioned fashion. You can share a single file between multiple experiments this way. Note that this has a few drawbacks, and you cannot work from multiple Igor instances on the same file simultaneously.
I don't know what you are trying to do, but it might be better to write your code so that it saves a copy of your wave on disk each time you press the button and loads this copy with opening a different experiment file. I am not sure you will be happy with the sharing option. If you want to try in any case, read more here:
DisplayHelpTopic "Sharing Versus Copying Igor Binary Wave Files"
EDIT: Oh man, getting sniped with just a 15 min. gap ... XD
September 24, 2024 at 06:59 am - Permalink
Oh, maybe sharing them that way is not a great idea !
I will probably just write the values into a text file and when I am done with my analysis, I will just create a way and display it.
But thank you for your answers :)
September 24, 2024 at 07:05 am - Permalink