vampire.model.apply_models

vampire.model.apply_models(img_info_df)[source]

Applies all models from the input info of image sets.

Parameters
img_info_dfDataFrame

Contains all information about image sets to be analyzed. See notes.

Notes

Learn more about basics and advanced input requirement and examples. Below is a general description.

Required columns of img_info_df (col 1-4)

The input DataFrame img_info_df must contain, in order, the 4 required columns of

img_set_pathstr

Path to the directory containing the image set(s) used to apply model.

model_pathstr

Path to the pickle file that stores model information.

output_pathstr

Path of the directory used to output model and figures. Defaults to img_set_path.

img_set_namestr, default

Name of the image set being applied to. Defaults to time of function call.

in the first 4 columns. The default values are used in default columns when (1) the space is left blank in csv/excel file before converting to DataFrame, or (2) the space is None/np.NaN in the DataFrame.

Warning

The required columns must appear in order in the first 4 columns, even when defaults are used.

Optional columns of img_info_df (col 5-)

The input DataFrame img_info_df could also contain any number (none to many) of optional columns at the right of the required columns. These optional columns serve as filters to the image filenames. The images with filenames containing values of all filters are used in analysis.

filter1str, optional

Unique filter of image filenames to be analyzed. E.g. “c1” for channel 1.

filter2str, optional

Unique filter of image filenames to be analyzed. E.g. “cortex” for sample region.

str, optional

Unique filter of image filenames to be analyzed. E.g. “40x” for magnification.

Tip

The column names of optional columns does not affect the analysis. The values in the columns only serves as filters to images to be analyzed.