Skip to content

SoFT reference

from WaLSAlib import SoFT

The core is loaded when a routine is accessed. Full underlying access is available through SoFT.core; optional helpers through SoFT.extras after installing the soft-extras extra.

Detect features

Complete source signature
SoFT.detection(img: numpy.ndarray, l_thr: float, sign: str='both', separation: bool=False, verbose: bool=False)
Parameter Default Annotation / meaning
img Required numpy.ndarray — Two-dimensional input image.
l_thr Required float — Threshold in source-image units; also used in centroid weights.
sign 'both' str — Implemented choices: pos, neg, both.
separation False bool — Allow multiple seeds within a connected component.
verbose False bool — Print additional workflow diagnostics.

View implementation · Parameters and defaults generated from this checkout.

Returns a signed label array with the image shape. Use "pos", "neg", or "both" for sign.

Filter by size

Complete source signature
SoFT.identification(labels: numpy.ndarray, min_size: int, verbose: bool=False)
Parameter Default Annotation / meaning
labels Required numpy.ndarray — Signed integer feature-label image; zero is background.
min_size Required int — Minimum feature/component size in pixels.
verbose False bool — Print additional workflow diagnostics.

View implementation · Parameters and defaults generated from this checkout.

Returns labels with clumps smaller than min_size pixels removed. Background is zero.

Run the tracking pipeline

Complete source signature
SoFT.track_all(datapath: str, cores: int, l_thr: float, min_size: int, dx: float, dt: float, sign: str, separation: bool, verbose: bool=False, doppler: bool=False)
Parameter Default Annotation / meaning
datapath Required str — Working-directory path including trailing separator.
cores Required int — Worker count.
l_thr Required float — Threshold in source-image units; also used in centroid weights.
min_size Required int — Minimum feature/component size in pixels.
dx Required float — km/pixel for velocities in km/s.
dt Required float — Seconds/frame for velocities in km/s.
sign Required str — Implemented choices: pos, neg, both.
separation Required bool — Allow multiple seeds within a connected component.
verbose False bool — Print additional workflow diagnostics.
doppler False bool — Read matching maps from 00b-doppler/.

View implementation · Parameters and defaults generated from this checkout.

Returns None, writes FITS intermediates and dataframe.json, and replaces the run directory's output folders. The data path needs a trailing separator. Read tracking before using it.

Associate existing intermediates

Complete source signature
SoFT.associate(datapath: str, verbose: bool=False, number_of_workers: int=None)
Parameter Default Annotation / meaning
datapath Required str — Working-directory path including trailing separator.
verbose False bool — Print additional workflow diagnostics.
number_of_workers None int — Worker count for association.

View implementation · Parameters and defaults generated from this checkout.

Associates intermediate ID products in the SoFT working-directory layout.

Lower-level tabulation

Complete source signature
SoFT.tabulation_parallel(files: list, filesB: list, dx: float, dt: float, cores: int, l_thr: float, minliftime: int=4, mb=None)
Parameter Default Annotation / meaning
files Required list — Ordered associated-label FITS paths.
filesB Required list — Corresponding ordered source-image FITS paths.
dx Required float — km/pixel for velocities in km/s.
dt Required float — Seconds/frame for velocities in km/s.
cores Required int — Worker count.
l_thr Required float — Threshold in source-image units; also used in centroid weights.
minliftime 4 int — Minimum lifetime in frames (upstream spelling).
mb None Optional parent progress bar.

View implementation · Parameters and defaults generated from this checkout.

files contains associated-label FITS paths and filesB contains corresponding source paths. l_thr sets the centroid-weight threshold; the default minliftime=4 is a frame count. mb is the optional progress-bar parent. The returned DataFrame is written by track_all; inspect column meanings before physical interpretation.

Optional helpers

Install WaLSAlib[soft-extras] before accessing SoFT.extras. These helpers include SunPy and EMD analysis utilities. Core detection and tracking use the base dependencies.