Extract Transformed Mirror axis as a wave

Hi All,

I've been scratching my head trying to figure out a simple way to do this.
I have x-scaled waves (that are normal distributions) that I use the TransformAxis package to modify my x-scaling and then typically display the transformed axis as a mirror axis.

This mirror axis is an absolute scale and i need it to compare data sets. To be clear different sets of data have their x-axis go through slightly different TransformAxis operations.

I want to make a new set of waves that are x-scaled to the transformed axis then I can compare multiple data sets on one graph. Has anyone got an idea how to approach this?

Thanks for any help you can give!

Best wishes,
Nicola
I'm not sure exactly what you want- a Transform Mirror Axis has the same axis range as the main axis that it is based on. It is the tick labels that are transformed.

If you want to know the range in the transformed units, you can use GetAxis on the main axis and then apply your transformation function to the endpoints of the axis.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
Hi John,

Thanks for your reply. That's what I've been doing. And i find it a bit clumsy.
If I have 5 different TransformAxis operations and want to compare the data on one graph I need to decide my max and min TransformAxis scale then work backwards to calculate the range on the original axis range. I do that 5 times then just hide labels on the axis that i don't need. It would be nice to work on the tranformed axis and the initial axis varies accordingly.

So i'm transforming the x-scaling range (by a linear offset). For example TransformAxis = 4.5 - x ; This constant varies for data set.

I think it would be quicker if i could duplicate my original waves. And change the wave scaling by an offset. Then I can quickly plot the new data easily. I feel like there must be an easy way to do this (probably built in).

Is there a way for igor to get the x-axis coordinate associated with a point in the wave? I could extract a dummy scaling wave with each point the associated x-value. I could then take the "x-wave" transform it and then interpolate that new x-wave with the y-data. Does that seem like a reasonable approach? I worry i'm over complicating things.

Thanks,
N
Hi John,

Thanks for your reply. That's what I've been doing. And i find it a bit clumsy.
If I have 5 different TransformAxis operations and want to compare the data on one graph I need to decide my max and min TransformAxis scale then work backwards to calculate the range on the original axis range. I do that 5 times then just hide labels on the axis that i don't need. It would be nice to work on the tranformed axis and the initial axis varies accordingly.

So i'm transforming the x-scaling range (by a linear offset). For example TransformAxis = 4.5 - x ; This constant varies for data set.

I think it would be quicker if i could duplicate my original waves. And change the wave scaling by an offset. Then I can quickly plot the new data easily. I feel like there must be an easy way to do this (probably built in).

Is there a way for igor to get the x-axis coordinate associated with a point in the wave? I could extract a dummy scaling wave with each point the associated x-value. I could then take the "x-wave" transform it and then interpolate that new x-wave with the y-data. Does that seem like a reasonable approach? I worry i'm over complicating things.

Thanks,
N
You can offset a trace without using Transform Axis. Is that what you want?

Double-click a trace to bring up the Modify Trace Appearance dialog. Turn on the Offset checkbox, then set the desired offset. Of course, this doesn't give you the un-shifted axis along with a shifted axis.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
Hi John,

The offset would be perfect except I want to display multiple waves with different offsets on one graph.
That's why it would be nice to have a procedure to offset the x-wave scaling.
For example.
1) Have a wave with data x-range (wave scaling) eg 0 to 5
2) Duplicate wave and offset duplicate's x-range by k so our new scaling 0+k to 5+k.
3) Do this for multiple waves varying k.
4) Add these new correctly scaled waves on same graph to compare.

The problem with changing the wave scaling is that i can either define a start and delta or start and end but my original spacing is not equal.

Thanks,
N

PS The reason I used Transform Axis originally was because I never used to compare data sets and liked to have an axis before and after the offset on one graph. As I already use this Transform Axis as part of my procedure I thought the mirror axis data might be saved somewhere to make my job easier. But I'm starting to think the Transform Axis Package just plays with ticks for a new axis and doesn't affect the wave.
Hi John,

My goodness I've been so silly.
I only now realise that I can offset different waves by different amounts in the menu. I'm so used to selecting everything that my brain didn't stop to think!
I think that resolves my aesthetic problem with graphs.

However it would still be good to offset the x-scaling in the wave. A list of waves already correctly scaled in the data browser would make comparing things a lot faster than always needing to look up all the different offset values and manually plugging it in every time I make a graph. Is this possible?

Thanks,
N
This will apply an offset to the X scaling of a wave:
Function OffsetScaling(w, dx)
    Wave w
    Variable dx
   
    Variable x0 = leftx(w)
    SetScale/P x, x0+dx, deltax(w), w
end

Is that what you're looking for?

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com