@@ -33,34 +33,31 @@ and then,
3333from pathlib import Path
3434import ctd
3535
36- path = Path(' tests' , ' data' , ' CTD' )
37- fname = path.joinpath(' g01l06s01.cnv.gz' )
36+ path = Path(" tests" , " data" , " CTD" )
37+ fname = path.joinpath(" g01l06s01.cnv.gz" )
3838
3939down, up = ctd.from_cnv(fname).split()
40- ax = down[' t090C' ].plot_cast()
40+ ax = down[" t090C" ].plot_cast()
4141```
4242
4343![ Bad Processing] ( https://raw.githubusercontent.com/pyoceans/python-ctd/main/docs/readme_01.png )
4444
4545We can do [ better] ( https://www.go-ship.org/Manual/McTaggart_et_al_CTD.pdf ) :
4646
4747``` python
48- temperature = down[' t090C' ]
48+ temperature = down[" t090C" ]
4949
5050fig, ax = plt.subplots(figsize = (5.5 , 6 ))
5151temperature.plot_cast(ax = ax)
52- temperature.remove_above_water()\
53- .despike()\
54- .lp_filter()\
55- .press_check()\
56- .interpolate(method = ' index' ,
57- limit_direction = ' both' ,
58- limit_area = ' inside' )\
59- .bindata(delta = 1 , method = ' interpolate' )\
60- .smooth(window_len = 21 , window = ' hanning' ) \
61- .plot_cast(ax = ax)
62- ax.set_ylabel(' Pressure (dbar)' )
63- ax.set_xlabel(' Temperature (°C)' )
52+ temperature.remove_above_water().despike().lp_filter().press_check().interpolate(
53+ method = " index" , limit_direction = " both" , limit_area = " inside"
54+ ).bindata(delta = 1 , method = " interpolate" ).smooth(
55+ window_len = 21 , window = " hanning"
56+ ).plot_cast(
57+ ax = ax
58+ )
59+ ax.set_ylabel(" Pressure (dbar)" )
60+ ax.set_xlabel(" Temperature (°C)" )
6461```
6562
6663![ Good Processing] ( https://raw.githubusercontent.com/pyoceans/python-ctd/main/docs/readme_02.png )
0 commit comments