readData.gdf: readData.gdf

View source: R/readData.gdf.R

readData.gdfR Documentation

readData.gdf

Description

Read gdf data files

Usage

readData.gdf( files , n=1e6 , istart=1 , bigEndian=TRUE )

Arguments

files

A vector of data file names. The files are read in the same order in which they are in the vector.

n

Number of samples to read from each file, the vector is repeated as necessary to match its length with the "files" vector

istart

Indices from which to start the reading in each file, repeated as necesary to mathc its length with the "files" vector.

bigEndian

Logical telling whether the files are in big endian (default) or little endian format.

Value

A list with the following entries:

'cdata'

A vector of complex data values.

'idatar'

Lowest bit in real part of the data. Should contain the PPS bits in radar measurements.

'idatai'

Lowest bit in imaginary part of the data. Should contain the TX bits in radar measurements.

'ndata'

Total number of data points read. This is always the sum of the number of samples *intended* to be read from each file. If n is larger than file length for any of the input files, vectors cdata, idatar, and idatai will contain arbitrary values correspondingly.

'success'

A logical indicating whether ndata points were successfully read ( success = TRUE ), or not ( success = FALSE ). e.g. any (n + istart - 1) larger than file length will lead to success=FALSE.

Author(s)

Ilkka Virtanen (University of Oulu, Finland)
ilkka.i.virtanen@oulu.fi

Examples



## Not run: 

  # read all data from file "file1.gdf"
  d <- readData.gdf( files = "file1.gdf" , n = file.info( "file1.gdf" )$size / 4 )

  # read samples 1001 ... 10000 from "file1.gdf", samples 1 ... 10000 from
  # "file2.gdf", and samples 1 ... 200 from "file3.gdf".
  d <- readData.gdf( files = c( "file1.gdf" , "file2.gdf" , "file3.gdf" ) ,
                         n = c( 9000 , 10000, 200 ) ,
                    istart = c( 1001 , 1 , 1) )

## End(Not run)

ilkkavir/LPI.gdf documentation built on April 12, 2025, 12:58 p.m.