In [9]:
import glob, os, sys
import datetime as dt
from matplotlib.dates import date2num, num2date
from calendar import monthrange
import h5py
import matplotlib.pylab as plt
# from modest_image import imshow
# import numpy as np   # already imported in zplsc_b

sys.path.append('/Users/wujung/code/mi-instrument/')
from mi.instrument.kut.ek60.ooicore.zplsc_b import *

In [10]:
from concat_raw import *

In [11]:
%matplotlib inline

In [32]:
pname = '/Volumes/wjlee_apl_3/ooi_zplsc_600m/'
mn = 8
dd = 24
files = glob.glob(os.path.join(pname,'OOI-D2017%02d%02d*.raw' % (mn,dd)))
h5_fname = '/Volumes/wjlee_apl_3/ooi_zplsc_all_h5/CE04OSPS_2017%02d%02d.h5' % (mn,dd)

In [33]:
h5_fname


Out[33]:
'/Volumes/wjlee_apl_3/ooi_zplsc_all_h5/CE04OSPS_20170824.h5'

In [34]:
files.sort(key=os.path.getmtime)

In [35]:
files


Out[35]:
['/Volumes/wjlee_apl_3/ooi_zplsc_600m/OOI-D20170824-T000000.raw',
 '/Volumes/wjlee_apl_3/ooi_zplsc_600m/OOI-D20170824-T013908.raw',
 '/Volumes/wjlee_apl_3/ooi_zplsc_600m/OOI-D20170824-T031809.raw',
 '/Volumes/wjlee_apl_3/ooi_zplsc_600m/OOI-D20170824-T045715.raw',
 '/Volumes/wjlee_apl_3/ooi_zplsc_600m/OOI-D20170824-T063616.raw',
 '/Volumes/wjlee_apl_3/ooi_zplsc_600m/OOI-D20170824-T081517.raw',
 '/Volumes/wjlee_apl_3/ooi_zplsc_600m/OOI-D20170824-T095422.raw',
 '/Volumes/wjlee_apl_3/ooi_zplsc_600m/OOI-D20170824-T113323.raw',
 '/Volumes/wjlee_apl_3/ooi_zplsc_600m/OOI-D20170824-T131226.raw',
 '/Volumes/wjlee_apl_3/ooi_zplsc_600m/OOI-D20170824-T145131.raw',
 '/Volumes/wjlee_apl_3/ooi_zplsc_600m/OOI-D20170824-T163032.raw',
 '/Volumes/wjlee_apl_3/ooi_zplsc_600m/OOI-D20170824-T180936.raw',
 '/Volumes/wjlee_apl_3/ooi_zplsc_600m/OOI-D20170824-T194838.raw',
 '/Volumes/wjlee_apl_3/ooi_zplsc_600m/OOI-D20170824-T212739.raw',
 '/Volumes/wjlee_apl_3/ooi_zplsc_600m/OOI-D20170824-T230640.raw']

In [36]:
for f in files:
    unpack_raw_to_h5(f,h5_fname,deci_len=[])


Processing: /Volumes/wjlee_apl_3/ooi_zplsc_600m/OOI-D20170824-T000000.raw
-- New H5 file, create new dataset...
Processing: /Volumes/wjlee_apl_3/ooi_zplsc_600m/OOI-D20170824-T013908.raw
-- H5 file exists, append new data mtx...
Processing: /Volumes/wjlee_apl_3/ooi_zplsc_600m/OOI-D20170824-T031809.raw
-- H5 file exists, append new data mtx...
Processing: /Volumes/wjlee_apl_3/ooi_zplsc_600m/OOI-D20170824-T045715.raw
-- H5 file exists, append new data mtx...
Processing: /Volumes/wjlee_apl_3/ooi_zplsc_600m/OOI-D20170824-T063616.raw
-- H5 file exists, append new data mtx...
Processing: /Volumes/wjlee_apl_3/ooi_zplsc_600m/OOI-D20170824-T081517.raw
-- H5 file exists, append new data mtx...
Processing: /Volumes/wjlee_apl_3/ooi_zplsc_600m/OOI-D20170824-T095422.raw
-- H5 file exists, append new data mtx...
Processing: /Volumes/wjlee_apl_3/ooi_zplsc_600m/OOI-D20170824-T113323.raw
-- H5 file exists, append new data mtx...
Processing: /Volumes/wjlee_apl_3/ooi_zplsc_600m/OOI-D20170824-T131226.raw
-- H5 file exists, append new data mtx...
Processing: /Volumes/wjlee_apl_3/ooi_zplsc_600m/OOI-D20170824-T145131.raw
-- H5 file exists, append new data mtx...
Processing: /Volumes/wjlee_apl_3/ooi_zplsc_600m/OOI-D20170824-T163032.raw
-- H5 file exists, append new data mtx...
Processing: /Volumes/wjlee_apl_3/ooi_zplsc_600m/OOI-D20170824-T180936.raw
-- H5 file exists, append new data mtx...
Processing: /Volumes/wjlee_apl_3/ooi_zplsc_600m/OOI-D20170824-T194838.raw
-- H5 file exists, append new data mtx...
Processing: /Volumes/wjlee_apl_3/ooi_zplsc_600m/OOI-D20170824-T212739.raw
-- H5 file exists, append new data mtx...
Processing: /Volumes/wjlee_apl_3/ooi_zplsc_600m/OOI-D20170824-T230640.raw
-- H5 file exists, append new data mtx...

In [ ]:


In [ ]:


In [ ]: