Frontiers worked examples¶
The LineFit notebooks accompany Jafarzadeh et al. (2026), Frontiers in Astronomy and Space Sciences, 13, 1843842. They are available in examples/LineFit_Frontiers/ in the source repository and are not installed as part of the wheel.
Prepare a source checkout¶
Activate your Python environment, then run the full sequence from a directory where you want to keep the repository:
git clone https://github.com/WaLSAteam/WaLSAlib.git
cd WaLSAlib
pip install '.[walsatools]' jupyterlab
cd examples/LineFit_Frontiers
python -m jupyterlab
For an existing checkout, first change into its root folder (the folder containing pyproject.toml), then start at the pip install line.
Run notebooks from this example directory so relative Files/, Figures/, and input paths resolve as intended. Read the notebook's configuration cell before execution; repeated runs can replace generated outputs.
The figure notebooks use WaLSAtools for plotting helpers and wavelet analysis. Their CMYK PDF export calls WaLSA_save_pdf, which uses the external Ghostscript executable (gs) for CMYK conversion when available and otherwise retains an RGB PDF. The final movie cell in Generate_synthetic_data.ipynb uses Matplotlib’s FFMpegWriter and requires FFmpeg; that cell is separate from generating the FITS testbed.
Follow the workflow¶
| Notebook | Purpose and dependencies |
|---|---|
Generate_synthetic_data.ipynb |
Generate the synthetic spectral testbed and truth arrays; the FITS testbed is also supplied |
Figure2.ipynb |
Fit and display line cores; writes LineFit parameters used downstream |
Figure3.ipynb |
Compare line-centre estimators against the known synthetic truth |
Figure4.ipynb |
Compare the recovered LOS-velocity sequences; uses cached products or recomputation options |
Figure5.ipynb |
Compare Refined Global Wavelet Spectra (RGWS) derived from the velocity series |
Figures_S1.ipynb |
Supplementary residual time-series comparison |
See the example README and each notebook's inputs and configuration for dependency order. Several notebooks contain substantial calculations and cached products; inspect recomputation switches before running all cells.
Data layout¶
The supplied synthetic_nuv_testbed.fits contains spectra and named wavelength, time, rest-wavelength, and true-centre extensions. Inspect the HDU inventory with Astropy:
The notebook code identifies the extensions it uses. Preserve nm, km/s, and seconds consistently when reproducing the plots.
Figure reuse and attribution¶
Notebook links and Python source are provided under Source Code on each example page. Run the notebooks in their original cell order.
Read the notebook-specific notices before reusing published or derivative figures. Cite the paper and the exact software version in resulting work; see citation.