[Kst] Re: Addition of sample on a specific range
netterfield at astro.utoronto.ca
Thu Mar 10 01:09:32 CET 2011
Are the data evenly sampled?
If so: (this is for kst2. kst1.x is similar).
When you read in the data (eg, data wizard page 3, or in the vector
dialog), you will see in the "Data Range" widget an option
"[ ] Read 1 sample per ________ frames [ ] Boxcar filter first"
If you select both of these, and set the number of frames to the
number of samples in an hour, then the data vector you read will be
sampled once per hour, and will contain the average over that period.
eg, if you sample the data once per second:
[ x ] Read 1 sample per _3600_ frames [ x ] Boxcar filter first
The resulting vector will contain the average for each hour, sampled
once per hour.
Then use an equation to multiply by the cost per kWhr to give the cost per hour.
If you want the integrated cost, you can use the Cumulative Sum filter
(in the plot->rmb->Filter->[Curvename] pulls up the filter dialog.
Then select "Cumulative sum". Set the value of your dX, and perhaps
chose to place the curve in a new plot).
If the data are not evenly sampled, it is going to be hard to deal with in kst.
On Mon, Mar 7, 2011 at 10:49 PM, <mathieu660r at gmail.com> wrote:
> I'm new here and I find KST a really great tool for fast and efficient
> plotting. I'm currently using some hardware to measure the real power of
> some lights. I can plot the power easily and I can get the power value on
> the y axis and the time on the x axis. My question is a little bit complex
> so I will try to explain the best as I can if you have questions please ask.
> So I want to add all the value of a time sample ( example : all the value
> during 60 minutes and do it for each 60 minutes) and multiply the total
> value by another value to get an approximation of the cost of electricity.
> Mathieu R.
> Kst mailing list
> Kst at kde.org
C. Barth Netterfield
University of Toronto
More information about the Kst