Skip to content

Data and units

WaLSAlib routines accept numerical arrays and plain numbers. Convert units explicitly before calling them; do not rely on an Astropy Quantity or FITS header to set the numerical units automatically.

Quantity Expected convention
Spectrum (n_wavelength,) or (n_samples, n_wavelength)
Wavelength axis and rest wavelengths Nanometres, in the same reference frame
LineFit return arrays (n_samples, n_lines); a single spectrum retains a leading dimension of one
LineFit LOS velocity km/s; positive for a fitted centre redward of the supplied reference
LineFit core intensity Original input intensity units, nearest original wavelength bin
Image Two-dimensional (ny, nx) array; array access is [y, x]
SoFT detection threshold Same units as the source image, e.g. G for a calibrated magnetogram
SoFT minimum feature size Number of pixels
SoFT dx, dt km/pixel and seconds/frame if velocities are wanted in km/s
SoFTg plate_scale km/pixel; not arcsec/pixel
SoFTg lane-width parameters km; converted internally using plate_scale

n_samples is the number of spectra, n_wavelength the number of wavelength samples per spectrum, and n_lines the number of requested lines. In an image, ny and nx are the numbers of rows and columns.

Spectroscopy

Use a finite, monotonic increasing wavelength axis matching the final spectral dimension. Convert angstroms to nm by dividing by ten. Check vacuum versus air wavelengths, observer motion, instrumental drift, and the chosen velocity zero point before interpreting Doppler shifts.

A stack is a set of independently fitted spectra. Its first dimension can represent time, spatial position, or another grouping; the fitter does not infer a cadence. Reshape an observational cube deliberately and retain a mapping back to its original coordinates.

LineFit interpolates non-finite spectral samples internally when possible. Pass a floating-point copy if the original data must remain untouched, and flag data gaps yourself; interpolation is not an observational quality assessment.

Images and sequences

Co-register and calibrate images before tracking. Supply one two-dimensional image per FITS file with a consistent shape, orientation, plate scale, and cadence. SoFT sorts filenames lexicographically rather than by FITS observation time: zero-pad frame numbers and check the resulting order.

SoFT reads array values; it does not calculate physical scales from WCS. SoFTg's distance-based morphology likewise requires a spatial scale supplied by you. Converting angular to linear scale requires the observing geometry and solar distance appropriate to the data.

A reproducible analysis record

Keep the package version, upstream pins, Python/dependency versions, input calibration and selection, wavelength references, pixel scale, cadence, thresholds, window settings, and quality masks. For ML results, retain training/validation splits, preprocessing, architecture, checkpoint identity, and inference thresholds as well.

Continue to the module guides for the meaning of individual outputs.