Was this page helpful?

How do I process a bunch of scans?

From $1

    Table of contents
    No headers

    Scenario:  there are features of interest on a scan 15 minutes into an archive, and you want to do some calculations there based on the same cumulative statistics that radR uses.

    Open an archive and set it to be the radR source:

    p <- SEASCANARCH$get.ports()[[1]]
    config(p, filename="c:/usr/data/seascan/Myarchive.dat")
    RSS$source <- p

    Restart learning mode:


    Process the first scan:


    Determine the timestamp to which you want to get:

    ts <- RSS$timestamp + 15 * 60    ## here we add 15 minutes to the timestamp of the first scan

    or specify it as a date and convert it to a numeric timestamp:

    date <- "2006 Mar 06 20:11:00 GMT"   ## the desired ime as formatted in the plot window title
    ts <- as.POSIXct(strptime(date, format=GUI$plot.title.date.format))

    Process scans until you arrive at the destination:

    while (RSS$timestamp < ts)  rss.process.one.scan(update.stats = TRUE)

    Note: instead, you can get very similar results by skipping all but a few minutes worth of data before the scan of interest:

    seek.time(RSS$source, ts - 3 * 60)
    while (RSS$timestamp < ts)  rss.process.one.scan(update.stats = TRUE)


    If you want to plot the data as you go, do it like this:

    while (RSS$timestamp < ts) {
        rss.process.one.scan(update.stats = TRUE, convert.scan = TRUE)

    Data for the first scan with timestamp equal to or later than ts is now available in RSS$scan.mat, RSS$mean.mat, etc.

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

    Powered by MindTouch Core