07-16-2015 03:59 PM
Hello everyone,
I am trying to filter through a data set, acquiring only the files that meet the users conditions.
I am asking the user to input three different values, one for a start frequency another for a end frequency and also a value for power handling.
The way that I am filtering through this data set right now is by utilizing a function called the match regular expression function as well as the scan from string function to break up the filename as well as take away the numeric data, then compare that data to the users inputs.
These values that meet the conditional statment will then be passed to a results ring for a user to go through.
Right now I fill there isn't much functionality in this method the user has to be very careful in how he or she saves the files so my program can work properly.
I am ataching a picture of that portion of the program.
Thanks for the help.
Solved! Go to Solution.
07-17-2015 10:43 AM
So are you currently storing the three user parameters in the file name? If so, the method you're using is just fine. Though instead of asking users to specify these filenames manually, you could programmatically generate the file names based on the parameters used when the data is originally acquired and saved to disk.
If you want to remove the need for adding parameter values to the file name, maybe you could add the parameter values to the beginning of each file, then filter baed on reading that data.
07-17-2015 11:21 AM
I'm not an expert on this, but I believe that the TDMS file structure allows you to "parameterize" your files by criteria such as you describe, allowing you to run routines that will show you the various choices and allow you to select (in a natural way) the files you want, create reports based on those files, combine the data in various ways, etc. Check out NI's TDMS White Paper and see if this would be helpful.
Bob Schor
07-17-2015 12:00 PM
Yes so currently I am storing the user parameters in the filename. Which looks something like this, Antennas_1000MHZ_180000MHZ_50Watts, I think I'm going to have to stick with making the user enter those parameters manually, I am trying to build a dataset of a whole buntch of s-parameters for equipment utilizing a Vector network analyzer, and the frequencies at which the equipment opperates isn't what is actually being recorded.
I also didn't understand the second statement you made, would you mind ellaborating, I will try doing anything if it wil increase the functinality as far as naming convensions are concerned.
07-17-2015 04:11 PM
I think my second statement was to check out an NI White Paper on TDMS. Did you notice the color? It was a clickable link. If you read the material there, it should clear up any confusion in the earlier part of my post.
I have a colleague who, like you, encodes parameters of the study in the (very long) string of the file name. I always yell at him about this, as it requires him to (as you are contemplating doing) build routines to (a) parse the names (to recover the information hidden in them), (b) organize the data in some form of "LabVIEW Database", and then (c) figure out how (in LabVIEW) to write "queries" against this Database. Plus the filenames aren't particularly easy for a human to read, are exceedingly long, and invite further mischief (have you thought about putting your files in folders that are similarly "file-information-coded"? Gets even more messy faster).
You might think "Oh, it's too late to make a change, I've already got all this data", but what good is it if you can't easily analyze it, group it, sort it, etc.?
Bob Schor
07-18-2015 07:26 AM
07-18-2015 08:55 AM
07-20-2015 01:39 PM
Thanks for the info, I'll have to take a look at the information you posted, it seems to me though using a database software would be the way to go.
The only unfortunate thing is I am a summer intern, and there are some requirements and constraints that my program must meet, my superiors are more worried solving the challenge set by those guidlines instead of actual usability. I ran the using a database idea by them, i'm not all to familiar with databases myself, and they said no,followed by we could have had you use other methods that would make the program easier and more effective but they are looking for me to take away something more from the experience. Whatever that means "sarcastic voice"