GatherSamples

This is a function of the samplestream class.

Description

This function retrieves samples for specific times.

The most common use for this function is to request training data for training or testing AI - in particular those AIs that are used for event detection or categorisation, which will often want individual 'snapshots' of particular moments.

Parameters

ParameterTypeMeaning
timeslist of datetimesThe UTC dates and times for each sample

Returns

A list of samples - one for each requested time-frame.

Example

    srv = ardiapi.Server("demo.optrix.com.au/s/ex")
    smp = samplestream.samplestream(srv,"'Wind Turbine #1' ASSET 'Power' PROPERTY",30,30,15)
 
    datesneeded = [ datetime.datetime.now() - datetime.timedelta(seconds=200) ]
    samples = smp.GatherSamples(datesneeded)