FlowChange.FlowChangeJudge#

FlowChange.FlowChangeJudge.py

class FlowChangeJudge#

Bases: object

Class to judge flow changes based on given criteria.

init_params#

Initial parameters for the judgment criteria.

Type:

np.ndarray

Initialize the FlowChangeJudge with default parameters.

Parameters:

None

update_params(params_dict)#

Update the judgment parameters. :param params_dict: A dictionary containing parameter names and their new values. :type params_dict: dict

restore_params()#

Restore the judgment parameters to their initial values.

judge(curve1, curve2, mi, points, segments, abs_likes, rel_likes, peaklike, peakpos, debug=False)#

Judge the flow changes between two curves based on given criteria.

Parameters:
  • curve1 (Curve) – The first curve object.

  • curve2 (Curve) – The second curve object.

  • mi (Moment) – The Moment object for statistical calculations.

  • points (list) – A list of points to analyze.

  • segments (list) – A list of segments corresponding to the points.

  • abs_likes (list) – A list of absolute likelihoods for the points.

  • rel_likes (list) – A list of relative likelihoods for the points.

  • peaklike (bool) – Indicates if a peak-like feature is present.

  • peakpos (float) – The position of the peak if peaklike is True.

  • debug (bool, optional) – If True, print debug information, by default False.

Returns:

A tuple (i, j, info) where i and j are the judged points and info is a FlowChangeJudgeInfo object.

Return type:

tuple