Scaling to a subset extracted from a 2D source wave
Hello,
I have a question.
Suppose I have a 2D source wave (named source2DWave) which has 200 rows and 300 columns and the x scaling is 0 to 850 and y scaling is 25 to 14000.
Now I want to extract a subset from the 2D source wave. The rows for the subset run from 40 to 120, and the columns from 70 to 250 in the 2D source wave.
I can do that easily using the matrixOp operation:
MatrixOp/O/S subSet2DWave = subRange(source2DWave, 40, 120, 70, 250)
Now my question is there a way in Igor so that subset will preserve the x and y scaling of the source wave
(i.e. the first column and first row coordinates will be the same as they were in the source wave)?
When I do the MatrixOp operation, the scaling is changed and they start from 0 automatically.
Maybe I am missing something. Thank you so much.
Ann
Use the following instead of MatrixOp:
Duplicate/O/RMD=[40, 120][70, 250] subRange, subSet2DWave
Or you reapply the (modified) scaling yourself after using MatrixOp, which might become necessary when you do more complicated operations than just extraction.
EDIT: Seems like the /S flag of MatrixOp is not doing what is advertised, or I didn't understand its purpose either. Anyway, you should be good to go with Duplicate.
January 12, 2023 at 10:32 pm - Permalink
In reply to Use the following instead of… by chozo
Thank you so much for the suggestion.
Yes, I can use a bit of code to modify the scaling of the subset if I use the MatrixOp operation.
I am wondering why the MatrixOp operation is not preserving the scaling in spite of using the /S with it.
Ann
January 13, 2023 at 08:14 am - Permalink