4.3.3.2.2. Using Python to read single-ping ADCP dataΒΆ
Multiread read single-ping ADCP data
access to single-ping ADCP data
- ancillary data (heading, navigation) depends on data type:
UHDAS *.raw, VmDAS ENR (beam coordinates, no navigation)
VmDAS *.ENS (beam coordinates, NO navigation)
VmDAS *.ENX (earth coordinates, with navigation)
VmDAS *.STA, *.LTA (earth coordinates, with navigation, averaged)
From within an ipython session or a python program:
from pycurrents.adcp.rdiraw import Multiread
m=Multiread(filelist_or_wildcard, instrument)
data=m.read(args)
where
filelist_or_wildcard
isa string with a wildcard representation of the files, eg
'/home/data/current_cruise/raw/wh300/*.raw'
a string with a single file, or a list of files obtained in some manner
instrument
is a 2-letter string representing the instrument:'nb', 'os', 'wh'
example:
from pycurrents.adcp.rdiraw import Multiread
m=Multiread('km2013_331*.raw','os')
data=m.read(step=30)
example:
from pycurrents.adcp.rdiraw import Multiread
m=Multiread('*.LTA','os')
data=m.read()
To read a single UHDAS file and get ocean currents, try uhdasfile
.
This module requires that the complete UHDAS cruise directory be intact.
It uses the raw file to infer where the gbins are, and creates
ocean velocities using the positions and heading that were specified
during the original processing. These velocities use the heading from
the reliable (put possibly inaccurate) device so shears should be fine but
the velocities may have errors. This is the python equivalent of
get_xfraw.m
in matlab. It only works for modern datasets collected
(or reprocessed) with Python CODAS.
example:
from pycurrents.adcp import reader
data=reader.uhdasfile('raw/os75/tt2013_115_36000.raw',
inst='os',
h_align=58.9)