06-18-2014 02:35 AM
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
06-18-2014 10:39 AM
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
Regards,
Alex
06-18-2014 07:17 PM
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
06-18-2014 07:46 PM
I suspect that the problem is partly the data. I graphed the z data to see what was in the file:
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
06-18-2014 10:06 PM
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
06-20-2014 04:20 AM
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
06-20-2014 05:24 AM
@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:
Have you noticed those vertical gaps in your z data:
Have you tried to minimize those vertical gaps?
06-20-2014 06:24 AM
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
06-20-2014 01:41 PM
here it is
06-20-2014 01:49 PM
here you go