|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
X-axis time scale to match sample rateI have an application where I log data multiple times per second.
Each line in the data file contains variable data only (i.e. no time data is recorded). Time data is not needed as I know the test start time and the sample rate. When I read a data file into KST I use the option to "interpret INDEX as INDEX". I then plot the variable data (y-axis) against the index value (x-axis). I would like to be able to plot test data on a time scale rather than an index scale. I cannot see an option to enter the sample rate. What is the recommended procedure for doing this? Regards, Ben _______________________________________________ Kst mailing list Kst@... https://mail.kde.org/mailman/listinfo/kst |
|
|
Re: X-axis time scale to match sample rateHi Ben,
There is no simple way but the following works well. The basic idea is to create a equation that scales the INDEX vector by the desired sample rate and then plots the y-vector against this. * Read in the data as usual * Create a new equation: Data...New Equation... * In the "New equation" dialog enter the following in the "Equation" field: [INDEX]*<scale> where <scale> is the desired sample rate (e.g. [INDEX]*5.0) * Select "Do not place in any plot" and hit "OK" * Create a new curve: Data... New Curve... * For the "X axis vector" select the output of the new equation: "INDEX*<scale>/sv" (note that it is /sv and NOT /xsv) For the "Y axis vector" select your usual y-axis vector * Click "OK" This should produce the desired result. Andrew ----- Original Message ----- From: "Ben Lewis" <ben.lewis@...> To: <kst@...> Sent: Tuesday, October 13, 2009 7:57 PM Subject: [Kst] X-axis time scale to match sample rate >I have an application where I log data multiple times per second. > > Each line in the data file contains variable data only (i.e. no time > data is recorded). Time data is not needed as I know the test start > time and the sample rate. > > When I read a data file into KST I use the option to "interpret INDEX as > INDEX". I then plot the variable data (y-axis) against the index value > (x-axis). > > I would like to be able to plot test data on a time scale rather than an > index scale. I cannot see an option to enter the sample rate. What is > the recommended procedure for doing this? > > Regards, Ben > > _______________________________________________ > Kst mailing list > Kst@... > https://mail.kde.org/mailman/listinfo/kst > _______________________________________________ Kst mailing list Kst@... https://mail.kde.org/mailman/listinfo/kst |
|
|
Re: X-axis time scale to match sample rateHi Andrew,
Thanks for your help. Your instructions worked perfectly. Regards, Ben Andrew Walker wrote: > Hi Ben, > > There is no simple way but the following works well. > The basic idea is to create a equation that scales the INDEX vector by > the desired sample rate and then plots the y-vector against this. > > * Read in the data as usual > * Create a new equation: Data...New Equation... > * In the "New equation" dialog enter the following in the "Equation" > field: > [INDEX]*<scale> > where <scale> is the desired sample rate (e.g. [INDEX]*5.0) > * Select "Do not place in any plot" and hit "OK" > * Create a new curve: Data... New Curve... > * For the "X axis vector" select the output of the new equation: > "INDEX*<scale>/sv" (note that it is /sv and NOT /xsv) > For the "Y axis vector" select your usual y-axis vector > * Click "OK" > > This should produce the desired result. > > Andrew > > ----- Original Message ----- From: "Ben Lewis" > <ben.lewis@...> > To: <kst@...> > Sent: Tuesday, October 13, 2009 7:57 PM > Subject: [Kst] X-axis time scale to match sample rate > > >> I have an application where I log data multiple times per second. >> >> Each line in the data file contains variable data only (i.e. no time >> data is recorded). Time data is not needed as I know the test start >> time and the sample rate. >> >> When I read a data file into KST I use the option to "interpret INDEX as >> INDEX". I then plot the variable data (y-axis) against the index value >> (x-axis). >> >> I would like to be able to plot test data on a time scale rather than an >> index scale. I cannot see an option to enter the sample rate. What is >> the recommended procedure for doing this? >> >> Regards, Ben >> >> _______________________________________________ >> Kst mailing list >> Kst@... >> https://mail.kde.org/mailman/listinfo/kst >> > > Kst mailing list Kst@... https://mail.kde.org/mailman/listinfo/kst |
|
|
Re: X-axis time scale to match sample rateI just want to add that using the "edit multiple" functionality it is a
breeze to change the X-axis vector of all curves (or a subset) at once. Nicolas > Hi Ben, > > There is no simple way but the following works well. > The basic idea is to create a equation that scales the INDEX vector by the > desired sample rate and then plots the y-vector against this. > > * Read in the data as usual > * Create a new equation: Data...New Equation... > * In the "New equation" dialog enter the following in the "Equation" > field: > [INDEX]*<scale> > where <scale> is the desired sample rate (e.g. [INDEX]*5.0) > * Select "Do not place in any plot" and hit "OK" > * Create a new curve: Data... New Curve... > * For the "X axis vector" select the output of the new equation: > "INDEX*<scale>/sv" (note that it is /sv and NOT /xsv) > For the "Y axis vector" select your usual y-axis vector > * Click "OK" > > This should produce the desired result. > > Andrew Kst mailing list Kst@... https://mail.kde.org/mailman/listinfo/kst |
| Free embeddable forum powered by Nabble | Forum Help |