View functions

RSKplotdata

RSKplotdata(RSK)

RSKplotdata - Plot a time series of logger data.

Syntax:

[OPTIONS] = RSKplotdata(RSK, [OPTIONS])

Generates a plot displaying the logger data as a time series. If data field has been arranged as profiles (using RSKreadprofiles), then RSKplotdata will plot a time series of a (user selectable) profile upcast or downcast. When a particular profile is chosen, but not a cast direction, the function will plot the first direction (downcast or upcast) of the profile only. It also allows plotting cast direction (using start and end time from profile field) as patches on top of the time series to double check if the profile detection algorithm is working properly.

Inputs:

Required:

  • RSK – Structure containing the logger metadata and data.

Optional:

  • channel – Longname of channel to plot, can be multiple in a cell, if no value is given it will plot all channels.

  • profile – Profile number. Default is 1.

  • direction – ‘up’ for upcast, ‘down’ for downcast. Default is the first string in RSK.profiles.order; the first cast.

  • showcast – Show cast direction when set as true. Default is false. It is recommended to show the cast direction patch for time series data only. This argument will not work when pressure and sea pressure channels are not available.

  • schedules – schedule(s) to plot. Default is ‘all’. Can be ‘all’, ‘default’, a label string, a flat cell array of labels to apply to all plotted channels, or a per-channel cell array such as {{‘wave’},{‘wave’,’continuous’}}. Here ‘default’ is the reserved generic default selector, not a literal label: it resolves to the schedule with the most non-NaN Conductivity samples, then Temperature, then schedule 1.

  • showLegend – toggle the profile/cast-direction legend on and off. Default is true.

Outputs:

Optional:

  • handles – Line object of the plot.

  • axes – Axes object of the plot.

Example:

rsk = RSKopen('sample.rsk');
rsk = RSKreaddata(rsk);
handles = RSKplotdata(rsk);

-OR-

handles = RSKplotdata(rsk, 'channel', {'Temperature', 'Conductivity'})

-OR-

handles = RSKplotdata(rsk, 'channel', 'Pressure', 'showcast', true);

See also:

RSKreadprofiles(), RSKplotprofiles(), RSKplotdownsample().

RSKplotprofiles

RSKplotprofiles(RSK)

RSKplotprofiles - Plot summaries of logger data as profiles.

Syntax:

[OPTIONS] = RSKplotprofiles(RSK, [OPTIONS])

Plots profiles from automatically detected casts. The default is to plot all the casts of all channels available (excluding pressure, sea pressure and depth) against sea pressure, or optionally, depth or pressure. Optionally outputs a matrix of handles to the line objects.

Inputs:

Required:

  • RSK – Structure containing the logger metadata and data.

Optional:

  • channel – Variables to plot (e.g., temperature, salinity, etc). Default is all channel (excluding pressure and sea pressure).

  • profile – Profile number to plot. Default is to plot all detected profiles.

  • direction – ‘up’ for upcast, ‘down’ for downcast or ‘both’. Default is to use all directions available. When choosing ‘both’, downcasts are plotted with solid lines and upcasts are plotted with dashed lines.

  • reference – Channel plotted on the y axis for each subplot. Default is sea pressure, option for depth or pressure.

  • schedules – schedule(s) to plot. Default is ‘all’. Can be ‘all’, ‘default’, a label string, a flat cell array of labels to apply to all plotted channels, or a per-channel cell array such as {{‘wave’},{‘wave’,’continuous’}}. Here ‘default’ is the reserved generic default selector, not a literal label: it resolves to the schedule with the most non-NaN Conductivity samples, then Temperature, then schedule 1.

  • referenceThreshold – points with reference-channel (yaxis) values below this threshold won’t be plotted. Can be used to filter out the surface layer.

  • showLegend – toggle the upcast/downcast legend on and off. Default is true.

Outputs:

Optional:

  • handles – Line object of the plot.

  • axes – Axes object of the plot.

Example:

rsk = RSKopen('profiles.rsk');
rsk = RSKreadprofiles(rsk, 'direction', 'down');
% plot selective downcasts and output handles for customization
hdls = RSKplotprofiles(rsk, 'channel', {'Conductivity', 'Temperature'}, 'profile', [1 5 10]);

