Draft
Conversation
Co-authored-by: xinghe1026 <75051880+xinghe1026@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add tools for CFQS data processing
Add CFQS experimental data processing toolkit
Mar 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bootstraps the CFQS-Data-Process repository with a full suite of diagnostic data processing tools for the Chinese First Quasi-axisymmetric Stellarator, primarily in MATLAB with Python helpers.
New tools
Diamagnetic loop (
diamagnetic/)calibrate_diamagnetic.m— eddy-current drift correction via polynomial fit or external vacuum-shot baseline; integrates raw voltage → fluxcalc_stored_energy.m— W(t) from calibrated diamagnetic flux using the Bohm relation; configurable B₀, R₀, a, ΛEquilibrium geometry (
magnetic_axis/,LCFS/)plot_magnetic_axis.m— R-Z cross-sections and/or 3-D toroidal curve from equilibrium fileplot_LCFS.m— LCFS cross-sections at arbitrary φ and 3-D surface rendering with optional magnetic axis overlayDiagnostics (
electrostatic_probe/,magnetic_probe/)process_langmuir_probe.m— nonlinear least-squares fit of Langmuir I-V → Tₑ, nₑ, V_f, V_p; ion species configurable viaIonMassparameterplot_magnetic_probe_spectrum.m— STFT spectrogram, CWT, or time-averaged Welch PSD of Mirnov coil signalsShared utilities (
utils/,python/)load_cfqs_data.m— unified loader for MAT/CSV/TXT/HDF5 with optional time-range trimmingcfqs_colormap.m— custom colour maps (plasma, inferno, diverge, cfqs navy-cyan-gold)cfqs_utils.py— Python equivalents: file I/O (MAT v5/v7.3, CSV, HDF5), zero-phase bandpass/lowpass filters, STFT, Bohm density, stored-energy calculationUsage sketch
Documentation
docs/data_processing_workflow.md— end-to-end workflow for all six diagnostic paths, shot-file naming conventions, data quality checklist, and export/archiving guidanceREADME.md— updated with directory tree, quick-start, and tool reference tableOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.