PlumeEvaluation module
- class PlumeEvaluation.PlumeMetrics(plumes, condition)
Bases:
objectThis is a class used to evaluate plume with metrics such as area and velocity.
- Parameters
plumes (np.array) – input plume images (plume_index*image_index*H*W)
condition (str) – PLD growth condition
- calculate_speed()
This is a function used to calculate plume velocity.
- crop_clip_image(image, x_start=50, intensity=200)
This is a function used to crop the image and sharpe the image in naive way. The processed image will be cropped horizontally start from “x_start”, and all value to be 0 or given “intensity”.
- Parameters
image (np.array) – input image
x_start (int) – starting x coordinate
intensity (int) – input variable used to determine user want to open which version of digital form, defaults to “parameter”
- get_metrics()
This is a function used to calculate metrics based on the plume images.
- to_df(plots_all)
This is a function to convert numpy array to pandas.DataFrame, which is used to plot in curves with std shadow.
- Parameters
plots_all (np.array) – plume images
- PlumeEvaluation.plot_metrics(df, sort_by='condition')
This is a function to plot curves based calculated plume metrics.
- Parameters
sort_by (str(, optional)) – to specify how the plume metrics be sorted. Options: “growth_index” uses plume index as label, “condition” uses different growth condition as label