emc2.simulator.classification.lidar_classify_phase¶
- emc2.simulator.classification.lidar_classify_phase(instrument, model, beta_p_phase_thresh=None, convert_zeros_to_nan=False, remove_sub_detect=True)[source]¶
Phase classification based on fixed thresholds of a lidar’s LDR and tot beta_p variables.
- Parameters:
- instrument: Instrument
The instrument to classify. The instrument must be a lidar.
- model: Model
The model output to classify.
- beta_p_phase_thresh: list of dicts or None
If a list, each element contains a dictionary with class name, class integer value (mask order starting at 1), LDR value bounds, and the corresponding beta_p threshold (thresholds are linearly interpolated in log10 scale between LDR values). In order for the method to operate properly, the list should be arranged from the lowest to highest beta_p threshold values for a given LDR, that is, (where i is the list element) beta_p[i+1 | LDR=x] >= beta_p[i | LDR=x]. Set class integer values of 1 or higher = clear (because of a very high beta_p value). When None, the default settings from the instrument object will be used (available only for beta resolving lidar classes).
- convert_zeros_to_nan: bool
- If True, saving the mask array as a float dtype (instead of uint8) and converting all
zeros in the array to nans.
- remove_sub_detect: bool
If True, remove hydrometeor-bearing grid cells with extinct lidar signal.
- Returns:
- model: Model
The model with the added simulated lidar phase classification mask.