# IPython log file

import okeanidanalysis as oa
# Below is hotspot hirez data
fn= '/mnt/LRAUV/daphne/realtime/hotspotlogs/20140319T030952/hotspot-Normal_201403190314_201403191817.mat'
s=oa.logs.OkeanidLog(fn)

# And here is regular SBD data
sbd=oa.logs.OkeanidLog('/mnt/LRAUV/daphne/realtime/sbdlogs/2014/201403/20140319T030952/shore_201403190314_201403191817.mat')


#
#CHLOROPHYLL
#
idep = sbd.interpolate_timeseries('depth', chl_e)
chl, chl_e = sbd.timeseries('mass_concentration_of_chlorophyll_in_sea_water', return_epoch=True)
idep = sbd.interpolate_timeseries('depth', chl_e)
chl, chl_t = sbd.timeseries('mass_concentration_of_chlorophyll_in_sea_water')
figure();plt.scatter(chl_t, idep, c=chl, edgecolors='none')
figure();ax1 = subplot(1,2,1)
figure();ax1 = subplot(2,1,1)
ax2 = subplot(2,1,2)
ax1.scatter(chl_t, idep, c=chl, edgecolors='none', vmin=0 vmax=12)
ax1.scatter(chl_t, idep, c=chl, edgecolors='none', vmin=0, vmax=12)
chl, chl_t = s.timeseries('mass_concentration_of_chlorophyll_in_sea_water')
chl, chl_e = s.timeseries('mass_concentration_of_chlorophyll_in_sea_water', return_epoch=True)
idep = s.interpolate_timeseries('depth', chl_e)
ax2.scatter(chl_t, idep, c=chl, edgecolors='none', vmin=0, vmax=12)
draw()


#
#TEMP
#
tmp, tmp_e = sbd.timeseries('sea_water_temperature', return_epoch=True)
idep = sbd.interpolate_timeseries('depth', tmp_e)
tmp, tmp_t = sbd.timeseries('sea_water_temperature')
figure();plt.scatter(tmp_t, idep, color=tmp, edgecolors='none')
figure();ax1 = subplot(2,1,1)
ax2 = subplot(2,1,2, sharex=ax1)
ax1.scatter(tmp_t, idep, c=tmp, edgecolors='none', vmin=0, vmax=30)
tmp, tmp_t = s.timeseries('sea_water_temperature')
tmp, tmp_e = s.timeseries('sea_water_temperature', return_epoch=True)
idep = s.interpolate_timeseries('depth', tmp_e)
ax2.scatter(tmp_t, idep, c=tmp, edgecolors='none', vmin=0, vmax=30)
draw()



