from medsrtqc.vms import read_vms_profiles
from medsrtqc.resources import resource_path
from medsrtqc.interactive import plot
from medsrtqc.qc.flag import Flag
from medsrtqc.qc.named_tests import PressureIncreasingTest
profs = read_vms_profiles(resource_path('BINARY_VMS.DAT'))
test = PressureIncreasingTest()
prof = profs[0]
test.run(prof)
import matplotlib.pyplot as plt
fig, axs = plot(prof, vars=('PRES', 'TEMP', 'PSAL'))
for i, var in enumerate(('PRES', 'TEMP', 'PSAL')):
t = prof[var]
bad = t.qc == Flag.BAD
plt.subplot(2, 2, i + 1).scatter(t.value[bad], t.pres[bad])
See here: