Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
samplestream:lc_amount [2024/04/23 22:13] optrix |
samplestream:lc_amount [2024/04/25 23:43] (current) optrix |
||
---|---|---|---|
Line 5: | Line 5: | ||
===Description=== | ===Description=== | ||
- | This function is used to calculate a [[lagged | + | This function is used to calculate a [[data-driven lag|data-driven lag time]] based on a // |
- | Use this if the source of your lag is being **counted** or **totalised** instead of being measured as a **rate**. Note that in many industrial applications, | + | Use this if the source of your lag is being **counted** or **totalised** instead of being measured as a **rate**. Note that in many industrial applications, |
For example, you might have a conveyor system measuring how many meters you've moved. If Sensor X is 50m away from Sensor Y, you can calculate the //time lag// between Y and X by going backwards and finding out how long it took for 50m of conveyor to pass. | For example, you might have a conveyor system measuring how many meters you've moved. If Sensor X is 50m away from Sensor Y, you can calculate the //time lag// between Y and X by going backwards and finding out how long it took for 50m of conveyor to pass. | ||
Line 17: | Line 17: | ||
|query|string|The AQL Query to send| | |query|string|The AQL Query to send| | ||
|amount|float|The amount to lag the time by| | |amount|float|The amount to lag the time by| | ||
- | |origin|datetime|The ending/ | + | |origin|datetime|The ending/ |
|seconds|int|The maximum number of seconds to search (default=1 day)| | |seconds|int|The maximum number of seconds to search (default=1 day)| | ||
- | |expected|int|The average amount of time in normal operation| | + | |expected|int|The average amount of time in normal operation |
===Returns=== | ===Returns=== | ||
Line 35: | Line 35: | ||
<code python> | <code python> | ||
srv = ardiapi.Server(' | srv = ardiapi.Server(' | ||
- | query = "' | + | |
lc = samplestream.LagCorrection() | lc = samplestream.LagCorrection() | ||
- | diff = lc.Amount(srv, | + | diff = lc.Amount(srv, |
print(" | print(" | ||
</ | </ |