LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Electric field on intensity graph

Hi,

I have problem to display data sets of electric field (norm E) distribution on a intensity graph. The norm E was obtained from a cross sectional area of a pipeline with diameter of 50mm with the center at x,y (0,0). The normE distribution required to be displayed on 128 x128 pixels. Can anyone assists me  how to do the task?

 

Regards

Ledang

0 Kudos
Message 1 of 10
(3,338 Views)

hi Ledang,

 

I suggest the following:

 

1# get the xyz-data into labview e.g. via .csv

2# clip the first row which is containing the column's label

3# scale both the x and y data to a range from 0-128; scale the z data to a range from 0-255

4# initiate a stack with 128 rows x 128 columns

5# index the stack according to x and y; replace the indexed stack's default values with the scaled z values

6# display the resulting 2d array via an intensity graph

 

00.png

 

 

Regards,
Alex

 

0 Kudos
Message 2 of 10
(3,295 Views)

Hi Alex,

 

Thanks for the example.I had tried the example and the image produced is good at the boundary however many of the pixels particularly at the centre does not gives the correct value. Pls advice.

Thank you in advance.

 

Regards

Ledang

0 Kudos
Message 3 of 10
(3,281 Views)

I suspect that the problem is partly the data.  I graphed the z data to see what was in the file:

 

Z Data.png

 

Note that it looks as though some of the peaks are cut off at indexes 40000, 50000, and 60000. Why some of the amplitudes do not drop to zero in some regions may be a factor also.  I suspect that if you graphed this data with the same program which produced your "actual" image, it would be much like the LV image.

 

Lynn

0 Kudos
Message 4 of 10
(3,268 Views)

Hi Lynn,

 

Thanks for the reply.  I take your advice and study the data produced. I make adjstments on the contour level and the results as in attachment. The cut-off at peak has been eliminated however the data which not dropped to zero remains. I realised that image data in 128x128 pixels is not as good as the actual image but at least it can differentiate between the contours particularly at the center region. I really stuck at this part, and hoped to hear some advice from you. 

 

Regards

Ledang

0 Kudos
Message 5 of 10
(3,248 Views)

Hi,

 

I studied the data and I realised at coordinate (x,y) contains different electrical values. When I rounded the decimal point of x,y value I found the Z values are not the same.For example:

X                          Y                          X (rounded)            Y(rounded)                         Z

-49.76             -4.92                         -50                                -5                              0.07

-49.74             -5.05                         -50                                -5                              0.07

-49.71             -5.38                         -50                                -5                              0.14

 

This might be the problem when I tried to display the data on 128 x128 pixels. I am thinking a VI that able to make average values at  x,y coordinates. Based on example above the final result should be a average value at x,y coordinates.

X(rounded)                              Y(rounded)                          Z

-50                                                  -5                                (0.07+0.07+0.14)/3= 0.09

 

Can anyone help me how to create the VI?

 

Regards

Ledang

0 Kudos
Message 6 of 10
(3,205 Views)

@Ledang wrote:

Hi Alex,

 

Thanks for the example.I had tried the example and the image produced is good at the boundary however many of the pixels particularly at the centre does not gives the correct value. Pls advice.

Thank you in advance.

 

Regards

Ledang


you could reduce your image resolution from 128 to 32 and then do a bilinear interpolation with this 32x32 image to get a 128x128 image, like this:

http://forums.ni.com/t5/LabVIEW/Interpolating-pixels-in-the-Intensity-Graph/m-p/283031?view=by_date_...

 

0.PNG

 

 

Have you noticed those vertical  gaps in your z data:

1.PNG

 

 

 

2.PNG

 

 

Have you tried to minimize those vertical gaps?

0 Kudos
Message 7 of 10
(3,197 Views)

Hi Alex,

 

Thank you for the reply. Could you please share the VI with me? From there I will make some modifications. The gap between data on y-axis probably because of the step contour in the FEM software. I will response to you when I know the answer.

 

Regards

Fazlul 

0 Kudos
Message 8 of 10
(3,190 Views)
0 Kudos
Message 9 of 10
(3,155 Views)

here you go

0 Kudos
Message 10 of 10
(3,165 Views)