LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

question about intensity graphs

Hi all Labview gurus and lovers,

 

I have a question to all of you. Last time I encountered with the interesting problem connecting to the building of the intensity graphs from the measurements. Suppose I have a matrix of numbers actually the voltages that I give to piezo motors. Afterwards I get some data from the measurement and I build some intensity graph from that data. And I want that every measurement will corresponding to voltage that I gave to the piezo motor. So I want to build the intensity graph as I dictate to the program to build it.

Example: I want to scan area ,some square from x=0.5;y=0.5 to x=-0.5;y=-0.5. and I did some algoritm that builds me some matrix of numbers depending on resolution of the picture; for instance if the resolution is 256, so the number of x will be 256 just like y=256 kinda 256 lines. Afterwards I say to the intensity graph that Xmax is 0.5 and Xmin is -0.5 just like Ymax=0.5 and Ymin =-0.5; also I deliver to him x and y offset and multliplier. So when I see how it builds my gaph I dont see that it starts from the [0.5 0.5] point as I want it. So my question is: how can I be sure that it will start from the point I want it to start?  And how can I dictate to the graph to start to build the graph from the point I want? Because the problem happens when I want to zoom some area. When I zoom some area it gives me something different from what I expect to get.

thank you.

0 Kudos
Message 1 of 5
(2,289 Views)

Intensity graphs are unlike the other graphs in that they only use the index values of the data array as the axis coordinates.  For a 256x256 graph the axes will range from 0 to 255 on both X and Y.  You can try to customize the axis labels or use  slide controls with the -0.5 to 0.5 values you want to indicate the real values for your axes.

 

For Zooming, the second approach will be much better because you can use property nodes to change the range on the slide controls to match the zoomed data.  You will also need to keep track of the indexes where the array subset is located to make sure everythign works the way you want it.

 

The image below shows how the Y-axis could be changed.

 

Lynn

 

Intensity graph scale.png

Message 2 of 5
(2,279 Views)

@dimani4 wrote:

... also I deliver to him x and y offset and multliplier.


What is your definition of deliver? I don't understand.

 

All you need to set is the offset and multiplier to define the linear relation between array indices and axis values.

 

In your particular case you would set x0=0.5 and dx= -1/256 or similar (might need a small tweak)

 

In summary, x0,dx define the mapping of array indices to real values. These never change for a given set of data. Xmin,Xmax, etc define the visible area. These are modifiied during zooming and are purely cosmetic.

 


dimani4 wrote:

When I zoom some area it gives me something different from what I expect to get.


You should learn how to ask efficiently. Attach a small example with some typical data in a diagram constant. Tell us what you get and tell us what you expect to get! In the above sentence "different" is not sufficient as a description, since both sides of the equation are undefined! 😉

Message 3 of 5
(2,276 Views)

first of all,

 

thanks to all of you for replies.

 

Deliver means-to give values or to send some values to the daqmx (that's what I've meant). Yes, I'll give some example to you.. it's not so easy.. As long as my system will be free I'll do some real scan and I'll put on "real" example (actually when I simulate the scan everything seems fine but when I scan something real I get problem).

 

thank you once again.

0 Kudos
Message 4 of 5
(2,274 Views)

Here's an example:

 

dx,dy = -0.0039
x0,y0= 0.5
npts=256,256

 

Zooming works just fine!

0 Kudos
Message 5 of 5
(2,271 Views)