7.7.45. vmdas2uhdas.txtΒΆ

from pycurrents.adcp.vmdas import FakeUHDAS

# get the variables from /home/adcpproc/my_adcp_py3demos/adcp_pyproc/ps0918_vmdas/config/reform_defs_os75.py
fname = '/home/adcpproc/my_adcp_py3demos/adcp_pyproc/ps0918_vmdas/config/reform_defs_os75.py'
with open(fname) as f:
    code = compile(f.read(), fname, 'exec')
    exec(code)



dt_factor = 3   # median(dt) * dt_factor = when to break the files in to parts
                # 3   :   allows more variable ping rate (eg. if triggering)
                # 0.5 :   assumes fixed ping rate (might make lots of pieces)


# convert vmdas data to uhdas data
F = FakeUHDAS(yearbase=yearbase,
              sourcedir=vmdas_dir,
              destdir=uhdas_dir,
              sonar=adcp,
              dt_factor=dt_factor,
              navinfo=navinfo,
              ship=shipkey)
F()