
IBW read-only

ukos
I like to keep my measurement data as IBW and process those files for analysis.
It is very convenient to laod waves with symbolic linking to the original destination and it also saves a lot of disk space. I don't want to use Duplicate after the LoadWave operation as it will double the size of my experiments.
In order to not modify the measurement data within Igor Pro, I would like to write-protect it against changes. Is something like this possible or will I need to protect the files at the file-system level?
You can lock the wave using the SetWaveLock operation. This won't completely prevent the wave from being modified, but in most cases it does.
February 5, 2019 at 06:38 am - Permalink
That is indeed a nice functionality that I was not aware of. Thank you.
follow-up: Is it possible to check whether the IBW is a reference or if it was copied to the experiment?
February 5, 2019 at 07:37 am - Permalink
Sure, you can use WaveInfo and inspect the value of the PATH keyword. If that's an empty string, then the wave isn't a shared wave.
February 5, 2019 at 08:35 am - Permalink
In reply to That is indeed a nice… by ukos
I believe that you can use the IsSharedWave in the following code for this purpose but I am not sure that it is foolproof. It relies on the following behaviors:
1. Igor automatically creates a symbolic path when you load a wave as a shared wave
2. Igor does not allow you to kill a symbolic path that points to a disk folder containing a shared wave
3. If you overwrite a symbolic path pointing to a shared wave's disk folder, WaveInfo returns "_none_" for PATH, not "".
Make sure to read the comments in the code below carefully so that you understand what "shared wave" means.
February 5, 2019 at 08:48 am - Permalink
Thank you!!
February 5, 2019 at 09:59 am - Permalink