Releases: qyber-black/Code-MRSNet
Version 2.1
MRSNet v2.1 Release Notes
MRSNet v2.1 adds new model architectures, sim-to-real analysis with linewidth estimation, improved training and benchmarking tooling, and expanded documentation. This release is based on the pre-2.1 branch and supersedes v2.0.
What's New
New command: sim2real
Analyse the sim-to-real gap between simulated spectra and experimental benchmark data:
./mrsnet.py sim2real --source fid-a-2d --manufacturer siemens --omega 123.23 --linewidth 2.0 -vvOptional linewidth estimation from data, per-spectrum analysis, and jitter for uncertainty. Results and plots are written to data/sim2real/. See README for --estimate_linewidth, --linewidth_method, and --linewidth_range/--linewidth_step.
New entrypoint: run.py
Run full workflows from JSON configuration (training, benchmark, sim2real). Example configs: etc/run_final.json, etc/run_sim2real.json. See README-run.md for details.
New model architectures
All trainable with ./mrsnet.py train -d <path> -e <epochs> --validate <k> -m <model_string>:
| Model prefix | Description |
|---|---|
encdec_* |
Encoder–decoder with WaveNet-style blocks and attention GRU |
fcnn_* |
Foundational CNN (CReLU, configurable 7-layer) |
qmrs_* |
CNN–LSTM hybrid with multi-headed MLP |
qnet_* |
QNet: dual-branch with LLS quantification (simplified LLS) |
qnet_basis_* |
QNet with full basis-set LLS and imperfection-factor modulation |
Autoencoder and autoencoder-quantifier support is extended and better integrated. See README.md and README-API.md for model strings and parameters.
Sim-to-real and linewidth
- Linewidth estimation — Automatic estimation from experimental spectra; optional per-spectrum and jitter for sim2real uncertainty.
- FID-A simulator — Improved linewidth handling, caching (
generate_megapress2d_with_cache.m), and mixed linewidth simulation.
Training, selection, and benchmarking
- KFold and grouped runs with clearer aggregation and optional statistical significance testing.
- Improved model selection scripts and GPO iteration tracking.
- Reproducibility: seed handling and deterministic options.
- Mixed precision support for BasisLLS and QNet; Tikhonov regularization in BasisLLS for stability.
- Benchmark subcommand: argument filtering and refined defaults (see
run_final.json).
Scripts and utilities
- aggregate.py — Aggregate model results and benchmark metrics.
- visualize.py — Parameter and correlation analysis, benchmark comparison and sim2real plots.
- etc/show_benchmark.py — Inspect benchmark data.
Obsolete scripts (etc/construct_spectrum.py, etc/display_spectrum.py, etc/extract-mae.sh) and the standalone FID-A comparison script have been removed; use sim2real and compare instead.
Documentation
- README.md — Updated for Python 3.12+, TensorFlow 2.20, new commands and models, sim2real, and linewidth.
- README-API.md — API overview for the
mrsnetpackage and all model classes. - README-run.md — Run/orchestration guide for
run.pyand JSON configs.
Compatibility
- Python: 3.12+ (tested with 3.13).
- TensorFlow: 2.20 (see
requirements.txt). - Existing CNN, YAE, and benchmark workflows remain supported; new models are additive.
- Setup unchanged:
git submodule update --init --recursiveandpip install -r requirements.txt.
Upgrading from v2.0
- Checkout the v2.1 tag or the
masterbranch after the v2.1 merge. - Update submodules:
git submodule update --init --recursive. - Reinstall dependencies:
pip install -r requirements.txt. - No config or data layout changes are required for existing pipelines; optional use of
run.py,etc/run_final.json, andetc/run_sim2real.jsonfor new workflows.
Links
- Repository: code-mrsnet (tag v2.1).
- Paper and data: see README for companion repos (basis, benchmark, model-dist, sim2real results, etc.).
Version 2.0
Updates to CNN architecture, model selection, simulators, datasets and bases with new UI.
Update to python 3.
M Chandler, C Jenkins, SM Shermer, FC Langbein. MRSNet, Version 2.0. Code, https://qyber.black/mrs/code-mrsnet, https://github.com/qyber-black/Code-MRSNet, July 2023. [DOI: 10.5281/zenodo.13893324]
Version 1.0
First release of MRSNet.