ppcpy.cloudmask#

ppcpy.cloudmask.cloudscreen#

ppcpy.cloudmask.cloudscreen.smooth_signal(signal: ndarray, window_len: int) ndarray[source]#

Uniformly smooth the input signal

Parameters:
singalndarray

Signal to be smooth

window_lenint

Width of the applied uniform filter

Returns:
ndarray

Smoothed signal

Notes

History

  • 2026-02-04 Changed from scipy.ndimage.uniform_filter1d to ppcpy.misc.helper.uniform_filter

ppcpy.cloudmask.cloudscreen.cloudscreen(data_cube)[source]#

perform cloud screening

ppcpy.cloudmask.cloudscreen.cloudScreen_MSG(height, RCS, slope_thres, search_region)[source]#

CLOUDSCREEN_MSG cloud screen with maximum signal gradient.

Parameters:
height: array

Height in meters.

signal: array (time, height) !! this is transposed compared to the original implementation

Photon count rate in MHz.

slope_thres: float

Threshold of the slope to determine whether there is strong backscatter signal. [MHz*m]

search_region: list or array (2 elements)

[baseHeight, topHeight] in meters.

Returns:
flagCloudFree: boolean array

Indicates whether the profile is cloud free.

layerStatus: matrix (height x time)

Layer status for each bin (0: unknown, 1: cloud, 2: aerosol).

Notes

History

  • 2021-05-18: First edition by Zhenping

  • 2025-03-20: Translated into python

ppcpy.cloudmask.cloudscreen.cloudScreen_Zhao(height, RCS, slope_thres, search_region)[source]#

cloud screen Zhao

Todo

not yet implemented from matlab version

ppcpy.cloudmask.profilesegment#

ppcpy.cloudmask.profilesegment.segment(data_cube)[source]#
ppcpy.cloudmask.profilesegment.clFreeSeg(prfFlag, nIntPrf, minNIntPrf)[source]#

splits continuous cloud-free profiles into small sections.

Parameters:
prfFlag: array-like (boolean)

Cloud-free flags for each profile.

nIntPrf: int

Number of integral profiles.

minNIntPrf: int

Minimum number of integral profiles.

Returns:
clFreSegs: 2D numpy array

Start and stop indexes for each cloud-free section. [[start1, stop1], [start2, stop2], …]

Notes

History

  • 2021-05-22: First edition by Zhenping

  • 2025-03-20: Translated to python