solarwindpy 0.0.1.dev0__py3-none-any.whl → 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of solarwindpy might be problematic. Click here for more details.
- plans/.velocity/metrics.json +96 -0
- plans/0-overview-template.md +268 -0
- plans/N-phase-template.md +106 -0
- plans/PLAN_AUDIT_SUMMARY.md +173 -0
- plans/TEMPLATE-USAGE-GUIDE.md +198 -0
- plans/__init__.py +1 -0
- plans/abandoned/compaction-agent-system/0-Overview.md +123 -0
- plans/abandoned/compaction-agent-system/agents-index-update-plan.md +109 -0
- plans/abandoned/compaction-agent-system/compacted_state.md +85 -0
- plans/abandoned/compaction-agent-system/implementation-plan.md +107 -0
- plans/abandoned/compaction-agent-system/system-validation-report.md +159 -0
- plans/abandoned/compaction-agent-system/usage-guide.md +210 -0
- plans/abandoned/hook-system-enhancement/0-Overview.md +214 -0
- plans/abandoned/hook-system-enhancement/1-Phase1-Core-Infrastructure.md +313 -0
- plans/abandoned/hook-system-enhancement/2-Phase2-Intelligent-Testing.md +385 -0
- plans/abandoned/hook-system-enhancement/3-Phase3-Physics-Validation.md +444 -0
- plans/abandoned/hook-system-enhancement/4-Phase4-Performance-Monitoring.md +458 -0
- plans/abandoned/hook-system-enhancement/5-Phase5-Developer-Experience.md +532 -0
- plans/abandoned/hook-system-enhancement/6-Implementation-Timeline.md +274 -0
- plans/abandoned/hook-system-enhancement/7-Risk-Management.md +376 -0
- plans/abandoned/hook-system-enhancement/8-Testing-Strategy.md +579 -0
- plans/abandoned/readthedocs-automation/0-Overview.md +247 -0
- plans/abandoned/readthedocs-automation/1-Emergency-Documentation-Fixes.md +270 -0
- plans/abandoned/readthedocs-automation/2-Template-System-Enhancement.md +811 -0
- plans/abandoned/readthedocs-automation/3-Quality-Audit-ReadTheDocs-Integration.md +844 -0
- plans/abandoned/readthedocs-automation/4-Plan-Consolidation-Cleanup.md +632 -0
- plans/abandoned/readthedocs-automation/9-Closeout.md +207 -0
- plans/abandoned/readthedocs-automation/ABANDONMENT_REASON.md +72 -0
- plans/cicd-architecture-redesign/0-Overview.md +193 -0
- plans/cicd-architecture-redesign/1-Workflow-Creation.md +103 -0
- plans/cicd-architecture-redesign/2-Version-Detection.md +123 -0
- plans/cicd-architecture-redesign/3-Deployment-Gates.md +169 -0
- plans/cicd-architecture-redesign/4-RC-Testing.md +194 -0
- plans/cicd-architecture-redesign/5-TestPyPI-Validation.md +264 -0
- plans/cicd-architecture-redesign/6-Production-Release.md +263 -0
- plans/cicd-architecture-redesign/7-Cleanup.md +243 -0
- plans/cicd-architecture-redesign/8-Documentation.md +285 -0
- plans/cicd-architecture-redesign/Closeout.md +225 -0
- plans/closeout-template.md +259 -0
- plans/completed/circular-import-audit/0-Overview.md +152 -0
- plans/completed/circular-import-audit/1-Static-Dependency-Analysis.md +62 -0
- plans/completed/circular-import-audit/2-Dynamic-Import-Testing.md +56 -0
- plans/completed/circular-import-audit/3-Performance-Impact-Assessment.md +56 -0
- plans/completed/circular-import-audit/4-Issue-Remediation.md +78 -0
- plans/completed/circular-import-audit/5-Preventive-Infrastructure.md +89 -0
- plans/completed/claude-settings-ecosystem-alignment/0-Overview.md +162 -0
- plans/completed/claude-settings-ecosystem-alignment/1-Security-Foundation.md +148 -0
- plans/completed/claude-settings-ecosystem-alignment/2-Hook-Integration.md +158 -0
- plans/completed/claude-settings-ecosystem-alignment/3-Agent-System-Integration.md +177 -0
- plans/completed/claude-settings-ecosystem-alignment/4-Enhanced-Workflow-Automation.md +159 -0
- plans/completed/claude-settings-ecosystem-alignment/5-Validation-Monitoring.md +181 -0
- plans/completed/claude-settings-ecosystem-alignment/compacted_session_state.md +290 -0
- plans/completed/combined_plan_with_checklist_documentation/1-Overview-and-Goals.md +51 -0
- plans/completed/combined_plan_with_checklist_documentation/2-Toolchain-and-Hosting.md +69 -0
- plans/completed/combined_plan_with_checklist_documentation/3-Repository-Structure.md +61 -0
- plans/completed/combined_plan_with_checklist_documentation/4-Configuration-and-Standards.md +70 -0
- plans/completed/combined_plan_with_checklist_documentation/5-Documentation-Content.md +62 -0
- plans/completed/combined_plan_with_checklist_documentation/6-CI-CD-and-Validation.md +58 -0
- plans/completed/combined_plan_with_checklist_documentation/7-Maintenance.md +55 -0
- plans/completed/combined_test_plan_with_checklist_fitfunctions/0-Overview.md +135 -0
- plans/completed/combined_test_plan_with_checklist_fitfunctions/1-Common-fixtures.md +59 -0
- plans/completed/combined_test_plan_with_checklist_fitfunctions/10-power_laws.md +56 -0
- plans/completed/combined_test_plan_with_checklist_fitfunctions/2-core.py-FitFunction.md +118 -0
- plans/completed/combined_test_plan_with_checklist_fitfunctions/3-gaussians.py-Gaussian-GaussianNormalized-GaussianLn.md +69 -0
- plans/completed/combined_test_plan_with_checklist_fitfunctions/4-trend_fits.py-TrendFit.md +99 -0
- plans/completed/combined_test_plan_with_checklist_fitfunctions/5-plots.py-FFPlot.md +98 -0
- plans/completed/combined_test_plan_with_checklist_fitfunctions/6-tex_info.py-TeXinfo.md +79 -0
- plans/completed/combined_test_plan_with_checklist_fitfunctions/7-Justification.md +49 -0
- plans/completed/combined_test_plan_with_checklist_fitfunctions/8-exponentials.md +64 -0
- plans/completed/combined_test_plan_with_checklist_fitfunctions/9-lines.md +58 -0
- plans/completed/combined_test_plan_with_checklist_plotting/0-Overview.md +142 -0
- plans/completed/combined_test_plan_with_checklist_plotting/1-base.py.md +90 -0
- plans/completed/combined_test_plan_with_checklist_plotting/10-labels-special.py.md +102 -0
- plans/completed/combined_test_plan_with_checklist_plotting/11-labels-chemistry.py.md +212 -0
- plans/completed/combined_test_plan_with_checklist_plotting/12-labels-composition.py.md +242 -0
- plans/completed/combined_test_plan_with_checklist_plotting/13-labels-datetime.py.md +247 -0
- plans/completed/combined_test_plan_with_checklist_plotting/14-labels-elemental_abundance.py.md +274 -0
- plans/completed/combined_test_plan_with_checklist_plotting/15-visual-validation.md +256 -0
- plans/completed/combined_test_plan_with_checklist_plotting/16-integration-testing.md +266 -0
- plans/completed/combined_test_plan_with_checklist_plotting/17-performance-benchmarks.md +267 -0
- plans/completed/combined_test_plan_with_checklist_plotting/18-Fixtures-and-Utilities.md +86 -0
- plans/completed/combined_test_plan_with_checklist_plotting/2-agg_plot.py.md +90 -0
- plans/completed/combined_test_plan_with_checklist_plotting/3-histograms.py.md +201 -0
- plans/completed/combined_test_plan_with_checklist_plotting/4-scatter.py.md +167 -0
- plans/completed/combined_test_plan_with_checklist_plotting/5-spiral.py.md +216 -0
- plans/completed/combined_test_plan_with_checklist_plotting/6-orbits.py.md +108 -0
- plans/completed/combined_test_plan_with_checklist_plotting/7-tools.py.md +86 -0
- plans/completed/combined_test_plan_with_checklist_plotting/8-select_data_from_figure.py.md +97 -0
- plans/completed/combined_test_plan_with_checklist_plotting/9-labels-base.py.md +88 -0
- plans/completed/combined_test_plan_with_checklist_solar_activity/.gitkeep +0 -0
- plans/completed/combined_test_plan_with_checklist_solar_activity/0-Overview.md +170 -0
- plans/completed/combined_test_plan_with_checklist_solar_activity/1-Package-Entry-Point-__init__.py.md +121 -0
- plans/completed/combined_test_plan_with_checklist_solar_activity/2-Core-Base-Classes-base.py.md +142 -0
- plans/completed/combined_test_plan_with_checklist_solar_activity/3-Plotting-Helpers-plots.py.md +123 -0
- plans/completed/combined_test_plan_with_checklist_solar_activity/4-LISIRD-Sub-package.md +119 -0
- plans/completed/combined_test_plan_with_checklist_solar_activity/5-Extrema-Calculator.md +103 -0
- plans/completed/combined_test_plan_with_checklist_solar_activity/6-Sunspot-Number-Sub-package.md +163 -0
- plans/completed/combined_test_plan_with_checklist_solar_activity/7-Sunspot-Number-Init.py.md +217 -0
- plans/completed/combined_test_plan_with_checklist_solar_activity/compacted_state.md +52 -0
- plans/completed/compaction-agent-modernization/0-Overview.md +156 -0
- plans/completed/compaction-agent-modernization/1-Architecture-Audit-Gap-Analysis.md +132 -0
- plans/completed/compaction-agent-modernization/2-Token-Baseline-Recalibration.md +153 -0
- plans/completed/compaction-agent-modernization/3-Agent-Reference-Updates.md +184 -0
- plans/completed/compaction-agent-modernization/4-Compression-Algorithm-Modernization.md +238 -0
- plans/completed/compaction-agent-modernization/5-Workflow-Integration-Streamlining.md +252 -0
- plans/completed/compaction-agent-modernization/6-Template-Structure-Optimization.md +240 -0
- plans/completed/compaction-agent-modernization/7-Integration-Testing-Validation.md +292 -0
- plans/completed/compaction-hook-enhancement/0-Overview.md +150 -0
- plans/completed/compaction-hook-enhancement/1-Token-Estimation-Enhancement.md +179 -0
- plans/completed/compaction-hook-enhancement/2-Compression-Intelligence.md +294 -0
- plans/completed/compaction-hook-enhancement/3-Git-Integration-Metadata.md +310 -0
- plans/completed/compaction-hook-enhancement/4-Session-Continuity-Features.md +358 -0
- plans/completed/compaction-hook-enhancement/5-Testing-Strategy.md +404 -0
- plans/completed/compaction-hook-enhancement/6-Integration-Roadmap.md +319 -0
- plans/completed/compaction-hook-enhancement/compacted_state.md +142 -0
- plans/completed/docstring-audit-enhancement/0-Overview.md +274 -0
- plans/completed/docstring-audit-enhancement/1-Infrastructure-Setup-and-Validation-Tools.md +206 -0
- plans/completed/docstring-audit-enhancement/2-Core-Physics-Modules-Enhancement.md +237 -0
- plans/completed/docstring-audit-enhancement/3-Fitfunctions-Mathematical-Modules-Enhancement.md +188 -0
- plans/completed/docstring-audit-enhancement/4-Plotting-Visualization-Modules-Enhancement.md +243 -0
- plans/completed/docstring-audit-enhancement/5-Specialized-Modules-Enhancement.md +216 -0
- plans/completed/docstring-audit-enhancement/6-Validation-and-Integration.md +216 -0
- plans/completed/fitfunctions-testing-implementation/0-Overview.md +130 -0
- plans/completed/fitfunctions-testing-implementation/1-Test-Infrastructure-Setup.md +79 -0
- plans/completed/fitfunctions-testing-implementation/2-Common-Fixtures-Test-Utilities.md +104 -0
- plans/completed/fitfunctions-testing-implementation/3-Core-FitFunction-Testing.md +168 -0
- plans/completed/fitfunctions-testing-implementation/4-Specialized-Function-Classes.md +210 -0
- plans/completed/fitfunctions-testing-implementation/5-Advanced-Classes-Testing.md +214 -0
- plans/completed/fitfunctions-testing-implementation/6-Plotting-Integration-Testing.md +231 -0
- plans/completed/fitfunctions-testing-implementation/7-Extended-Coverage-BONUS.md +184 -0
- plans/completed/numpy-docstring-conversion-plan/numpy-docstring-conversion-plan.md +118 -0
- plans/completed/pr-review-remediation/0-Overview.md +138 -0
- plans/completed/pr-review-remediation/1-Critical-Safety-Improvements.md +179 -0
- plans/completed/pr-review-remediation/2-Smart-Timeouts-Validation.md +399 -0
- plans/completed/pr-review-remediation/3-Enhanced-GitHub-Integration.md +258 -0
- plans/completed/pr-review-remediation/compacted_state.md +66 -0
- plans/completed/python-310-migration/0-Overview.md +390 -0
- plans/completed/python-310-migration/1-Planning-Setup.md +164 -0
- plans/completed/python-310-migration/2-Implementation.md +256 -0
- plans/completed/python-310-migration/3-Testing-Validation.md +335 -0
- plans/completed/python-310-migration/4-Documentation-Release.md +274 -0
- plans/completed/python-310-migration/5-Closeout.md +252 -0
- plans/completed/requirements-management-consolidation/0-Overview.md +118 -0
- plans/completed/requirements-management-consolidation/1-Documentation-Validation-Environment-Setup.md +116 -0
- plans/completed/requirements-management-consolidation/2-Requirements-Consolidation.md +161 -0
- plans/completed/requirements-management-consolidation/3-Workflow-Automation-Final-Integration.md +196 -0
- plans/completed/single-ecosystem-plan-implementation/0-Overview.md +83 -0
- plans/completed/single-ecosystem-plan-implementation/1-Plan-Preservation-Session-Management.md +38 -0
- plans/completed/single-ecosystem-plan-implementation/2-File-Structure-Optimization.md +43 -0
- plans/completed/single-ecosystem-plan-implementation/3-Plan-Migration-Archive-Setup.md +82 -0
- plans/completed/single-ecosystem-plan-implementation/4-Agent-System-Transformation.md +108 -0
- plans/completed/single-ecosystem-plan-implementation/5-Template-System-Enhancement.md +131 -0
- plans/completed/single-ecosystem-plan-implementation/6-Final-Validation-Testing.md +120 -0
- plans/completed/test-directory-consolidation/0-Overview.md +51 -0
- plans/completed/test-directory-consolidation/1-Structure-Preparation.md +82 -0
- plans/completed/test-directory-consolidation/2-File-Migration.md +100 -0
- plans/completed/test-directory-consolidation/3-Import-Transformation.md +117 -0
- plans/completed/test-directory-consolidation/4-Configuration-Consolidation.md +140 -0
- plans/completed/test-directory-consolidation/5-Validation.md +152 -0
- plans/completed/test-directory-consolidation/6-Cleanup.md +156 -0
- plans/completed/test-planning-agents-architecture/0-Overview.md +79 -0
- plans/completed/test-planning-agents-architecture/1-Branch-Isolation-Testing.md +49 -0
- plans/completed/test-planning-agents-architecture/2-Cross-Branch-Coordination.md +51 -0
- plans/completed/test-planning-agents-architecture/3-Merge-Workflow-Testing.md +48 -0
- plans/deployment-semver-pypi-rtd/0-Overview.md +463 -0
- plans/deployment-semver-pypi-rtd/1-Semantic-Versioning-Foundation.md +136 -0
- plans/deployment-semver-pypi-rtd/2-PyPI-Deployment-Infrastructure.md +168 -0
- plans/deployment-semver-pypi-rtd/3-Release-Automation.md +214 -0
- plans/deployment-semver-pypi-rtd/4-Plan-Closeout.md +543 -0
- plans/deployment-semver-pypi-rtd/compacted_session_state.md +172 -0
- plans/deployment-semver-pypi-rtd/compacted_state.md +131 -0
- plans/documentation-code-audit/0-Overview.md +393 -0
- plans/documentation-code-audit/1-Discovery-Inventory.md +183 -0
- plans/documentation-code-audit/2-Execution-Environment-Setup.md +263 -0
- plans/documentation-code-audit/3-Systematic-Validation.md +322 -0
- plans/documentation-code-audit/4-Code-Example-Remediation.md +358 -0
- plans/documentation-code-audit/5-Physics-MultiIndex-Compliance.md +464 -0
- plans/documentation-code-audit/6-Doctest-Integration.md +523 -0
- plans/documentation-code-audit/7-Reporting-Documentation.md +498 -0
- plans/documentation-code-audit/8-Closeout.md +456 -0
- plans/documentation-rebuild-session/compacted_state.md +109 -0
- plans/documentation-rendering-fixes/0-Overview.md +104 -0
- plans/documentation-rendering-fixes/1-Sphinx-Build-Diagnostics-Warning-Audit.md +101 -0
- plans/documentation-rendering-fixes/2-Configuration-Infrastructure-Fixes.md +113 -0
- plans/documentation-rendering-fixes/3-Docstring-Syntax-Audit-Repair.md +131 -0
- plans/documentation-rendering-fixes/4-HTML-Page-Rendering-Verification.md +113 -0
- plans/documentation-rendering-fixes/5-Advanced-Documentation-Quality-Assurance.md +119 -0
- plans/documentation-rendering-fixes/6-Documentation-Build-Optimization-Testing.md +129 -0
- plans/documentation-rendering-fixes/compacted_state.md +132 -0
- plans/documentation-template-fix/0-Overview.md +197 -0
- plans/documentation-template-fix/1-Template-System-Analysis.md +269 -0
- plans/documentation-template-fix/2-Template-Modification.md +609 -0
- plans/documentation-template-fix/3-Build-System-Integration.md +766 -0
- plans/documentation-template-fix/4-Testing-Validation.md +1399 -0
- plans/documentation-template-fix/5-Documentation-Training.md +602 -0
- plans/documentation-workflow-fix/0-Overview.md +222 -0
- plans/documentation-workflow-fix/1-Immediate-Fixes.md +238 -0
- plans/documentation-workflow-fix/2-Configuration-Setup.md +298 -0
- plans/documentation-workflow-fix/3-Pre-commit-Integration.md +382 -0
- plans/documentation-workflow-fix/4-Workflow-Improvements.md +446 -0
- plans/documentation-workflow-fix/5-Documentation-and-Training.md +527 -0
- plans/duplicate-object-warnings-fix-plan.md +130 -0
- plans/github-issues-migration/0-Overview.md +510 -0
- plans/github-issues-migration/1-Foundation-Label-System.md +180 -0
- plans/github-issues-migration/2-Migration-Tool-Rewrite.md +235 -0
- plans/github-issues-migration/3-CLI-Integration-Automation.md +169 -0
- plans/github-issues-migration/4-Validated-Migration.md +252 -0
- plans/github-issues-migration/5-Documentation-Training.md +171 -0
- plans/github-issues-migration/6-Closeout.md +179 -0
- plans/github-workflows-repair/repair-plan.md +299 -0
- plans/issues_from_plans.py +342 -0
- plans/pr-270-doc-validation-fixes/0-Overview.md +354 -0
- plans/pr-270-doc-validation-fixes/1-Critical-PR-Fixes.md +117 -0
- plans/pr-270-doc-validation-fixes/2-Framework-Right-Sizing.md +129 -0
- plans/pr-270-doc-validation-fixes/3-Sustainable-Documentation.md +126 -0
- plans/pr-270-doc-validation-fixes/4-Closeout-Migration.md +143 -0
- plans/pr-270-doc-validation-fixes/PLAN_COMPLETED.md +149 -0
- plans/python-310-migration/0-Overview.md +390 -0
- plans/python-310-migration/1-Planning-Setup.md +164 -0
- plans/python-310-migration/2-Implementation.md +256 -0
- plans/python-310-migration/3-Testing-Validation.md +335 -0
- plans/python-310-migration/4-Documentation-Release.md +274 -0
- plans/python-310-migration/5-Closeout.md +252 -0
- plans/readthedocs-simplified/0-Overview.md +243 -0
- plans/readthedocs-simplified/1-Immediate-Fixes.md +216 -0
- plans/readthedocs-simplified/2-Template-Simplification.md +278 -0
- plans/readthedocs-simplified/3-ReadTheDocs-Setup.md +298 -0
- plans/readthedocs-simplified/4-Testing-Validation.md +328 -0
- plans/readthedocs-simplified/5-Closeout.md +231 -0
- plans/readthedocs-simplified/compacted_state.md +127 -0
- plans/session-compaction-2025-08-12/compacted_state.md +114 -0
- plans/session-compaction-2025-08-13/compacted_state.md +145 -0
- plans/session-continuity-protocol/0-Overview.md +35 -0
- plans/session-continuity-protocol/1-Core-Principles-Framework.md +40 -0
- plans/session-continuity-protocol/2-Pre-Session-Validation-System.md +79 -0
- plans/session-continuity-protocol/3-Context-Switching-Prevention.md +87 -0
- plans/session-continuity-protocol/4-Progress-Tracking-Recovery.md +100 -0
- plans/sphinx-warnings-analysis.md +222 -0
- plans/systemprompt-optimization/0-Overview.md +447 -0
- plans/systemprompt-optimization/1-Deploy-SystemPrompt.md +114 -0
- plans/systemprompt-optimization/2-Documentation-Alignment.md +198 -0
- plans/systemprompt-optimization/3-Monitoring-Infrastructure.md +396 -0
- plans/systemprompt-optimization/4-Implementation-Script.md +450 -0
- plans/systemprompt-optimization/9-Closeout.md +165 -0
- plans/systemprompt-optimization/compacted_state.md +143 -0
- plans/template-value-propositions/0-Overview.md +357 -0
- plans/template-value-propositions/1-Value-Proposition-Framework-Design.md +144 -0
- plans/template-value-propositions/2-Plan-Template-Enhancement.md +178 -0
- plans/template-value-propositions/3-Value-Generator-Hook-Implementation.md +291 -0
- plans/template-value-propositions/4-Value-Validator-Hook-Implementation.md +274 -0
- plans/template-value-propositions/5-Documentation-Agent-Updates.md +219 -0
- plans/template-value-propositions/6-Integration-Testing-Validation.md +247 -0
- plans/tests-audit/0-Overview.md +410 -0
- plans/tests-audit/1-Discovery-Inventory.md +170 -0
- plans/tests-audit/2-Physics-Validation-Audit.md +195 -0
- plans/tests-audit/3-Architecture-Compliance.md +195 -0
- plans/tests-audit/4-Numerical-Stability-Analysis.md +203 -0
- plans/tests-audit/5-Documentation-Enhancement.md +220 -0
- plans/tests-audit/6-Audit-Deliverables.md +220 -0
- plans/tests-audit/7-Closeout.md +252 -0
- plans/tests-audit/artifacts/ARCHITECTURE_COMPLIANCE_REPORT.md +315 -0
- plans/tests-audit/artifacts/ARCHITECTURE_RECOMMENDATIONS.md +943 -0
- plans/tests-audit/artifacts/COMPREHENSIVE_AUDIT_REPORT.md +356 -0
- plans/tests-audit/artifacts/CONTRIBUTING_ENHANCED_TEMPLATE.md +419 -0
- plans/tests-audit/artifacts/COVERAGE_GAP_ANALYSIS.md +152 -0
- plans/tests-audit/artifacts/DOCUMENTATION_ENHANCEMENT_REPORT.md +502 -0
- plans/tests-audit/artifacts/EXECUTIVE_AUDIT_SUMMARY.md +129 -0
- plans/tests-audit/artifacts/IMPLEMENTATION_ROADMAP.md +647 -0
- plans/tests-audit/artifacts/NUMERICAL_RECOMMENDATIONS.md +739 -0
- plans/tests-audit/artifacts/NUMERICAL_STABILITY_GUIDE_TEMPLATE.rst +451 -0
- plans/tests-audit/artifacts/NUMERICAL_STABILITY_REPORT.md +301 -0
- plans/tests-audit/artifacts/PHASE_3_SUMMARY.md +280 -0
- plans/tests-audit/artifacts/PHASE_4_SUMMARY.md +229 -0
- plans/tests-audit/artifacts/PHASE_5_SUMMARY.md +292 -0
- plans/tests-audit/artifacts/PHASE_6_CLOSEOUT.md +278 -0
- plans/tests-audit/artifacts/PHYSICS_GUIDE_TEMPLATE.rst +268 -0
- plans/tests-audit/artifacts/PHYSICS_VALIDATION_REPORT.md +235 -0
- plans/tests-audit/artifacts/TECHNICAL_DELIVERABLES_PACKAGE.md +2502 -0
- plans/tests-audit/artifacts/TEST_INVENTORY.csv +1204 -0
- plans/tests-audit/artifacts/TEST_INVENTORY.md +135 -0
- plans/tests-audit/artifacts/test_discovery_analysis.py +231 -0
- plans/tests-audit/artifacts/test_parser.py +395 -0
- solarwindpy/README.md +3 -0
- solarwindpy/Untitled.ipynb +54 -0
- solarwindpy/__init__.py +74 -0
- solarwindpy/core/__init__.py +23 -0
- solarwindpy/core/alfvenic_turbulence.py +804 -0
- solarwindpy/core/base.py +267 -0
- solarwindpy/core/ions.py +309 -0
- solarwindpy/core/plasma.py +2133 -0
- solarwindpy/core/spacecraft.py +256 -0
- solarwindpy/core/tensor.py +90 -0
- solarwindpy/core/units_constants.py +199 -0
- solarwindpy/core/vector.py +328 -0
- solarwindpy/fitfunctions/__init__.py +20 -0
- solarwindpy/fitfunctions/core.py +734 -0
- solarwindpy/fitfunctions/exponentials.py +188 -0
- solarwindpy/fitfunctions/gaussians.py +264 -0
- solarwindpy/fitfunctions/lines.py +116 -0
- solarwindpy/fitfunctions/moyal.py +71 -0
- solarwindpy/fitfunctions/plots.py +751 -0
- solarwindpy/fitfunctions/power_laws.py +209 -0
- solarwindpy/fitfunctions/tex_info.py +568 -0
- solarwindpy/fitfunctions/trend_fits.py +482 -0
- solarwindpy/instabilities/__init__.py +16 -0
- solarwindpy/instabilities/beta_ani.py +82 -0
- solarwindpy/instabilities/verscharen2016.py +631 -0
- solarwindpy/plotting/__init__.py +33 -0
- solarwindpy/plotting/agg_plot.py +489 -0
- solarwindpy/plotting/base.py +465 -0
- solarwindpy/plotting/hist1d.py +405 -0
- solarwindpy/plotting/hist2d.py +1035 -0
- solarwindpy/plotting/histograms.py +1845 -0
- solarwindpy/plotting/labels/__init__.py +104 -0
- solarwindpy/plotting/labels/base.py +686 -0
- solarwindpy/plotting/labels/chemistry.py +19 -0
- solarwindpy/plotting/labels/composition.py +100 -0
- solarwindpy/plotting/labels/datetime.py +235 -0
- solarwindpy/plotting/labels/elemental_abundance.py +73 -0
- solarwindpy/plotting/labels/special.py +794 -0
- solarwindpy/plotting/orbits.py +515 -0
- solarwindpy/plotting/scatter.py +99 -0
- solarwindpy/plotting/select_data_from_figure.py +329 -0
- solarwindpy/plotting/spiral.py +980 -0
- solarwindpy/plotting/tools.py +434 -0
- solarwindpy/scripts/__init__.py +1 -0
- solarwindpy/scripts/logs/.gitignore +1 -0
- solarwindpy/solar_activity/__init__.py +53 -0
- solarwindpy/solar_activity/base.py +605 -0
- solarwindpy/solar_activity/lisird/__init__.py +3 -0
- solarwindpy/solar_activity/lisird/extrema_calculator.py +394 -0
- solarwindpy/solar_activity/lisird/lisird.py +319 -0
- solarwindpy/solar_activity/plots.py +116 -0
- solarwindpy/solar_activity/sunspot_number/.DS_Store +0 -0
- solarwindpy/solar_activity/sunspot_number/__init__.py +3 -0
- solarwindpy/solar_activity/sunspot_number/sidc.py +556 -0
- solarwindpy/solar_activity/sunspot_number/ssn_extrema.csv +72 -0
- solarwindpy/solar_activity/sunspot_number/ssn_extrema.csv.silso +72 -0
- solarwindpy/tools/__init__.py +162 -0
- solarwindpy-0.1.0.dist-info/METADATA +181 -0
- solarwindpy-0.1.0.dist-info/RECORD +409 -0
- {solarwindpy-0.0.1.dev0.dist-info → solarwindpy-0.1.0.dist-info}/WHEEL +1 -1
- solarwindpy-0.1.0.dist-info/licenses/LICENSE.rst +32 -0
- solarwindpy-0.1.0.dist-info/top_level.txt +3 -0
- tests/__init__.py +1 -0
- tests/conftest.py +10 -0
- tests/core/__init__.py +1 -0
- tests/core/test_alfvenic_turbulence.py +544 -0
- tests/core/test_base.py +112 -0
- tests/core/test_base_head_tail.py +29 -0
- tests/core/test_base_mi_tuples.py +11 -0
- tests/core/test_core_verify_datetimeindex.py +32 -0
- tests/core/test_ions.py +325 -0
- tests/core/test_plasma.py +2581 -0
- tests/core/test_plasma_io.py +12 -0
- tests/core/test_quantities.py +507 -0
- tests/core/test_spacecraft.py +210 -0
- tests/core/test_units_constants.py +22 -0
- tests/data/epoch.csv +4 -0
- tests/data/plasma.csv +4 -0
- tests/data/spacecraft.csv +4 -0
- tests/fitfunctions/conftest.py +60 -0
- tests/fitfunctions/test_core.py +193 -0
- tests/fitfunctions/test_exponentials.py +342 -0
- tests/fitfunctions/test_gaussians.py +142 -0
- tests/fitfunctions/test_lines.py +349 -0
- tests/fitfunctions/test_moyal.py +258 -0
- tests/fitfunctions/test_plots.py +258 -0
- tests/fitfunctions/test_power_laws.py +365 -0
- tests/fitfunctions/test_tex_info.py +183 -0
- tests/fitfunctions/test_trend_fit_properties.py +31 -0
- tests/fitfunctions/test_trend_fits.py +244 -0
- tests/plotting/__init__.py +1 -0
- tests/plotting/labels/__init__.py +1 -0
- tests/plotting/labels/test_chemistry.py +243 -0
- tests/plotting/labels/test_composition.py +345 -0
- tests/plotting/labels/test_datetime.py +445 -0
- tests/plotting/labels/test_elemental_abundance.py +366 -0
- tests/plotting/labels/test_init.py +66 -0
- tests/plotting/labels/test_labels_base.py +347 -0
- tests/plotting/labels/test_special.py +550 -0
- tests/plotting/test_agg_plot.py +602 -0
- tests/plotting/test_base.py +752 -0
- tests/plotting/test_fixtures_utilities.py +775 -0
- tests/plotting/test_histograms.py +546 -0
- tests/plotting/test_integration.py +675 -0
- tests/plotting/test_orbits.py +435 -0
- tests/plotting/test_performance.py +708 -0
- tests/plotting/test_scatter.py +752 -0
- tests/plotting/test_select_data_from_figure.py +1209 -0
- tests/plotting/test_spiral.py +573 -0
- tests/plotting/test_tools.py +607 -0
- tests/plotting/test_visual_validation.py +465 -0
- tests/solar_activity/__init__.py +1 -0
- tests/solar_activity/lisird/__init__.py +1 -0
- tests/solar_activity/lisird/test_extrema_calculator.py +593 -0
- tests/solar_activity/lisird/test_lisird_id.py +187 -0
- tests/solar_activity/sunspot_number/__init__.py +1 -0
- tests/solar_activity/sunspot_number/test_init.py +399 -0
- tests/solar_activity/sunspot_number/test_sidc.py +465 -0
- tests/solar_activity/sunspot_number/test_sidc_id.py +223 -0
- tests/solar_activity/sunspot_number/test_sidc_loader.py +275 -0
- tests/solar_activity/sunspot_number/test_ssn_extrema.py +406 -0
- tests/solar_activity/test_base.py +656 -0
- tests/solar_activity/test_init.py +396 -0
- tests/solar_activity/test_plots.py +371 -0
- tests/test_circular_imports.py +408 -0
- tests/test_issue_titles.py +25 -0
- tests/test_statusline.py +298 -0
- solarwindpy-0.0.1.dev0.dist-info/METADATA +0 -14
- solarwindpy-0.0.1.dev0.dist-info/RECORD +0 -4
- solarwindpy-0.0.1.dev0.dist-info/top_level.txt +0 -1
|
@@ -0,0 +1,739 @@
|
|
|
1
|
+
# Phase 4: Numerical Stability Test Recommendations
|
|
2
|
+
**Physics-Focused Test Suite Audit - SolarWindPy**
|
|
3
|
+
|
|
4
|
+
## Summary
|
|
5
|
+
|
|
6
|
+
This document provides **34 specific numerical stability test recommendations** to increase SolarWindPy test coverage by **+4.5%** and achieve **Numerical Stability Grade A- (90%+)**. Tests are prioritized by physics impact and implementation complexity.
|
|
7
|
+
|
|
8
|
+
**Target Coverage Improvement:** 77.1% → 81.6% (+4.5%)
|
|
9
|
+
**Implementation Effort:** 15-20 hours across 4 test categories
|
|
10
|
+
**Expected Stability Grade:** A- (90%+) upon completion
|
|
11
|
+
|
|
12
|
+
## Test Categories and Prioritization
|
|
13
|
+
|
|
14
|
+
### Critical Priority: Core Physics Tests (15 tests)
|
|
15
|
+
**Coverage Impact:** +2.5% | **Physics Risk:** High | **Effort:** 8-10 hours
|
|
16
|
+
|
|
17
|
+
### High Priority: Mathematical Operations (8 tests)
|
|
18
|
+
**Coverage Impact:** +1.0% | **Physics Risk:** Medium-High | **Effort:** 3-4 hours
|
|
19
|
+
|
|
20
|
+
### Medium Priority: Fitfunctions Stability (6 tests)
|
|
21
|
+
**Coverage Impact:** +0.7% | **Physics Risk:** Medium | **Effort:** 2-3 hours
|
|
22
|
+
|
|
23
|
+
### Integration Priority: Cross-Module Tests (5 tests)
|
|
24
|
+
**Coverage Impact:** +0.3% | **Physics Risk:** Low-Medium | **Effort:** 2-3 hours
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## CRITICAL PRIORITY: Core Physics Tests (15 tests)
|
|
29
|
+
|
|
30
|
+
### 1. Thermal Speed Numerical Stability (`tests/core/test_plasma_numerical.py`)
|
|
31
|
+
|
|
32
|
+
#### Test 1.1: `test_thermal_speed_zero_energy_boundary()`
|
|
33
|
+
```python
|
|
34
|
+
def test_thermal_speed_zero_energy_boundary():
|
|
35
|
+
"""Test thermal speed calculation at zero energy boundary."""
|
|
36
|
+
# Create plasma with zero thermal energy components
|
|
37
|
+
plasma_data = create_minimal_plasma()
|
|
38
|
+
plasma_data.loc[:, ("w", "x", "p1")] = 0.0
|
|
39
|
+
plasma_data.loc[:, ("w", "y", "p1")] = 0.0
|
|
40
|
+
plasma_data.loc[:, ("w", "z", "p1")] = 1e-15 # Near-zero but positive
|
|
41
|
+
|
|
42
|
+
plasma = Plasma(plasma_data)
|
|
43
|
+
thermal_speed = plasma.thermal_speed("p1")
|
|
44
|
+
|
|
45
|
+
# Should return finite, non-negative values
|
|
46
|
+
assert np.all(np.isfinite(thermal_speed))
|
|
47
|
+
assert np.all(thermal_speed >= 0)
|
|
48
|
+
assert np.allclose(thermal_speed, 1e-15**0.5, rtol=1e-10)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
#### Test 1.2: `test_thermal_speed_negative_energy_handling()`
|
|
52
|
+
```python
|
|
53
|
+
def test_thermal_speed_negative_energy_handling():
|
|
54
|
+
"""Test thermal speed with negative energy components (unphysical)."""
|
|
55
|
+
plasma_data = create_minimal_plasma()
|
|
56
|
+
plasma_data.loc[:, ("w", "x", "p1")] = -1.0 # Unphysical negative
|
|
57
|
+
|
|
58
|
+
plasma = Plasma(plasma_data)
|
|
59
|
+
|
|
60
|
+
with pytest.warns(UserWarning, match="Negative thermal energy detected"):
|
|
61
|
+
thermal_speed = plasma.thermal_speed("p1")
|
|
62
|
+
|
|
63
|
+
# Should either handle gracefully or propagate NaN
|
|
64
|
+
assert np.all(np.isnan(thermal_speed)) or np.all(thermal_speed >= 0)
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
#### Test 1.3: `test_thermal_speed_extreme_values()`
|
|
68
|
+
```python
|
|
69
|
+
def test_thermal_speed_extreme_values():
|
|
70
|
+
"""Test thermal speed with extreme but physical values."""
|
|
71
|
+
plasma_data = create_minimal_plasma()
|
|
72
|
+
|
|
73
|
+
# Test cases: very hot plasma, very cold plasma, mixed
|
|
74
|
+
test_cases = [
|
|
75
|
+
1e20, # Very hot solar corona
|
|
76
|
+
1e-20, # Very cold space plasma
|
|
77
|
+
1e10, # Hot solar wind
|
|
78
|
+
1e-10 # Cold solar wind
|
|
79
|
+
]
|
|
80
|
+
|
|
81
|
+
for w_magnitude in test_cases:
|
|
82
|
+
plasma_data.loc[:, ("w", "x", "p1")] = w_magnitude
|
|
83
|
+
plasma = Plasma(plasma_data)
|
|
84
|
+
thermal_speed = plasma.thermal_speed("p1")
|
|
85
|
+
|
|
86
|
+
assert np.all(np.isfinite(thermal_speed))
|
|
87
|
+
assert np.allclose(thermal_speed, w_magnitude**0.5, rtol=1e-12)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
#### Test 1.4: `test_thermal_speed_precision_conservation()`
|
|
91
|
+
```python
|
|
92
|
+
def test_thermal_speed_precision_conservation():
|
|
93
|
+
"""Test precision conservation in thermal speed summation."""
|
|
94
|
+
plasma_data = create_minimal_plasma()
|
|
95
|
+
|
|
96
|
+
# Small components that could suffer precision loss
|
|
97
|
+
plasma_data.loc[:, ("w", "x", "p1")] = 1e-15
|
|
98
|
+
plasma_data.loc[:, ("w", "y", "p1")] = 1e-15
|
|
99
|
+
plasma_data.loc[:, ("w", "z", "p1")] = 1e-15
|
|
100
|
+
|
|
101
|
+
plasma = Plasma(plasma_data)
|
|
102
|
+
thermal_speed = plasma.thermal_speed("p1")
|
|
103
|
+
expected = np.sqrt(3 * 1e-15)
|
|
104
|
+
|
|
105
|
+
# Should maintain precision to machine epsilon
|
|
106
|
+
assert np.allclose(thermal_speed, expected, rtol=1e-14)
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### 2. Alfvén Speed Numerical Stability
|
|
110
|
+
|
|
111
|
+
#### Test 2.1: `test_alfven_speed_zero_density_protection()`
|
|
112
|
+
```python
|
|
113
|
+
def test_alfven_speed_zero_density_protection():
|
|
114
|
+
"""Test Alfvén speed calculation with zero density."""
|
|
115
|
+
plasma_data = create_minimal_plasma()
|
|
116
|
+
plasma_data.loc[:, ("n", "", "p1")] = 0.0 # Zero density
|
|
117
|
+
|
|
118
|
+
plasma = Plasma(plasma_data)
|
|
119
|
+
|
|
120
|
+
with pytest.warns(UserWarning, match="Zero density detected"):
|
|
121
|
+
ca = plasma.ca("p1")
|
|
122
|
+
|
|
123
|
+
# Should either return infinite or handle gracefully
|
|
124
|
+
assert np.all(np.isinf(ca)) or np.all(np.isnan(ca))
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
#### Test 2.2: `test_alfven_speed_extreme_density_ratios()`
|
|
128
|
+
```python
|
|
129
|
+
def test_alfven_speed_extreme_density_ratios():
|
|
130
|
+
"""Test Alfvén speed with extreme density ratios."""
|
|
131
|
+
plasma_data = create_minimal_plasma()
|
|
132
|
+
|
|
133
|
+
# Test very low and very high density scenarios
|
|
134
|
+
test_densities = [1e-30, 1e-10, 1e10, 1e30] # cm^-3 equivalent
|
|
135
|
+
|
|
136
|
+
for density in test_densities:
|
|
137
|
+
plasma_data.loc[:, ("n", "", "p1")] = density
|
|
138
|
+
plasma = Plasma(plasma_data)
|
|
139
|
+
ca = plasma.ca("p1")
|
|
140
|
+
|
|
141
|
+
# Should be finite and physically reasonable
|
|
142
|
+
assert np.all(np.isfinite(ca))
|
|
143
|
+
assert np.all(ca > 0) # Alfvén speed always positive
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
#### Test 2.3: `test_alfven_speed_near_zero_magnetic_field()`
|
|
147
|
+
```python
|
|
148
|
+
def test_alfven_speed_near_zero_magnetic_field():
|
|
149
|
+
"""Test Alfvén speed with very weak magnetic field."""
|
|
150
|
+
plasma_data = create_minimal_plasma()
|
|
151
|
+
plasma_data.loc[:, ("b", "x", "")] = 1e-15 # Very weak field
|
|
152
|
+
plasma_data.loc[:, ("b", "y", "")] = 0.0
|
|
153
|
+
plasma_data.loc[:, ("b", "z", "")] = 0.0
|
|
154
|
+
|
|
155
|
+
plasma = Plasma(plasma_data)
|
|
156
|
+
ca = plasma.ca("p1")
|
|
157
|
+
|
|
158
|
+
# Should handle weak fields without numerical issues
|
|
159
|
+
assert np.all(np.isfinite(ca))
|
|
160
|
+
assert np.all(ca >= 0)
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### 3. Plasma Frequency and Cyclotron Frequency Tests
|
|
164
|
+
|
|
165
|
+
#### Test 3.1: `test_plasma_frequency_high_density_overflow()`
|
|
166
|
+
```python
|
|
167
|
+
def test_plasma_frequency_high_density_overflow():
|
|
168
|
+
"""Test plasma frequency calculation at high densities."""
|
|
169
|
+
plasma_data = create_minimal_plasma()
|
|
170
|
+
plasma_data.loc[:, ("n", "", "p1")] = 1e20 # Very high density
|
|
171
|
+
|
|
172
|
+
plasma = Plasma(plasma_data)
|
|
173
|
+
wp = plasma.w("p1")
|
|
174
|
+
|
|
175
|
+
# Should not overflow even at extreme densities
|
|
176
|
+
assert np.all(np.isfinite(wp.loc[:, "scalar"]))
|
|
177
|
+
|
|
178
|
+
# Check against analytical expectation
|
|
179
|
+
expected_magnitude = np.sqrt(plasma_data.loc[:, ("n", "", "p1")]) * \
|
|
180
|
+
np.sqrt(plasma.constants.charge_states["p1"]**2)
|
|
181
|
+
assert np.all(wp.loc[:, "scalar"] > 0.1 * expected_magnitude)
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
#### Test 3.2: `test_cyclotron_frequency_extreme_fields()`
|
|
185
|
+
```python
|
|
186
|
+
def test_cyclotron_frequency_extreme_fields():
|
|
187
|
+
"""Test cyclotron frequency with extreme magnetic fields."""
|
|
188
|
+
plasma_data = create_minimal_plasma()
|
|
189
|
+
|
|
190
|
+
# Test very strong magnetic field (pulsar-like)
|
|
191
|
+
plasma_data.loc[:, ("b", "x", "")] = 1e8 # Tesla equivalent
|
|
192
|
+
|
|
193
|
+
plasma = Plasma(plasma_data)
|
|
194
|
+
# Cyclotron frequency calculation (if implemented)
|
|
195
|
+
# omega_c = q * B / m - would need implementation
|
|
196
|
+
|
|
197
|
+
# Placeholder for when cyclotron frequency is implemented
|
|
198
|
+
assert True # TODO: Implement when cyclotron frequency added
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### 4. Pressure and Beta Calculations
|
|
202
|
+
|
|
203
|
+
#### Test 4.1: `test_plasma_beta_extreme_regimes()`
|
|
204
|
+
```python
|
|
205
|
+
def test_plasma_beta_extreme_regimes():
|
|
206
|
+
"""Test plasma beta calculation in extreme parameter regimes."""
|
|
207
|
+
plasma_data = create_minimal_plasma()
|
|
208
|
+
|
|
209
|
+
# High beta regime (thermal pressure >> magnetic pressure)
|
|
210
|
+
high_beta_data = plasma_data.copy()
|
|
211
|
+
high_beta_data.loc[:, ("w", "x", "p1")] = 1e6 # Very hot
|
|
212
|
+
high_beta_data.loc[:, ("b", "x", "")] = 1e-6 # Very weak field
|
|
213
|
+
|
|
214
|
+
plasma_high = Plasma(high_beta_data)
|
|
215
|
+
|
|
216
|
+
# Low beta regime (magnetic pressure >> thermal pressure)
|
|
217
|
+
low_beta_data = plasma_data.copy()
|
|
218
|
+
low_beta_data.loc[:, ("w", "x", "p1")] = 1e-6 # Very cold
|
|
219
|
+
low_beta_data.loc[:, ("b", "x", "")] = 1e6 # Very strong field
|
|
220
|
+
|
|
221
|
+
plasma_low = Plasma(low_beta_data)
|
|
222
|
+
|
|
223
|
+
# Both should be finite and physical
|
|
224
|
+
for plasma_test in [plasma_high, plasma_low]:
|
|
225
|
+
# Beta calculation test (if implemented)
|
|
226
|
+
# beta = plasma_test.plasma_beta("p1")
|
|
227
|
+
# assert np.all(np.isfinite(beta))
|
|
228
|
+
# assert np.all(beta >= 0)
|
|
229
|
+
pass # TODO: Implement when plasma_beta method available
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### 5. Sound Speed and MHD Calculations
|
|
233
|
+
|
|
234
|
+
#### Test 5.1: `test_sound_speed_polytropic_precision()`
|
|
235
|
+
```python
|
|
236
|
+
def test_sound_speed_polytropic_precision():
|
|
237
|
+
"""Test sound speed calculation precision with polytropic index."""
|
|
238
|
+
plasma_data = create_minimal_plasma()
|
|
239
|
+
plasma = Plasma(plasma_data)
|
|
240
|
+
|
|
241
|
+
cs = plasma.cs("p1")
|
|
242
|
+
|
|
243
|
+
# Verify polytropic relation: cs^2 = gamma * P / rho
|
|
244
|
+
gamma = plasma.constants.polytropic_index["scalar"]
|
|
245
|
+
|
|
246
|
+
assert np.all(np.isfinite(cs))
|
|
247
|
+
assert np.abs(gamma - 5.0/3.0) < 1e-15 # Verify exact fractional representation
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
#### Test 5.2: `test_anisotropic_alfven_speed_stability()`
|
|
251
|
+
```python
|
|
252
|
+
def test_anisotropic_alfven_speed_stability():
|
|
253
|
+
"""Test anisotropic Alfvén speed calculation stability."""
|
|
254
|
+
plasma_data = create_minimal_plasma()
|
|
255
|
+
|
|
256
|
+
# Create anisotropic pressure scenario
|
|
257
|
+
plasma_data.loc[:, ("w", "x", "p1")] = 100.0 # High parallel temp
|
|
258
|
+
plasma_data.loc[:, ("w", "y", "p1")] = 10.0 # Low perp temp
|
|
259
|
+
plasma_data.loc[:, ("w", "z", "p1")] = 10.0 # Low perp temp
|
|
260
|
+
|
|
261
|
+
plasma = Plasma(plasma_data)
|
|
262
|
+
caani = plasma.caani("p1")
|
|
263
|
+
|
|
264
|
+
assert np.all(np.isfinite(caani))
|
|
265
|
+
assert np.all(caani > 0)
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
## HIGH PRIORITY: Mathematical Operations (8 tests)
|
|
271
|
+
|
|
272
|
+
### 6. Square Root Operation Stability (`tests/core/test_mathematical_ops.py`)
|
|
273
|
+
|
|
274
|
+
#### Test 6.1: `test_safe_sqrt_negative_arguments()`
|
|
275
|
+
```python
|
|
276
|
+
def test_safe_sqrt_negative_arguments():
|
|
277
|
+
"""Test safe square root implementation for negative arguments."""
|
|
278
|
+
from solarwindpy.core.numerical_utils import safe_sqrt # To be implemented
|
|
279
|
+
|
|
280
|
+
# Test cases with negative values
|
|
281
|
+
test_values = np.array([-1.0, -1e-15, 0.0, 1e-15, 1.0])
|
|
282
|
+
|
|
283
|
+
result = safe_sqrt(test_values)
|
|
284
|
+
|
|
285
|
+
# Negative values should become NaN, others should be valid
|
|
286
|
+
expected_nan_mask = test_values < 0
|
|
287
|
+
assert np.all(np.isnan(result[expected_nan_mask]))
|
|
288
|
+
assert np.all(np.isfinite(result[~expected_nan_mask]))
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
#### Test 6.2: `test_sqrt_precision_small_arguments()`
|
|
292
|
+
```python
|
|
293
|
+
def test_sqrt_precision_small_arguments():
|
|
294
|
+
"""Test square root precision for very small arguments."""
|
|
295
|
+
small_values = np.array([1e-300, 1e-100, 1e-50, 1e-20])
|
|
296
|
+
|
|
297
|
+
# Compare different sqrt implementations
|
|
298
|
+
numpy_result = np.sqrt(small_values)
|
|
299
|
+
pandas_result = pd.Series(small_values).pipe(np.sqrt)
|
|
300
|
+
power_result = small_values**0.5
|
|
301
|
+
|
|
302
|
+
# All should be consistent to machine precision
|
|
303
|
+
assert np.allclose(numpy_result, pandas_result, rtol=1e-15)
|
|
304
|
+
assert np.allclose(numpy_result, power_result, rtol=1e-15)
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
### 7. Division Operation Stability
|
|
308
|
+
|
|
309
|
+
#### Test 7.1: `test_safe_division_zero_denominators()`
|
|
310
|
+
```python
|
|
311
|
+
def test_safe_division_zero_denominators():
|
|
312
|
+
"""Test safe division with zero denominators."""
|
|
313
|
+
numerators = np.array([1.0, 0.0, -1.0, np.inf])
|
|
314
|
+
denominators = np.array([0.0, 0.0, 0.0, 0.0])
|
|
315
|
+
|
|
316
|
+
# Should handle division by zero gracefully
|
|
317
|
+
with warnings.catch_warnings():
|
|
318
|
+
warnings.simplefilter("ignore", RuntimeWarning)
|
|
319
|
+
result = numerators / denominators
|
|
320
|
+
|
|
321
|
+
# All should be infinite or NaN
|
|
322
|
+
assert np.all(~np.isfinite(result))
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
#### Test 7.2: `test_division_extreme_ratios()`
|
|
326
|
+
```python
|
|
327
|
+
def test_division_extreme_ratios():
|
|
328
|
+
"""Test division with extreme ratios that might overflow."""
|
|
329
|
+
large_num = 1e308
|
|
330
|
+
small_denom = 1e-308
|
|
331
|
+
|
|
332
|
+
# This should overflow to infinity
|
|
333
|
+
result = large_num / small_denom
|
|
334
|
+
assert np.isinf(result)
|
|
335
|
+
|
|
336
|
+
# Reverse should underflow to zero
|
|
337
|
+
result_reverse = small_denom / large_num
|
|
338
|
+
assert result_reverse == 0.0 or result_reverse < 1e-300
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
### 8. Complex Number Operations
|
|
342
|
+
|
|
343
|
+
#### Test 8.1: `test_complex_sqrt_branch_cuts()`
|
|
344
|
+
```python
|
|
345
|
+
def test_complex_sqrt_branch_cuts():
|
|
346
|
+
"""Test complex square root operations near branch cuts."""
|
|
347
|
+
# Test values near negative real axis
|
|
348
|
+
test_values = np.array([-1+1j*1e-15, -1-1j*1e-15, -1+0j])
|
|
349
|
+
|
|
350
|
+
result = np.sqrt(test_values)
|
|
351
|
+
|
|
352
|
+
# Should be finite and on correct Riemann sheet
|
|
353
|
+
assert np.all(np.isfinite(result))
|
|
354
|
+
assert np.all(np.imag(result) >= 0) # Principal branch
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
#### Test 8.2: `test_complex_phase_unwrapping()`
|
|
358
|
+
```python
|
|
359
|
+
def test_complex_phase_unwrapping():
|
|
360
|
+
"""Test phase calculations near 2π boundaries."""
|
|
361
|
+
# Values near phase wrap-around
|
|
362
|
+
z1 = np.exp(1j * (2*np.pi - 1e-15))
|
|
363
|
+
z2 = np.exp(1j * 1e-15)
|
|
364
|
+
|
|
365
|
+
phase_diff = np.angle(z1) - np.angle(z2)
|
|
366
|
+
|
|
367
|
+
# Should handle phase wrapping correctly
|
|
368
|
+
assert np.abs(phase_diff - (-1e-15)) < 1e-14
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
---
|
|
372
|
+
|
|
373
|
+
## MEDIUM PRIORITY: Fitfunctions Stability (6 tests)
|
|
374
|
+
|
|
375
|
+
### 9. Curve Fitting Numerical Stability (`tests/fitfunctions/test_numerical_stability.py`)
|
|
376
|
+
|
|
377
|
+
#### Test 9.1: `test_extreme_parameter_fitting()`
|
|
378
|
+
```python
|
|
379
|
+
def test_extreme_parameter_fitting():
|
|
380
|
+
"""Test curve fitting with extreme but valid parameters."""
|
|
381
|
+
from solarwindpy.fitfunctions.lines import Line
|
|
382
|
+
|
|
383
|
+
# Data with extreme dynamic range
|
|
384
|
+
x = np.array([1e-10, 1e-5, 1.0, 1e5, 1e10])
|
|
385
|
+
y = 1e15 * x + 1e-15 # Extreme slope and intercept
|
|
386
|
+
|
|
387
|
+
line_fit = Line(x, y)
|
|
388
|
+
line_fit.make_fit()
|
|
389
|
+
|
|
390
|
+
# Should converge to reasonable values
|
|
391
|
+
assert line_fit.fit_result.success
|
|
392
|
+
assert np.isfinite(line_fit.popt["m"])
|
|
393
|
+
assert np.isfinite(line_fit.popt["b"])
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
#### Test 9.2: `test_ill_conditioned_matrix_detection()`
|
|
397
|
+
```python
|
|
398
|
+
def test_ill_conditioned_matrix_detection():
|
|
399
|
+
"""Test detection of ill-conditioned fitting matrices."""
|
|
400
|
+
from solarwindpy.fitfunctions.gaussians import Gaussian
|
|
401
|
+
|
|
402
|
+
# Create nearly collinear data points
|
|
403
|
+
x = np.linspace(0, 1, 100)
|
|
404
|
+
y = np.exp(-0.5 * x**2) + 1e-15 * np.random.randn(100)
|
|
405
|
+
|
|
406
|
+
gauss_fit = Gaussian(x, y)
|
|
407
|
+
|
|
408
|
+
# Should either warn about conditioning or handle gracefully
|
|
409
|
+
with warnings.catch_warnings(record=True) as w:
|
|
410
|
+
gauss_fit.make_fit()
|
|
411
|
+
if len(w) > 0:
|
|
412
|
+
assert any("conditioning" in str(warning.message).lower() for warning in w)
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
#### Test 9.3: `test_convergence_monitoring()`
|
|
416
|
+
```python
|
|
417
|
+
def test_convergence_monitoring():
|
|
418
|
+
"""Test convergence monitoring for iterative fits."""
|
|
419
|
+
from solarwindpy.fitfunctions.exponentials import Exponential
|
|
420
|
+
|
|
421
|
+
# Data that requires many iterations
|
|
422
|
+
x = np.linspace(0, 10, 50)
|
|
423
|
+
y = np.exp(-0.1 * x) + 0.1 * np.random.randn(50)
|
|
424
|
+
|
|
425
|
+
exp_fit = Exponential(x, y)
|
|
426
|
+
exp_fit.make_fit()
|
|
427
|
+
|
|
428
|
+
# Should track convergence metrics
|
|
429
|
+
assert hasattr(exp_fit.fit_result, 'nfev') # Number of function evaluations
|
|
430
|
+
assert exp_fit.fit_result.nfev < 10000 # Reasonable iteration limit
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
### 10. Robust Fitting Algorithms
|
|
434
|
+
|
|
435
|
+
#### Test 10.1: `test_outlier_robustness()`
|
|
436
|
+
```python
|
|
437
|
+
def test_outlier_robustness():
|
|
438
|
+
"""Test fitting robustness to data outliers."""
|
|
439
|
+
from solarwindpy.fitfunctions.lines import Line
|
|
440
|
+
|
|
441
|
+
# Clean linear data with outliers
|
|
442
|
+
x = np.linspace(0, 10, 100)
|
|
443
|
+
y_clean = 2 * x + 1
|
|
444
|
+
y_outliers = y_clean.copy()
|
|
445
|
+
y_outliers[50] = 1000 # Major outlier
|
|
446
|
+
|
|
447
|
+
line_fit = Line(x, y_outliers)
|
|
448
|
+
line_fit.make_fit()
|
|
449
|
+
|
|
450
|
+
# Huber loss should be robust to outliers
|
|
451
|
+
assert np.abs(line_fit.popt["m"] - 2.0) < 0.5 # Should be close to true slope
|
|
452
|
+
assert np.abs(line_fit.popt["b"] - 1.0) < 0.5 # Should be close to true intercept
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
#### Test 10.2: `test_numerical_gradient_accuracy()`
|
|
456
|
+
```python
|
|
457
|
+
def test_numerical_gradient_accuracy():
|
|
458
|
+
"""Test accuracy of numerical gradient calculations."""
|
|
459
|
+
from solarwindpy.fitfunctions.gaussians import Gaussian
|
|
460
|
+
|
|
461
|
+
# Simple Gaussian with known analytical derivatives
|
|
462
|
+
x = np.linspace(-3, 3, 100)
|
|
463
|
+
y = np.exp(-0.5 * x**2)
|
|
464
|
+
|
|
465
|
+
gauss_fit = Gaussian(x, y)
|
|
466
|
+
gauss_fit.make_fit()
|
|
467
|
+
|
|
468
|
+
# Check that numerical Jacobian is reasonable
|
|
469
|
+
if hasattr(gauss_fit.fit_result, 'jac'):
|
|
470
|
+
assert np.all(np.isfinite(gauss_fit.fit_result.jac))
|
|
471
|
+
assert np.max(np.abs(gauss_fit.fit_result.jac)) < 1e10 # No extreme gradients
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
#### Test 10.3: `test_parameter_bounds_enforcement()`
|
|
475
|
+
```python
|
|
476
|
+
def test_parameter_bounds_enforcement():
|
|
477
|
+
"""Test enforcement of parameter bounds in fitting."""
|
|
478
|
+
from solarwindpy.fitfunctions.exponentials import Exponential
|
|
479
|
+
|
|
480
|
+
# Data that would naturally fit outside reasonable bounds
|
|
481
|
+
x = np.linspace(0, 1, 50)
|
|
482
|
+
y = np.exp(-1000 * x) # Extremely rapid decay
|
|
483
|
+
|
|
484
|
+
exp_fit = Exponential(x, y)
|
|
485
|
+
|
|
486
|
+
# Should either handle extreme parameters or enforce bounds
|
|
487
|
+
try:
|
|
488
|
+
exp_fit.make_fit()
|
|
489
|
+
# If successful, parameters should be reasonable
|
|
490
|
+
assert np.all(np.isfinite(list(exp_fit.popt.values())))
|
|
491
|
+
except (ValueError, RuntimeError):
|
|
492
|
+
# Acceptable to fail on extreme cases with proper error
|
|
493
|
+
pass
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
---
|
|
497
|
+
|
|
498
|
+
## INTEGRATION PRIORITY: Cross-Module Tests (5 tests)
|
|
499
|
+
|
|
500
|
+
### 11. Physics-Mathematics Integration (`tests/integration/test_numerical_integration.py`)
|
|
501
|
+
|
|
502
|
+
#### Test 11.1: `test_thermal_alfven_speed_consistency()`
|
|
503
|
+
```python
|
|
504
|
+
def test_thermal_alfven_speed_consistency():
|
|
505
|
+
"""Test numerical consistency between thermal and Alfvén speeds."""
|
|
506
|
+
plasma_data = create_minimal_plasma()
|
|
507
|
+
plasma = Plasma(plasma_data)
|
|
508
|
+
|
|
509
|
+
thermal_speed = plasma.thermal_speed("p1")
|
|
510
|
+
alfven_speed = plasma.ca("p1")
|
|
511
|
+
|
|
512
|
+
# Plasma beta should be consistent with ratio
|
|
513
|
+
# beta ~ (thermal_speed / alfven_speed)^2
|
|
514
|
+
speed_ratio = thermal_speed.divide(alfven_speed)
|
|
515
|
+
|
|
516
|
+
assert np.all(np.isfinite(speed_ratio))
|
|
517
|
+
assert np.all(speed_ratio > 0)
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
#### Test 11.2: `test_pressure_calculation_paths()`
|
|
521
|
+
```python
|
|
522
|
+
def test_pressure_calculation_paths():
|
|
523
|
+
"""Test different calculation paths give consistent pressure."""
|
|
524
|
+
plasma_data = create_minimal_plasma()
|
|
525
|
+
plasma = Plasma(plasma_data)
|
|
526
|
+
|
|
527
|
+
# Calculate pressure via different routes
|
|
528
|
+
# Route 1: From thermal speed
|
|
529
|
+
w = plasma.thermal_speed("p1")
|
|
530
|
+
n = plasma.number_density("p1")
|
|
531
|
+
m = plasma.constants.m_in_mp["p1"]
|
|
532
|
+
pressure_from_w = n * m * w**2 / 2 # mw²/2 = kT, P = nkT
|
|
533
|
+
|
|
534
|
+
# Route 2: Direct pressure calculation (if available)
|
|
535
|
+
# pressure_direct = plasma.pressure("p1")
|
|
536
|
+
|
|
537
|
+
# Should be numerically consistent
|
|
538
|
+
# assert np.allclose(pressure_from_w, pressure_direct, rtol=1e-12)
|
|
539
|
+
assert np.all(np.isfinite(pressure_from_w)) # Placeholder test
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
### 12. Units and Constants Propagation
|
|
543
|
+
|
|
544
|
+
#### Test 12.1: `test_unit_conversion_precision()`
|
|
545
|
+
```python
|
|
546
|
+
def test_unit_conversion_precision():
|
|
547
|
+
"""Test precision preservation through unit conversions."""
|
|
548
|
+
from solarwindpy.tools.units_constants import UnitsConstants
|
|
549
|
+
|
|
550
|
+
uc = UnitsConstants()
|
|
551
|
+
|
|
552
|
+
# Test round-trip conversions
|
|
553
|
+
original_value = 1.23456789012345
|
|
554
|
+
|
|
555
|
+
# Example: Convert thermal speed units
|
|
556
|
+
converted = original_value * uc.w
|
|
557
|
+
back_converted = converted / uc.w
|
|
558
|
+
|
|
559
|
+
# Should preserve precision to machine epsilon
|
|
560
|
+
assert np.abs(back_converted - original_value) < 1e-15
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
#### Test 12.2: `test_extreme_scale_unit_conversions()`
|
|
564
|
+
```python
|
|
565
|
+
def test_extreme_scale_unit_conversions():
|
|
566
|
+
"""Test unit conversions at extreme scales."""
|
|
567
|
+
from solarwindpy.tools.units_constants import UnitsConstants
|
|
568
|
+
|
|
569
|
+
uc = UnitsConstants()
|
|
570
|
+
|
|
571
|
+
# Test very large and very small values
|
|
572
|
+
test_values = [1e-100, 1e-20, 1.0, 1e20, 1e100]
|
|
573
|
+
|
|
574
|
+
for value in test_values:
|
|
575
|
+
# Convert to different units and back
|
|
576
|
+
converted = value * uc.v # Velocity units
|
|
577
|
+
back = converted / uc.v
|
|
578
|
+
|
|
579
|
+
# Should maintain relative precision
|
|
580
|
+
if value != 0:
|
|
581
|
+
rel_error = np.abs(back - value) / np.abs(value)
|
|
582
|
+
assert rel_error < 1e-14
|
|
583
|
+
```
|
|
584
|
+
|
|
585
|
+
### 13. Data Pipeline Numerical Consistency
|
|
586
|
+
|
|
587
|
+
#### Test 13.1: `test_multiindex_numerical_precision()`
|
|
588
|
+
```python
|
|
589
|
+
def test_multiindex_numerical_precision():
|
|
590
|
+
"""Test numerical precision in MultiIndex DataFrame operations."""
|
|
591
|
+
# Create test data with challenging numerical values
|
|
592
|
+
index = pd.date_range('2020-01-01', periods=100, freq='1T')
|
|
593
|
+
|
|
594
|
+
# Use values that might suffer precision loss
|
|
595
|
+
small_values = 1e-15 * np.random.randn(100)
|
|
596
|
+
large_values = 1e15 * np.random.randn(100)
|
|
597
|
+
|
|
598
|
+
# Create MultiIndex structure similar to SolarWindPy
|
|
599
|
+
columns = pd.MultiIndex.from_tuples([
|
|
600
|
+
('v', 'x', 'p1'), ('v', 'y', 'p1'), ('v', 'z', 'p1'),
|
|
601
|
+
('w', 'x', 'p1'), ('w', 'y', 'p1'), ('w', 'z', 'p1')
|
|
602
|
+
], names=['M', 'C', 'S'])
|
|
603
|
+
|
|
604
|
+
data = pd.DataFrame(
|
|
605
|
+
np.column_stack([large_values] * 3 + [small_values] * 3),
|
|
606
|
+
index=index, columns=columns
|
|
607
|
+
)
|
|
608
|
+
|
|
609
|
+
# Operations should preserve precision
|
|
610
|
+
velocity = data.xs('v', level='M')
|
|
611
|
+
thermal = data.xs('w', level='M')
|
|
612
|
+
|
|
613
|
+
# Mathematical operations
|
|
614
|
+
speed = np.sqrt(velocity.pow(2).sum(axis=1))
|
|
615
|
+
thermal_speed = np.sqrt(thermal.pow(2).sum(axis=1))
|
|
616
|
+
|
|
617
|
+
assert np.all(np.isfinite(speed))
|
|
618
|
+
assert np.all(np.isfinite(thermal_speed))
|
|
619
|
+
```
|
|
620
|
+
|
|
621
|
+
---
|
|
622
|
+
|
|
623
|
+
## Implementation Guidance
|
|
624
|
+
|
|
625
|
+
### File Organization
|
|
626
|
+
```
|
|
627
|
+
tests/
|
|
628
|
+
├── core/
|
|
629
|
+
│ ├── test_plasma_numerical.py # Tests 1.1-1.4, 2.1-2.3, 4.1, 5.1-5.2
|
|
630
|
+
│ └── test_mathematical_ops.py # Tests 6.1-6.2, 7.1-7.2, 8.1-8.2
|
|
631
|
+
├── fitfunctions/
|
|
632
|
+
│ └── test_numerical_stability.py # Tests 9.1-9.3, 10.1-10.3
|
|
633
|
+
├── integration/
|
|
634
|
+
│ └── test_numerical_integration.py # Tests 11.1-11.2, 12.1-12.2, 13.1
|
|
635
|
+
└── utils/
|
|
636
|
+
└── numerical_utils.py # Helper functions (safe_sqrt, etc.)
|
|
637
|
+
```
|
|
638
|
+
|
|
639
|
+
### Test Infrastructure Requirements
|
|
640
|
+
|
|
641
|
+
#### New Utility Functions Needed
|
|
642
|
+
```python
|
|
643
|
+
# tests/utils/numerical_utils.py
|
|
644
|
+
def safe_sqrt(values, fill_value=np.nan):
|
|
645
|
+
"""Numerically safe square root with domain validation."""
|
|
646
|
+
|
|
647
|
+
def create_minimal_plasma():
|
|
648
|
+
"""Create minimal plasma data for numerical testing."""
|
|
649
|
+
|
|
650
|
+
def assert_numerical_stability(values, tolerance=1e-14):
|
|
651
|
+
"""Assert numerical stability properties."""
|
|
652
|
+
```
|
|
653
|
+
|
|
654
|
+
#### Fixtures for Numerical Testing
|
|
655
|
+
```python
|
|
656
|
+
@pytest.fixture
|
|
657
|
+
def extreme_plasma_parameters():
|
|
658
|
+
"""Fixture providing extreme but physical plasma parameters."""
|
|
659
|
+
|
|
660
|
+
@pytest.fixture
|
|
661
|
+
def precision_test_data():
|
|
662
|
+
"""Fixture providing data designed to test numerical precision."""
|
|
663
|
+
```
|
|
664
|
+
|
|
665
|
+
### Implementation Priorities
|
|
666
|
+
|
|
667
|
+
#### Week 1: Critical Physics Tests (Tests 1.1-2.3)
|
|
668
|
+
- Focus on thermal speed and Alfvén speed edge cases
|
|
669
|
+
- Implement domain validation warnings
|
|
670
|
+
- Add basic overflow/underflow protection
|
|
671
|
+
|
|
672
|
+
#### Week 2: Mathematical Operations (Tests 6.1-8.2)
|
|
673
|
+
- Create safe mathematical operation utilities
|
|
674
|
+
- Test extreme value handling
|
|
675
|
+
- Validate precision conservation
|
|
676
|
+
|
|
677
|
+
#### Week 3: Fitfunctions and Integration (Tests 9.1-13.1)
|
|
678
|
+
- Add robustness tests to fitting algorithms
|
|
679
|
+
- Implement cross-module consistency checks
|
|
680
|
+
- Validate unit conversion precision
|
|
681
|
+
|
|
682
|
+
### Expected Impact
|
|
683
|
+
|
|
684
|
+
#### Coverage Improvement
|
|
685
|
+
- **Baseline:** 77.1% total coverage
|
|
686
|
+
- **Target:** 81.6% total coverage (+4.5%)
|
|
687
|
+
- **Numerical-specific:** ~2% → ~6% (+300% relative improvement)
|
|
688
|
+
|
|
689
|
+
#### Stability Grade Improvement
|
|
690
|
+
- **Current:** C+ (71%)
|
|
691
|
+
- **Target:** A- (90%+)
|
|
692
|
+
- **Physics Risk Reduction:** High → Low for critical calculations
|
|
693
|
+
|
|
694
|
+
#### Physics Validation Alignment
|
|
695
|
+
These tests directly address Phase 2 physics requirements:
|
|
696
|
+
- **Thermal speed convention:** Validated through precision tests
|
|
697
|
+
- **Alfvén speed physics:** Protected against singularities
|
|
698
|
+
- **Unit consistency:** Precision preservation through conversions
|
|
699
|
+
|
|
700
|
+
---
|
|
701
|
+
|
|
702
|
+
## Test Execution Strategy
|
|
703
|
+
|
|
704
|
+
### Automated Testing Integration
|
|
705
|
+
```bash
|
|
706
|
+
# Run only numerical stability tests
|
|
707
|
+
pytest tests/ -k "numerical or stability or precision" -v
|
|
708
|
+
|
|
709
|
+
# Run critical physics tests
|
|
710
|
+
pytest tests/core/test_plasma_numerical.py -v
|
|
711
|
+
|
|
712
|
+
# Run with coverage for numerical modules
|
|
713
|
+
pytest --cov=solarwindpy.core --cov-report=html tests/core/test_plasma_numerical.py
|
|
714
|
+
```
|
|
715
|
+
|
|
716
|
+
### Continuous Integration Enhancements
|
|
717
|
+
```yaml
|
|
718
|
+
# .github/workflows/numerical-tests.yml
|
|
719
|
+
- name: Run Numerical Stability Tests
|
|
720
|
+
run: |
|
|
721
|
+
pytest tests/ -k "numerical" --cov=solarwindpy --cov-fail-under=81
|
|
722
|
+
```
|
|
723
|
+
|
|
724
|
+
### Performance Benchmarking
|
|
725
|
+
```python
|
|
726
|
+
# Include performance regression tests
|
|
727
|
+
def test_numerical_performance_regression():
|
|
728
|
+
"""Ensure numerical stability fixes don't severely impact performance."""
|
|
729
|
+
# Benchmark critical paths before and after numerical improvements
|
|
730
|
+
```
|
|
731
|
+
|
|
732
|
+
---
|
|
733
|
+
|
|
734
|
+
**Total Recommended Tests:** 34
|
|
735
|
+
**Implementation Timeline:** 3-4 weeks
|
|
736
|
+
**Coverage Increase:** +4.5%
|
|
737
|
+
**Expected Grade:** A- (90%+)
|
|
738
|
+
|
|
739
|
+
**Next Steps:** Prioritize Critical Physics Tests (1.1-2.3) for immediate implementation, then proceed through priority levels systematically.
|