Skip to content

Comments

Improve h_mode_detector to use core average instead of single point#291

Open
nanshi1177 wants to merge 1 commit intomasterfrom
fix-h-mode-detector
Open

Improve h_mode_detector to use core average instead of single point#291
nanshi1177 wants to merge 1 commit intomasterfrom
fix-h-mode-detector

Conversation

@nanshi1177
Copy link
Contributor

Issue first identified in DIII-D shot #200000.

Previously, h_mode_detector used a single reference point calculated from pedestal width (rho1 = rho0 - 2*rhoσ). This was unreliable because:

  • The reference point location was arbitrary
  • If it landed on a local flat spot, it could falsely trigger H-mode detection

Changes:

  • Use average inverse scale length in core region (rho < 0.7) instead of single point
  • Compare core average to max gradient (at pedestal)
  • More robust detection that doesn't depend on pedestal width calculation
  • Updated default threshold from 0.4 to 0.3 to match new method
  • Updated diagnostic plot to show core boundary and core average

Issue first identified in DIII-D shot #200000.

Previously, h_mode_detector used a single reference point calculated from
pedestal width (rho1 = rho0 - 2*rhoσ). This was unreliable because:
- The reference point location was arbitrary
- If it landed on a local flat spot, it could falsely trigger H-mode detection

Changes:
- Use average inverse scale length in core region (rho < 0.7) instead of single point
- Compare core average to max gradient (at pedestal)
- More robust detection that doesn't depend on pedestal width calculation
- Updated default threshold from 0.4 to 0.3 to match new method
- Updated diagnostic plot to show core boundary and core average

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@nanshi1177 nanshi1177 requested a review from bclyons12 February 6, 2026 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant