The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Shifting Data Sets / Curves
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

jb240

Germany
9 Posts

Posted - 09/19/2016 :  09:30:52 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release OriginPro 2016G (Select Help-->About Origin):
Operating System:Windows 2010

Hello,
I would like to shift a set of curves so they will met a target curve/line. I have tried vertical traslation, but it allows me to shift only one curve, the others can't be translated. How do you use the option shifting by steps or subtract a value. I would like to shift the curves below (pls see image) let say at 2 magnitudes on my scale (to the red dotted curve).

Thanks in advance!
JB

Hideo Fujii

USA
1582 Posts

Posted - 09/19/2016 :  3:47:18 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi JB,

After thinking of several ways, let me suggest an easy-going approach:
Run the Vertical Translation gadget, and execute the following simple script:
GetN (Paste the offset value after vertical translation) vt;
string p0$=%C;
doc -e DY {
   string p1$=%C;
   if(p0$!=p1$) %(p1$)=%(p1$)+vt;
}
Copy the offset value reported in the Result Log, and paste it to the dialog which appears from this script.
All plots should be translated by adding the same offset. Note that this works no matter plots are grouped, or not.

Hope this works.

--Hideo Fujii
OriginLab


Edited by - Hideo Fujii on 09/19/2016 3:53:30 PM
Go to Top of Page

jb240

Germany
9 Posts

Posted - 09/20/2016 :  08:03:20 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Hideo,
Thanks so much, the script works. However, why is it that not all data points are shifted one set of curve is left behind. They all actually belong to layer 1. Does this mean that translating the data point mean that my original data in the table are also changed?

Thanks in advance!

Regards,
JB

quote:
Originally posted by Hideo Fujii

Hi JB,

After thinking of several ways, let me suggest an easy-going approach:
Run the Vertical Translation gadget, and execute the following simple script:
GetN (Paste the offset value after vertical translation) vt;
string p0$=%C;
doc -e DY {
   string p1$=%C;
   if(p0$!=p1$) %(p1$)=%(p1$)+vt;
}
Copy the offset value reported in the Result Log, and paste it to the dialog which appears from this script.
All plots should be translated by adding the same offset. Note that this works no matter plots are grouped, or not.

Hope this works.

--Hideo Fujii
OriginLab



Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 09/20/2016 :  09:30:22 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi JB,

> one set of curve is left behind.

A possibility is that the Y data of the curve which couldn't be shifted has been locked for recalculation
(indicated by a green lock icon in the column header). Could you please go back to the data, and check
if it is the case? If so, left-click the lock, and select "Recalculate Mode: None" flyout to reset the mode.
(Obviously, you consequently would loose the recalculation process for the column.)

Thank you.

--Hideo Fujii
OriginLab

Edited by - Hideo Fujii on 09/20/2016 09:36:02 AM
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000