fix: allow fast_class and tcut to work together#190
Conversation
Remove incorrect validation that prevented using fast_class with positive tcut. These are complementary classification methods: - fast_class enables J_parallel and ideal orbit classifiers - tcut enables fractal dimension classification The original working code at 3a771f2 allowed using both together. The check was incorrectly added in d607ec1 during Python API refresh. Also fix examples/classification/simple.in to use the correct QH file that matches the Makefile, and add classifier_combined golden record test to verify both classification methods work together. Fixes regression where classification example would error stop with fast_class and positive tcut are mutually exclusive.
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
User description
Summary
fast_classwith positivetcutexamples/classification/simple.into use correct VMEC file matching Makefileclassifier_combinedgolden record test validating both classification methods work togetherRoot Cause
The error check added in commit d607ec1 ("feat: refresh python API classification #184") was incorrect:
These are actually complementary classification methods:
fast_class=.True.enables J_parallel and ideal orbit classifiers (runs at banana tips)tcut > 0enables fractal dimension classification (runs at specified time cut)The original working example at commit 3a771f2 used both together.
Test Plan
make testpasses (100% of 23 tests)examples/classification/runs successfullyclassifier_combinedvalidates both methods work togetherRelated
Fixes regression where classification example would error stop with "fast_class and positive tcut are mutually exclusive"
PR Type
Bug fix, Tests
Description
Remove incorrect validation preventing
fast_classandtcutfrom working togetherThese are complementary classification methods, not mutually exclusive
Fix example configuration to use correct VMEC file matching Makefile
Add
classifier_combinedgolden record test validating both methods work togetherDiagram Walkthrough
File Walkthrough
params.f90
Remove mutually exclusive validation for fast_class and tcutsrc/params.f90
fast_classwithpositive
tcutfast_classenablesJ_parallel and ideal orbit classifiers, while
tcutenables fractaldimension classification
simple.in
Fix VMEC file reference in classification exampleexamples/classification/simple.in
wout_LandremanPaul2021_QA_reactorScale_lowres_reference.nctowout_LandremanPaul2021_QH_reactorScale_lowres_reference.ncsimple.in
Add classifier_combined golden record test configurationtest/golden_record/classifier_combined/simple.in
classifier_combinedgolden record testfast_class=.True.andtcut=1d-2work togetherresults