See also:

RSKreadprofiles(), RSKreaddata().

RSKplotTS

RSKplotTS(RSK)
RSKplotTS - Plot a TS diagram in terms of Practical Salinity and

Potential Temperature.

Syntax:

[handles] = RSKplotTS(RSK, [OPTIONS])

Plots potential temperature vs. Practical Salinity using 0 dbar as a reference. Potential density anomaly contours are drawn automatically. Uses functions included in the TEOS-10 GSW toolbox (http://www.teos-10.org/software.htm#1). When RSK input contains no profiles, it will be considered as time series data and be plotted with gradually changing color based on date. Otherwise, it will be considered as multiple profiles and be plotted with different colors for all profiles.

Note: Absolute Salinity is computed in order to calculate potential temperature and potential density. Here it is assumed that the Absolute Salinity (SA) anomaly is zero, which means that SA = SR (Reference Salinity). This is probably the best approach near the coast (see http://www.teos-10.org/pubs/TEOS-10_Primer.pdf).

Inputs:

Required:

  • RSK – Structure containing the logger metadata and data.

Optional:

  • profile – Profile number to plot. Default is to plot all detected profiles.

  • direction – ‘up’ for upcast, ‘down’ for downcast or ‘both’. Default is to use all directions available.

  • isopycnal – number of isopycnals to show on the plot, or a vector containing desired isopycnals. Default is 5.

  • schedule – schedule to plot. Default is ‘default’, which is the reserved generic default selector (not a literal label): it resolves to the schedule with the most non-NaN Conductivity samples, then Temperature, then schedule 1. RSKplotTS can only plot one schedule at a time. Can also be a label string.

  • pressureThreshold – points with sea pressure value below this threshold won’t be plotted. Can be used to filter out the surface layer.

  • showLegend – toggle the cast legend on and off. Default is true.

Outputs:

  • handles – Line object of the plot.

Example:

rsk = RSKopen('profiles.rsk');
rsk = RSKreadprofiles(rsk, 'direction', 'down');
rsk = RSKderivesalinity(RSK);
% plot selective downcasts and output handles for customization
hdls = RSKplotTS(rsk, 'profile', [1 5 10], 'isopycnal', 10);

or

hdls = RSKplotTS(rsk, 'isopycnal', (22:0.5:25));

See also:

RSKderivesalinity(), RSKplotprofiles().

RSKimages

RSKimages(RSK)

RSKimages - Plot profiles in a 2D plot.

Syntax:

[OPTIONS] = RSKimages(RSK, [OPTIONS])

Generates a plot of the profiles over time. The x-axis is time; the y-axis is a reference channel. All data elements must have identical reference channel samples. Use RSKbinaverage.m to achieve this. The function calls RSKgenerate2D to generate data for visualisation and store it in RSK.im field. User could make RSK an output if one prefers to alter the data in their own way.

Note: If installed, RSKimages will use the perceptually uniform

oceanographic colourmaps in the cmocean toolbox: https://www.mathworks.com/matlabcentral/fileexchange/57773-cmocean-perceptually-uniform-colormaps

http://dx.doi.org/10.5670/oceanog.2016.66

Inputs:

Required:

  • RSK – Structure, with profiles as read using RSKreadprofiles.

Optional:

  • channel – Longname of channel to plot, can be multiple in a cell, if no value is given it will plot all channels.

  • profile – Profile numbers to plot. Default is to use all available profiles.

  • direction – ‘up’ for upcast, ‘down’ for downcast. Default is down.

  • reference – Channel that will be plotted as y. Default ‘Sea Pressure’, can be any other channel.

  • showgap – Plotting with interpolated profiles onto a regular time grid, so that gaps between each profile can be shown when set as true. Default is false.

  • threshold – Time threshold in seconds to determine the maximum gap length shown on the plot. Any gap smaller than the threshold will not show.

  • schedule – Schedule to plot. Default is ‘default’. Can be ‘default’ or a label string. Here ‘default’ is the reserved generic default selector, not a literal label: it resolves to the schedule with the most non-NaN Conductivity samples, then Temperature, then schedule 1.

Outputs:

Optional:

  • handles – Image handles object created, use to set properties

  • axes – Axes object of the plot.

  • RSK – Structure, with RSK.im field containing data for 2D visualisation.

Example:

handles = RSKimages(rsk,'direction','down');

OR

[handles, axes, rsk] = RSKimages(rsk,'channel',{'Temperature','Conductivity'},'direction','down','showgap',true,'threshold',600);

See also:

RSKbinaverage(), RSKgenerate2D().

RSKgenerate2D

RSKgenerate2D(RSK)

RSKgenerate2D - Generate data for 2D plot by RSKimages.

Syntax:

RSK = RSKgenerate2D(RSK, [OPTIONS])

Arranges a series of profiles from selected channels into in a 3D matrix. The matrix has dimensions MxNxP, where M is the number depth or pressure levels, N is the number of profiles, and P is the number of channels. Arranged in this way, the matrices are useful for analysis and for 2D visualisation (RSKimages uses RSKgenerate2D). It may be particularly useful for users wishing to visualise multidimensional data without using RSKimages. Each profile must be placed on a common reference grid before using RSKgenerate2D (see RSKbinaverage).

Note: Calling RSKimages may overwrite RSK.im field if RSKimages allows RSK as outputs.

Inputs:

Required:

  • RSK – Structure, with profiles as read using RSKreadprofiles.

Optional:

  • channel – Longname of channel to generate data, can be multiple in a cell, if no value is given it will use all channels.

  • profile – Profile numbers to use. Default is to use all available profiles.

  • direction – ‘up’ for upcast, ‘down’ for downcast. Default is down when both directions are available.

  • reference – Channel that will be used as y dimension. Default is ‘Sea Pressure’, can be any other channel.

  • schedule – Schedule to work on. Can be a schedule name (string) or ‘default’. Here ‘default’ is the reserved generic default selector, not a literal label: it resolves to the schedule with the most non-NaN Conductivity samples, then Temperature, then schedule 1.

Outputs:

  • RSK – Structure, with RSK.im field containing data, channel, profile, direction and reference channel information.

Example:

rsk = RSKgenerate2D(rsk,'channel',{'Temperature','Conductivity'},'direction','down');

See also:

RSKbinaverage(), RSKimages().

RSKplotburstdata

RSKplotburstdata(RSK)

RSKplotburstdata - Plot summaries of logger burst data.

Syntax:

[OPTIONS] = RSKplotburstdata(RSK, [OPTIONS])

Generates a plot for the burstdata.

Inputs:

Required:

  • RSK – Structure containing the logger metadata and burstData.

Optional:

  • channel – Longname of channel to plots, can be multiple in a cell, if no value is given it will plot all channels.

Outputs:

Optional:

  • handles – Line object of the plot.

  • axes – Axes object of the plot.

Example:

rsk = RSKreadburstdata(rsk, 'channel', {'Conductivity', 'Temperature', 'Pressure'});
RSKplotburstdata(rsk);

See also:

RSKreadburstdata(), RSKplotdata(), RSKplotdownsample().

RSKplotdownsample

RSKplotdownsample(RSK)

RSKplotdownsample - Plot summaries of logger data downsample.

Syntax:

[OPTIONS] = RSKplotdownsample(RSK, [OPTIONS])

Generates a summary plot of the downsample data in the RSK structure.

Inputs:

Required:

  • RSK – Structure containing the logger metadata and downsample.

Optional:

  • channel – Longname of channel to plots, can be multiple in a cell, if no value is given it will plot all channels.

Outputs:

Optional:

  • handles – Line object of the plot.

  • axes – Axes object of the plot.

See also:

RSKopen(), RSKplotdata(), RSKplotburstdata().

RSKprintchannels

RSKprintchannels(RSK)

RSKprintchannels - Display instrument information, channel names, and units in the RSK structure

Syntax:

RSKprintchannels(RSK)

Inputs:

Required:

  • RSK – Input RSK structure

Outputs:

Printed channel names and units in MATLAB command window