processing.modules.cast_borders module

Inheritance diagram of processing.modules.cast_borders
class processing.modules.cast_borders.CastBorders[source]

Bases: ArrayModule

Get the Borders of a given cast, either only the borders for the downcast or the borders for the entire cast.

the Data outside the borders will either be Marked or cut out entirely

!!!Only the Downcast works at the moment!!!

transformation()[source]

handles output for cast_borders overwritten from the ArrayModule - module

ini_cast_borders()[source]

Initializes necessary variables for the clas to work

Returns:

:

self.prDM_list: a list with the pressure values from a cast self.bad_flag: the badflag set for the cnv self.interval: the interval at wich the data is sampled self.smooth_velo: the result of self.get_velo

get_cast_borders()[source]

gets the borders of a given cast based on if the argrument “downcast_only” is set

Returns:

:

returns -1 if there was a problem with getting the cast borders and else returns the borders

cut_cast_borders()[source]

removes lines outside the cast borders from the given structure

Returns:

:

either just the downcast or the downcast and the upcast depending on if the “downcast_only” argument was set

get_velo(prDM_list)[source]

derives the velocity from the diffrence in depth over a second

Parameters:
  • prDM_list (list of pressure/depth values)

  • Returns

  • --------

Return type:

array

:param : :param velo_arr array with the velocity at each point in the cast:

get_downcast_end()[source]

gets the downcast end of a given cast, meaning the point in the cast, where the ctd begins stops moving downward :rtype: int

Parameters:
  • Returns

  • --------

:param : :param the index of the start of the downcast:

get_downcast_start()[source]

gets the downcast start of a given cast, meaning the point in the cast, where the ctd begins to continuously move downward :rtype: int

Parameters:
  • Returns

  • --------

:param : :param the index of the start of the downcast:

get_upcast_start(ind_dc_end, smooth_velo)[source]
Return type:

int

get_upcast_end(ind_dc_end, smooth_velo)[source]
Return type:

int

sliding_average(arr, window_size=24)[source]

applies a sliding average on a given list or np.ndarray

Parameters:
  • arr (list or np.ndarray that is to be filtered)

  • window_size (size of the sliding average window, default is 24)

Return type:

list | ndarray

Returns:

:

avg_arr: the filtered array

processing.modules.cast_borders.main(args)[source]

Prepares the file and manages the arguments

Parameters:

args – list of arguments

Returns:

:

instance of cast_borders