07-22-2014 01:32 PM
@reggie2016 wrote:
I dont know how to do any of this.
What is "this"? We cannot tell which post you are replying to.
07-22-2014 01:33 PM
07-23-2014 11:39 PM
Hi,
I investigated your program a little more thoroughly. Here is what it appears to be trying to do. There are three files. A TDMS file, containing the readout of 81 different analog input channels from some experiment. Each channel has ~4000 points, so a (81 x 4000) data set. There is a calibration file with offset and multipliers for each channel (81 x 2). This file appears to have been copied off a webpage and needed to have the spaces replaced with tabs, and the header removed in order to load correctly with read from spreadsheet file. There is a locations file with an index column, x and y coordinate columns and two additional unused columns. Note the x and y coordinates are all multiples of 0.5 and (0.5 <= x <= 7) and (0.5 <= y <= 3). These locations are naturally gridded with a size of (14 x 6) which is 84 locations, but three are missing (5, 0.5), (7, 0.5) and (7, 3).
The purpose of the program appears to be to display each of the 4000 times successively so as to create a movie, where the 81 channels are plotted in a grid. I know you mentioned (9 x 9). One immediate problem not associated with the intensity graph, is that only the first channel was being read in 81 times instead of reading in 81 channels. The calibration/derivative sub-vi was also not indexed, so only first calibration factor was read in, but they're all the same in the file you posted anyway. In the rearrange sub-vi, you tried to take the locations and normalize them to 1, essentially scaling them to a (1 x 1) square, then scale the square up to a user settable size (9 x 9), then use these locations to rearrange the 81 channel data for the current time-frame into an array. This would work, if you stuck to the natural grid of the data (14 x 6), but if you want to stretch the data to be square then this technique fails. In that case, you need to treat the data as non-gridded, and interpolate it to the grid you want. Labview provides the Interpolate 2D Scattered vi to perform this function. Since you're displaying the data in an intensity graph, ultimately the aspect ratio is determined by how you stretch the graph on the front panel and not what grid you plot it on. You can create a (14 x 6) grid and plot it into an intensity graph that's square and it's no different than interpolating to (9 x 9), except in the first case you have more rectangular pixels and there is no loss in data. Interpolation opens up new options though since you can interpolate to higher or lower resolution.
Attached is your program with the interpolation added in the rearrange vi and with some of the other issues fixed. You can see a transition in the data ever few hundred frames as it plays. Hopefully this is what you were looking for!
07-25-2014 09:38 AM
This is what i wanted but i have some questions. When i run the program i only see one box but the color never changes. do i need to use the text files for the calibration file and electrode location or can i still use mine. this is all i see when i run the program. there is no error just the name of an old file.
07-25-2014 09:42 AM
Why does it autoscale to -11.48 every time my values dont reach over -.003.
07-25-2014 09:57 AM
Nevermind i forgot to put on derivative thank you very much.
07-25-2014 03:22 PM
I guess i have one more question is the electrodes in order on the graph.Do you count from left to right going up or do you count left to right going down. do you count from top to bottum going left to right or bottum to top left to right. Just so i will know which electrode is which.
07-25-2014 05:41 PM
It goes from left to right, bottom to top.