Archive
button.Archive (specify sampling period)
button instead.Archive (specify sampling period)
, you can additionally specify
.VAL
field is non-zero.Check Status
buttonXCOR*
and the archiver appliance will then display the status of all PV's that match the GLOB expression.
Note that the number of matched PV's can be quite large; for now, no attempt is made to restrict the number of entries in this particular request. This may change in the future based on user feedback.
http://archiver.slac.stanford.edu/retrieval
is the data_retrieval_url
element from your appliances.xml
/data/getData
is the path into the data retrieval servlet and is fixed..json
identifies the MIME-type of the returned data.pv
- This identifies the name of the PV for which data is requested.from
- This is the start time of the data in ISO 8601 format; specifically this format.to
- This is the end time of the data in the same format.fetchLatestMetadata
- If true, an extra call is made to the engine as part of the retrieval to get the latest values of the various fields (DESC, HIHI etc).retiredPVTemplate
- If specified, the archiving information (PVTypeInfo) for the PV specified in this parameter is used as a template for PVs that do not exist in the system.
This is intended principally for use with legacy PVs (PVs that no longer exist on the LAN and do not have a PVTypeInfo).
TEMPLATE:PV
is added to the system with one of its stores pointing to /arch/tape.retiredPVTemplate
argument.
For example,
http://archiver.slac.stanford.edu/retrieval/data/getData.json?pv=LEGACY:PV
&from=2012-09-27T08%3A00%3A00.000Z&to=2012-09-28T08%3A00%3A00.000Z&retiredPVTemplate=TEMPLATE:PV
.
LEGACY:PV
, it uses the PVTypeInfo for TEMPLATE:PV
to determine data stores for the LEGACY:PV
.LEGACY:PV
, the data in /arch/tape can be deleted.timeranges
- Get data for a sequence of time ranges. Time ranges are specified as a comma-separated list if ISO 8601 strings.donotchunk
- Use this to skip HTTP chunking of the response. This is meant for client that do not understand chunked responses.ca_count
- This is passed on to an external ChannelArchiver as the value of the count parameter in the archiver.values XMLRPC call. The limits the number of samples returned from the ChannelArchiver; id unspecified, this defaults to 100000. If this is too large, you may timeouts from the ChannelArchiver.ca_how
- This is passed on to an external ChannelArchiver as the value of the how parameter in the archiver.values XMLRPC call. This defaults to 0; that is, by default, we ask for raw data.seconds
- This is the Java epoch seconds of the EPICS record processing timestamp. The times are in UTC; so any conversion to local time needs to happen at the client. nanos
- This is the nano second value of the EPICS record processing timestamp.
import numpy as np
from chaco.shell import *
import urllib2
import json
req = urllib2.urlopen("http://archiver.slac.stanford.edu/retrieval/data/getData.json?pv=test%3Apv%3A123&donotchunk")
data = json.load(req)
secs = [x['secs'] for x in data[0]['data']]
vals = [x['val'] for x in data[0]['data']]
plot(secs, vals, "r-")
xscale('time')
show()
The EPICS archiver appliance has limited support for performing some processing on the data during data retrieval. For most scientific data processing purposes, a tool such as Matlab is a much better fit. To retrieve data within Matlab, please see the Matlab section.
To process the data during data retrieval, specify the operator during the call to getData
.
For example, to get the mean
of the PV test:pv:123
, ask for http://archiver.slac.stanford.edu/retrieval/data/getData.json?pv=mean(test%3Apv%3A123)
.
This mechanism should work within the ArchiveViewer as well.
That is, if you plot mean(test:pv:123)
in the ArchiveViewer, the EPICS archiver appliance applies the mean
operator to the data for PV test:pv:123
before returning it to the client.
To plot test:pv:123
with the mean_3600
operator in the ArchiveViewer, plot mean_3600(test:pv:123)
.
mean_3600
operator bins the data into bins that are 3600 seconds wide.
The default binning interval is 900 seconds (15 minutes).
The binning is done using the integer division operator.
Two samples belong to the same bin if the quotient of the sample's epoch seconds after integer division by the binning interval is the same.
For example, in the case of mean_3600
, two samples S1
and S2
belong to the same bin if
S1.epochSeconds/3600 = S2.epochSeconds/3600
where /
represents the quotient after integer division.
Samples belonging to the same bin are gathered together and sent thru various statistics operators.
Operator | Desc |
---|---|
firstSample | Returns the first sample in a bin. This is the default sparsification operator. |
lastSample | Returns the last sample in a bin. |
firstFill | Similar to the firstSample operator with the exception that we alter the timestamp to the middle of the bin and copy over the previous bin's value if a bin does not have any samples. |
lastFill | Similar to the firstFill operator with the exception that we use the last sample in the bin. |
mean | Returns the average value of a bin. This is computed using SummaryStatistics and is SummaryStatistics.getMean() |
min | Returns the minimum value in a bin. This is computed using SummaryStatistics and is SummaryStatistics.getMin() |
max | Returns the maximum value in a bin. This is computed using SummaryStatistics and is SummaryStatistics.getMax() |
count | Returns the number of samples in a bin. This is computed using SummaryStatistics and is SummaryStatistics.getN() |
ncount | Returns the total number of samples in a selected time span. |
nth | Returns every n-th value.. |
median | Returns the median value of a bin. This is computed using DescriptiveStatistics and is DescriptiveStatistics.getPercentile(50) |
std | Returns the standard deviation of a bin. This is computed using SummaryStatistics and is SummaryStatistics.getStandardDeviation() |
jitter | Returns the jitter (the standard deviation divided by the mean) of a bin. This is computed using SummaryStatistics and is SummaryStatistics.getStandardDeviation()/SummaryStatistics.getMean() |
ignoreflyers | Ignores data that is more than the specified amount of std deviation from the mean in the bin. This is computed using SummaryStatistics. It takes two arguments, the binning interval and the number of standard deviations (by default, 3.0). It filters the data and returns only those values which satisfy Math.abs(val - SummaryStatistics.getMean()) <= numDeviations*SummaryStatistics.getStandardDeviation() |
flyers | Opposite of ignoreflyers - only returns data that is more than the specified amount of std deviation from the mean in the bin. |
variance | Returns the variance of a bin. This is computed using SummaryStatistics and is SummaryStatistics.getVariance() |
popvariance | Returns the population variance of a bin. This is computed using SummaryStatistics and is SummaryStatistics.getPopulationVariance() |
kurtosis | Returns the kurtosis of a bin - Kurtosis is a measure of the peakedness. This is computed using DescriptiveStatistics and is DescriptiveStatistics.getKurtosis() |
skewness | Returns the skewness of a bin - Skewness is a measure of the asymmetry. This is computed using DescriptiveStatistics and is DescriptiveStatistics.getSkewness() |
1991-01-01T00:00:00.000Z
XML
configuration files, click on the Choose Files
button, select any number of ChannelArchiver XML
configuration files and press Upload
.
The DTD
for the ChannelArchiver XML
file can be found in the ChannelArchiver documentation or in the ChannelArchiver source distribution.
XML-RPC
data servers, add the URL to the XML-RPC
data server using the Add
button.
The EPICS Archiver Appliance uses the archiver.names
method to determine the PVs that are hosted by the ChannelArchiver XML-RPC
data server and adds this server as a data source for these PVs.