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
 contour/image profile
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

giordandue

Italy
Posts

Posted - 07/09/2011 :  02:04:31 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 8.5.1
Operating System:Windows7 64bit

Hi,
In this new Origin version, I am not more able to find the "z-value" at the interception in the contour/image profile, as it was present in the previous version. Is it no more available?
Thank you in advance

Hideo Fujii

USA
1582 Posts

Posted - 07/11/2011 :  10:52:33 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi giordandue,

When we redesigned the profile tool, this feature of showing the Z value at the intersection was skipped. We apologize for the inconvenience. We are considering if we should bring it back in the next version. For now, you can paste the following script to the Script window, highlight all lines, then press ENTER key to run it. (Note that vertical and horizontal values may be slightly different because of the interpolations of different directions. So, I also made their average.)

/////////////////////////////////////////
range VProf=[ProfileData]VLineProfile!2;
range HProf=[ProfileData]HLineProfile!2;
layer -s 1;
type VProfile X:$(VLine.y) Y:$(VProf(VLine.y));
type HProfile X:$(HLine.x) Y:$(HProf(HLine.x));
type Y Average: $((VProf(VLine.y)+HProf(HLine.x))/2);
/////////////////////////////////////////

--Hideo Fujii
OriginLab
Go to Top of Page

giordandue

Italy
Posts

Posted - 07/11/2011 :  12:12:23 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you for your answer. If I am not wrong by applying your script, I am getting a "Y average": Is it the "z-value"? Regards.
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 07/11/2011 :  2:12:06 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi giordandue,

Right, the X/Y is a term at each profiled line plot.
In terms of X/Y/Z in the image plot, the script should be like:

/////////////////////////////////////////
range VProf=[ProfileData]VLineProfile!2;
range HProf=[ProfileData]HLineProfile!2;
layer -s 1;
type HProfile X:$(HLine.x) Z:$(HProf(HLine.x));
type VProfile Y:$(VLine.y) Z:$(VProf(VLine.y));
type Z Average: $((VProf(VLine.y)+HProf(HLine.x))/2);
/////////////////////////////////////////

Best,

--Hideo Fujii
OriginLab

Edited by - Hideo Fujii on 07/11/2011 2:14:05 PM
Go to Top of Page

giordandue

Italy
Posts

Posted - 07/13/2011 :  04:00:00 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Dear Hideo,
thank you for your help. It seems to me that the result I am getting it is not what I am expecting. What I need it is to obtain the max Z value associate to a X-Y intersection, in order to be sure that the relative x-y values are the modes of the two distributions. Maybe it is more direct to use the matrix, but I was thinking that also the Z-value (max) approach was possible..Thank you again..
Go to Top of Page

easwar

USA
1964 Posts

Posted - 07/13/2011 :  06:44:50 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Try this script, where it is assumed your graph has the default setting of three layers, the data the horizontal and vertical profiles (so you have not plotted them in separate graphs):


// Make layer 1 active and save profile line positions
page.active=1;
double dhliney = hline.y;
double dvlinex = vline.x;
// Make layer 2 active and find z 
page.active=2;
double dz1 = %c(dhliney);
// Make layer 3 active and find z
page.active=3;
double dz2 = %c(dvlinex);
// Report average
double dz = (dz1+dz2)/2;
type Z value: $(dz);


Easwar
OriginLab
Go to Top of Page

giordandue

Italy
Posts

Posted - 07/13/2011 :  09:12:11 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
http://www.originlab.com/ftp/forum_and_kbase/Images/profile.pdf

Hi Hideo, thank you..
I have the attached profile and the question is: is it possible to derive the x-y value that will give the max Z-value? I suppose that these values should be very close to the relative x-y mode-Values.
Regards
Go to Top of Page

Penn

China
644 Posts

Posted - 07/14/2011 :  04:34:01 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Here is an Origin C example on how to get XY coordinate of min/max Z from matrix.

Penn
Go to Top of Page

giordandue

Italy
Posts

Posted - 07/14/2011 :  07:18:14 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Penn, thank you..
I tried to copy and enter the example in the Command Window (is it correct?), but I got #Command error!
I get the same error opening the matrix (Mat2DBin3) and launching the command, as well as opening the Image Profile derived by the same matrix and launching the command.
Probably I am doing some mistake (incidentally, I am copying all the command, i.e. from "void" to the last parenthesis.. Am I right?
Go to Top of Page

Penn

China
644 Posts

Posted - 07/14/2011 :  9:19:10 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

There is a Hello World tutorial in this page on how to use Origin C. To run the example on getting XY coordinate, you can refer to this Hello World tutorial. And the getting XY coordinate example needs a matrix to be active.

Penn
Go to Top of Page

giordandue

Italy
Posts

Posted - 07/15/2011 :  02:56:23 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Penn, thank you. I tried to follow the OCguide, but I get a error.
These are the steps I followed:
1) Open the file origine file and the relative matrix (Mat2DBin4);
2) Click the code builder, new C File, setting the name "mode"
3) copy your code and click the button "build"
4) the output window says:
compiling...
mode.c
Linking...
Done!

However, nothing is displayed in the other window (in the OC guide "Local Variables"). I print either "test" or "mode" in the LabTalkConsol", but I get "Command error!"
I tried the same using the script window, but with same result.
I repeated, changing the name, etc., but I have not solved (incidentally, to delete the previous function is sufficient to delete them in the OriginC workspace? Thank you and regards
Go to Top of Page

giordandue

Italy
Posts

Posted - 07/16/2011 :  09:10:03 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I have solved.. Thank you again
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