Was this page helpful?

How do I access a particular scan?

From $1

    Table of contents
    No headers

    Once you have used the player to open an archive and have played through the learning phase, you can seek to scans:

    • seek to a particular scan in the current segment of an archive:

    seek.scan(RSS$source, 0, 30)    ## seek to the 30th scan of current segment in current archive rss.process.one.scan()          ## process the scan we just seeked to, updating RSS$scan.mat etc.
    seek.scan(RSS$source, 3, 1)     ## seek to the first scan of the 3rd segment in the current archive

    • determine the timestamp of the currently displayed scan:

    RSS$timestamp                    ## printed in the local timezone
    format(RSS$timestamp, tz="GMT")  ## printed in GMT
    as.numeric(RSS$timestamp)        ## numeric timestamp: seconds since Midnight Dec. 31 1969 GMT

    • seek to a particular time in the current archive:

    date <- "2006 Mar 06 20:11:00"       ## the desired ime as formatted in the plot window title
    ## make a numeric timestamp from the string above; the timezone is supplied explicitly:
    ts <- as.numeric(as.POSIXct(strptime(date, format=GUI$plot.title.date.format, tz="GMT")))
    seek.time(RSS$source, ts)            ## seek to the time
    rss.process.one.scan()               ## process the scan
    seek.time(RSS$source, as.numeric(RSS$timestamp + 3600))  ## seek an hour forward from current scan

    BUG:  the GUI player slider position will not reflect seeks done via script.

    Was this page helpful?
    Tags: (Edit tags)
    • No tags
     
    Comments (0)

     
    Powered by MindTouch Core