![](/profiles/wavemetrics/themes/wavemetrics/logo.png)
wave assignments with non-existent higher dimensions specified
![](/sites/default/files/styles/thumbnail/public/tony/profile-images/2023-09/mugshot.png?itok=kFS-G0qQ)
tony
Igor allows me to reference a point in a wave with non-existent higher dimensions:
•Make foo = p
•print foo[3][0][0][5]
3
•print foo[3][0][0][5]
3
Is this supported behaviour? I have no problem with this, I just want to know if I can rely on this continuing to work without error.
I would not count on things like that continuing to work. If you still want to use it, I would write a couple of tests so that you can check on an Igor Pro update if it still works.
June 19, 2024 at 04:15 am - Permalink
It's certainly convenient if you don't know the number of dimensions ahead of time. Instead of writing a lot of separate code for different numbers of dimensions, I just set the 'extra' dimension indices to zero and everything works.
I imagine that if support was dropped I would immediately see compilation errors.
June 19, 2024 at 04:45 am - Permalink
Not compile errors. The number of points and dimensionality isn't known until run time.
In fact, you can index into a multidimensional wave using just the rows by doing the appropriate arithmetic.
What sort of situation requires that you handle waves of unknown dimensionality?
June 19, 2024 at 10:35 am - Permalink
Ah yes, that should have been obvious.
I created a user interface for multithreaded 1-dimensional fitting of data from a single dimension of a multidimensional wave. The user can select the dimensionality and choose the dimension to be fit. Writing the code explicitly for each combination is not hard, just unwieldy.
June 20, 2024 at 01:36 am - Permalink
Ah, I see. Our Batch Fit procedure isn't multithreaded, and it only handles sets of 1D waves, and columns in a 2D wave.
June 20, 2024 at 09:40 am - Permalink