spacr.qt.screens.image_umap

Image Scatter and PCA views integrated with Image UMAP.

Image UMAP, Image Scatter and PCA provide complementary projections of the same objects. Image Scatter plots two measured variables with crop previews and linked selection. PCA provides feature selection, a scree plot, a loadings biplot, local filtering and CSV export.

Both views open as complete pages beside the UMAP settings and inherit the measurements database selected by the Image UMAP screen. Shared page, signal and masthead integration is implemented by spacr.qt.screens.map_barcodes.

Functions

install_folds(...)

Put Image UMAP's fold strip on screen's masthead.

measurements_database(→ str)

The measurements database for source, or "".

source_path(→ str)

The project folder screen is pointed at, or "".

Module Contents

spacr.qt.screens.image_umap.install_folds(screen: PySide6.QtWidgets.QWidget) → spacr.qt.widgets.fold_strip.FoldStrip | None[source]

Put Image UMAP’s fold strip on screen’s masthead.

Parameters:

screen – the Image UMAP screen; the strip goes on its masthead and each folded page is built with it as screen.

spacr.qt.screens.image_umap.measurements_database(source: str) → str[source]

The measurements database for source, or “”.

Accepts the database itself and the project folder above it, which are the two things the UMAP screen’s source box actually holds. A path that resolves to nothing returns “”, and the folded screen then opens on its own Browse button rather than on a path that is not there.

Parameters:

source – a database file (.db, .sqlite or .sqlite3) or a project folder searched for one; ~ is expanded.

spacr.qt.screens.image_umap.source_path(screen) → str[source]

The project folder screen is pointed at, or “”.

Read from the settings form rather than remembered, so the answer is whatever is in the box at the moment the button is pressed. A list-valued src – several plates through one run – yields the first, which is the one whose measurements the other two views can actually plot: a scatter over two plates’ tables is two populations on one pair of axes.

Parameters:

screen – the Image UMAP screen whose settings form is read for src; None gives "".