ovrlpy.process_coordinates
- ovrlpy.process_coordinates(coordinates, /, gridsize=1, *, coordinate_keys=('x', 'y', 'z'), method='message_passing', shift=True, n_iter=20, dtype=Float32, return_shift)
Runs the pre-processing routine of the coordinate dataframe.
x,y coordinates are rescaled by the gridsize and x,y pixels assigned to all molecules. A z-coordinate-center for each pixel is calculated.
- Parameters:
coordinates (polars.DataFrame) – A dataframe of coordinates.
gridsize (float, optional) – The size of the pixel grid.
coordinate_keys (tuple[str, str, str], optional) – Name of the coordinate columns.
method (bool, optional) – The measure to use to determine the z-dimension threshold for subslicing. One of, mean, median, and message_passing.
shift (bool) – Whether to shift the x,y coordinates to 0 to minimize the analysis area. If False, the sample will keep its original shape.
n_iter (int, optional) – Number of iterations. Only used if the method is message_passing.
dtype (type[polars.DataType], optional) – Datatype of the z-coordinate center.
return_shift (bool) – Return the amount the coordinates have been shifted.
- Returns:
A dataframe with added x_pixel, y_pixel, and z_center column.
- Return type:
polars.DataFrame