solarwindpy 0.0.1.dev0__py3-none-any.whl → 0.1.1__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.1.dist-info/METADATA +181 -0
- solarwindpy-0.1.1.dist-info/RECORD +409 -0
- {solarwindpy-0.0.1.dev0.dist-info → solarwindpy-0.1.1.dist-info}/WHEEL +1 -1
- solarwindpy-0.1.1.dist-info/licenses/LICENSE.rst +32 -0
- solarwindpy-0.1.1.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,686 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
r"""Tools for creating physical quantity plot labels."""
|
|
3
|
+
import pdb # noqa: F401
|
|
4
|
+
import logging
|
|
5
|
+
import re
|
|
6
|
+
from abc import ABC
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
from string import Template as StringTemplate
|
|
9
|
+
from collections import namedtuple
|
|
10
|
+
|
|
11
|
+
MCS = namedtuple("MCS", "m,c,s")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
__isotope_species = r"^{%s}\mathrm{%s}"
|
|
15
|
+
_trans_species = {
|
|
16
|
+
"e": r"e^-",
|
|
17
|
+
"a": r"\alpha",
|
|
18
|
+
"a1": r"\alpha_1",
|
|
19
|
+
"a2": r"\alpha_2",
|
|
20
|
+
"p": r"p",
|
|
21
|
+
"p_bimax": r"p",
|
|
22
|
+
"p1": r"p_1",
|
|
23
|
+
"p2": r"p_2",
|
|
24
|
+
"he": r"\mathrm{He}",
|
|
25
|
+
"dv": r"\Delta v", # Because we want pdv in species
|
|
26
|
+
# "H": r"\mathrm{H}",
|
|
27
|
+
# "C": r"\mathrm{Fe}",
|
|
28
|
+
# "Fe": ,
|
|
29
|
+
# "He": ,
|
|
30
|
+
# "Mg": ,
|
|
31
|
+
# "Ne": ,
|
|
32
|
+
# "N": ,
|
|
33
|
+
# "O": ,
|
|
34
|
+
# "Si": ,
|
|
35
|
+
# "S": ,
|
|
36
|
+
# "3He": __isotope_species % (3, "He"),
|
|
37
|
+
# "4He": __isotope_species % (4, "He"),
|
|
38
|
+
# "12C": __isotope_species % (12, "C"),
|
|
39
|
+
# "14N": __isotope_species % (14, "N"),
|
|
40
|
+
# "16O": __isotope_species % (16, "O"),
|
|
41
|
+
# "20Ne": __isotope_species % (20, "Ne"),
|
|
42
|
+
# "24Mg": __isotope_species % (24, "Mg"),
|
|
43
|
+
# "28Si": __isotope_species % (28, "Si"),
|
|
44
|
+
# "32S": __isotope_species % (32, "S"),
|
|
45
|
+
# "40Ca": __isotope_species % (40, "Ca"),
|
|
46
|
+
# "Fe": r"\mathrm{Fe}",
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
for s in ("C", "Fe", "He", "H", "Mg", "Ne", "N", "O", "Si", "S"):
|
|
50
|
+
_trans_species[s] = r"\mathrm{%s}" % s
|
|
51
|
+
|
|
52
|
+
for i, s in (
|
|
53
|
+
(3, "He"),
|
|
54
|
+
(4, "He"),
|
|
55
|
+
(12, "C"),
|
|
56
|
+
(14, "N"),
|
|
57
|
+
(16, "O"),
|
|
58
|
+
(20, "Ne"),
|
|
59
|
+
(24, "Mg"),
|
|
60
|
+
(28, "Si"),
|
|
61
|
+
(32, "S"),
|
|
62
|
+
(40, "Ca"),
|
|
63
|
+
):
|
|
64
|
+
_trans_species[f"{i}{s}"] = __isotope_species % (i, s)
|
|
65
|
+
|
|
66
|
+
_trans_axnorm = {
|
|
67
|
+
None: "",
|
|
68
|
+
"c": "Col.",
|
|
69
|
+
"r": "Row",
|
|
70
|
+
"t": "Total",
|
|
71
|
+
"d": "Density",
|
|
72
|
+
"rd": "1D Probability Density",
|
|
73
|
+
"cd": "1D Probability Density",
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
_all_species_re = sorted(_trans_species.keys())[
|
|
77
|
+
::-1
|
|
78
|
+
] # Order so we check for p1 and p2 before p.
|
|
79
|
+
_all_species_re = re.compile(r"({})".format("|".join(_all_species_re)))
|
|
80
|
+
_default_template_string = "{$M}_{{$C};{$S}}"
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
def _run_species_substitution(pattern):
|
|
84
|
+
"""Replace species codes in a string with their LaTeX equivalents.
|
|
85
|
+
|
|
86
|
+
Parameters
|
|
87
|
+
----------
|
|
88
|
+
pattern : str
|
|
89
|
+
String potentially containing species codes.
|
|
90
|
+
|
|
91
|
+
Returns
|
|
92
|
+
-------
|
|
93
|
+
tuple
|
|
94
|
+
``(new_string, count)`` from :func:`re.subn`.
|
|
95
|
+
|
|
96
|
+
Notes
|
|
97
|
+
-----
|
|
98
|
+
Only substitutions defined in ``_trans_species`` are performed. The
|
|
99
|
+
implementation relies on the simple mapping used in this module and may
|
|
100
|
+
need to be revisited for more complex patterns.
|
|
101
|
+
"""
|
|
102
|
+
|
|
103
|
+
def repl(x):
|
|
104
|
+
return _trans_species[x.group()]
|
|
105
|
+
|
|
106
|
+
substitution = re.subn(_all_species_re, repl, pattern)
|
|
107
|
+
|
|
108
|
+
return substitution
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
_trans_measurement = {
|
|
112
|
+
"pth": r"P",
|
|
113
|
+
"beta": r"\beta",
|
|
114
|
+
"dbeta": r"\Delta \beta",
|
|
115
|
+
"dv": r"\Delta v",
|
|
116
|
+
"qhat": r"\widehat{q}",
|
|
117
|
+
"Qhat": r"\widehat{q}",
|
|
118
|
+
"ab": r"A",
|
|
119
|
+
"theta": r"\theta",
|
|
120
|
+
"cos_theta": r"\cos\theta",
|
|
121
|
+
"carr": r"\mathrm{Carrington}",
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
_inU = {
|
|
125
|
+
"b": r"\mathrm{nT}",
|
|
126
|
+
"Re": r"\mathrm{R}_\oplus",
|
|
127
|
+
"Rs": r"\mathrm{R}_\odot",
|
|
128
|
+
"kms": r"\mathrm{km \; s^{-1}}",
|
|
129
|
+
"pPa": r"\mathrm{pPa}",
|
|
130
|
+
"cm-3": r"\mathrm{cm}^{-3}",
|
|
131
|
+
"dimless": r"\mathrm{\#}",
|
|
132
|
+
"unknown": r"???",
|
|
133
|
+
"km": r"\mathrm{km}",
|
|
134
|
+
"deg": r"\mathrm{deg.}",
|
|
135
|
+
# "deg": r"\degree",
|
|
136
|
+
"Hz": r"\mathrm{Hz}",
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
_trans_units = {
|
|
140
|
+
# Vector components.
|
|
141
|
+
"gse": _inU["Re"],
|
|
142
|
+
"hci": _inU["Rs"],
|
|
143
|
+
"colat": _inU["deg"],
|
|
144
|
+
"lat": _inU["deg"],
|
|
145
|
+
"lon": _inU["deg"],
|
|
146
|
+
"carr": _inU["deg"],
|
|
147
|
+
# Trig things.
|
|
148
|
+
"theta": _inU["deg"],
|
|
149
|
+
"phi": _inU["deg"],
|
|
150
|
+
"deg": _inU["deg"],
|
|
151
|
+
"cos": _inU["dimless"],
|
|
152
|
+
"cos_theta": _inU["dimless"],
|
|
153
|
+
# Timestamps.
|
|
154
|
+
"year": r"\mathrm{Year}",
|
|
155
|
+
"fdoy": r"\mathrm{fdoy}",
|
|
156
|
+
# Plasma measurements.
|
|
157
|
+
"b": _inU["b"],
|
|
158
|
+
"n": _inU["cm-3"],
|
|
159
|
+
"rho": r"m_p \; " + _inU["cm-3"],
|
|
160
|
+
"v": _inU["kms"],
|
|
161
|
+
"w": _inU["kms"],
|
|
162
|
+
"dv": _inU["kms"],
|
|
163
|
+
"dn": _inU["cm-3"],
|
|
164
|
+
"cs": _inU["kms"],
|
|
165
|
+
"ca": _inU["kms"],
|
|
166
|
+
"afsq": _inU["dimless"],
|
|
167
|
+
"caani": _inU["kms"],
|
|
168
|
+
# Temperatures, pressures, and anisotropies.
|
|
169
|
+
"p": _inU["pPa"],
|
|
170
|
+
"pth": _inU["pPa"],
|
|
171
|
+
"T": r"10^5 \, \mathrm{K}",
|
|
172
|
+
"q": r"\mathrm{mW \, cm^{-2}}", # heat flux,
|
|
173
|
+
"qhat": _inU["dimless"], # normalized heat flux
|
|
174
|
+
"Q": r"\mathrm{mW \, cm^{-2}}", # heating rate
|
|
175
|
+
"R": r"\perp/\parallel",
|
|
176
|
+
"beta": _inU["dimless"],
|
|
177
|
+
"pdv": _inU["pPa"],
|
|
178
|
+
"edv": _inU["dimless"],
|
|
179
|
+
"S": r"\mathrm{eV \, cm^2 \, m_p^{-5/3}}", # Specific Entropy
|
|
180
|
+
# Flux
|
|
181
|
+
"flux": r"10^{-9} \, %s \, s^{-1}" % _inU["cm-3"].replace("-3", "-2"),
|
|
182
|
+
# Collisional things
|
|
183
|
+
"lnlambda": _inU["dimless"],
|
|
184
|
+
# TODO: verify that these units are Hertz.
|
|
185
|
+
"nuc": r"10^{-7} \mathrm{Hz}",
|
|
186
|
+
"nc": _inU["dimless"],
|
|
187
|
+
"chisq": _inU["dimless"],
|
|
188
|
+
"chisqnu": _inU["dimless"],
|
|
189
|
+
"VDFratio": _inU["dimless"],
|
|
190
|
+
"ab": r"\%",
|
|
191
|
+
"e": _inU["kms"],
|
|
192
|
+
# Alfvenic Turbulence
|
|
193
|
+
"zp": _inU["kms"],
|
|
194
|
+
"zm": _inU["kms"],
|
|
195
|
+
"ep": r"(%s)^2" % _inU["kms"],
|
|
196
|
+
"em": r"(%s)^2" % _inU["kms"],
|
|
197
|
+
"ev": r"(%s)^2" % _inU["kms"],
|
|
198
|
+
"etot": r"(%s)^2" % _inU["kms"],
|
|
199
|
+
"eres": r"(%s)^2" % _inU["kms"],
|
|
200
|
+
"xhel": r"(%s)^2" % _inU["kms"],
|
|
201
|
+
"sigma_m": _inU["dimless"],
|
|
202
|
+
"sigma_c": _inU["dimless"],
|
|
203
|
+
"sigma_r": _inU["dimless"],
|
|
204
|
+
"sigma_xy": _inU["dimless"],
|
|
205
|
+
"ra": _inU["dimless"],
|
|
206
|
+
"re": _inU["dimless"],
|
|
207
|
+
# Nyquist things
|
|
208
|
+
"Wn": _inU["dimless"],
|
|
209
|
+
"omegaR": _inU["Hz"],
|
|
210
|
+
"gamma": _inU["Hz"],
|
|
211
|
+
"gamma_max": _inU["Hz"],
|
|
212
|
+
"gyro_freq": _inU["Hz"],
|
|
213
|
+
"kvec": _inU["dimless"],
|
|
214
|
+
"k": _inU["dimless"],
|
|
215
|
+
"insta_power": _inU["unknown"],
|
|
216
|
+
# Solar Activity
|
|
217
|
+
"Lalpha": r"\mathrm{W/m^2}",
|
|
218
|
+
"f10.7": r"\mathrm{Solar \, Flux \, Unit \, (SFU)}",
|
|
219
|
+
"CaK": r"Unknown \, Need \, to \, Read \, MetaData",
|
|
220
|
+
"MgII": _inU["dimless"],
|
|
221
|
+
# MISC
|
|
222
|
+
"entropy": r"\mathrm{ln}(K \, \mathrm{cm}^{-3/2})",
|
|
223
|
+
# Spectral things
|
|
224
|
+
"spectral_exponent": _inU["dimless"],
|
|
225
|
+
"MeV/nuc": r"\mathrm{MeV/nuc}",
|
|
226
|
+
# "SEP_differential_flux": r"\mathrm{\# \, cm^{-2} \, sr^{-1} \, s^{-1} \left(\frac{MeV}{nuc})^{-1}}",
|
|
227
|
+
"SEP_differential_flux": r"\mathrm{\frac{\#}{cm^2 \, sr \, s \, MeV/nuc}}",
|
|
228
|
+
"SEP_intensity": r"\mathrm{cm^2 \, sr \, s \, MeV/nuc}",
|
|
229
|
+
"SEP_energy": r"\mathrm{MeV/nuc}",
|
|
230
|
+
"SEP_spectrum_index": _inU["dimless"],
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
_trans_component = {
|
|
234
|
+
# Coordinates
|
|
235
|
+
"x": r"X",
|
|
236
|
+
"y": r"Y",
|
|
237
|
+
"z": r"Z",
|
|
238
|
+
"r": r"R",
|
|
239
|
+
"rho": r"\rho",
|
|
240
|
+
"colat": r"\lambda",
|
|
241
|
+
"lat": r"\theta",
|
|
242
|
+
"lon": r"\phi",
|
|
243
|
+
"R": r"\mathrm{R}",
|
|
244
|
+
"scalar": r"\mathrm{scalar}",
|
|
245
|
+
"theta": r"\theta",
|
|
246
|
+
"phi": r"\phi",
|
|
247
|
+
"per": r"\perp",
|
|
248
|
+
"par": r"\parallel",
|
|
249
|
+
"T": r"T", # For use with temperature anisotropy.
|
|
250
|
+
"p": r"p", # For use with pressure anisotropy.
|
|
251
|
+
"const": r"\mathrm{const}", # constant for ("w", "const", "") label.
|
|
252
|
+
# These will be replaced by dot products and regex.
|
|
253
|
+
"bv": r"{\mathbf{B} \cdot \mathbf{v}}",
|
|
254
|
+
"dv": r"\Delta v", # For "e" terms
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
_templates = {
|
|
258
|
+
# Timestamps
|
|
259
|
+
"year": r"\mathrm{Year}",
|
|
260
|
+
"fdoy": r"\mathrm{Fractional \; Day \; of \; Year}",
|
|
261
|
+
# Coordinates, e.g. for location plots.
|
|
262
|
+
"gse": r"{$C}_{\mathrm{GSE}}",
|
|
263
|
+
"hci": r"{$C}_{\mathrm{HCI}}",
|
|
264
|
+
"colat": r"\theta_{$C}",
|
|
265
|
+
"carr": r"{$C}_\mathrm{Carrington}",
|
|
266
|
+
"b": r"B_{$C}",
|
|
267
|
+
"n": r"n_{$S}",
|
|
268
|
+
"rho": r"\rho_{$S}",
|
|
269
|
+
"q": r"q_{{$C};{$S}}", # heat flux
|
|
270
|
+
"Q": r"Q_{{$C};{$S}}", # heating rate
|
|
271
|
+
"S": r"S_{$S}", # Specific entropy logarithm
|
|
272
|
+
"ratio": r"\mathrm{Ratio}",
|
|
273
|
+
"cos": r"\cos",
|
|
274
|
+
"cos_theta": r"\cos \theta_{{$C}_{$S}}",
|
|
275
|
+
"cos_phi": r"\cos \phi_{{$C}_{$S}}",
|
|
276
|
+
# Characteristic Velocities
|
|
277
|
+
"cs": r"C_{s;$S}",
|
|
278
|
+
"ca": r"C_{A;$S}",
|
|
279
|
+
"afsq": r"\mathrm{Anisotropy \, Factor}^2_{$S}",
|
|
280
|
+
"caani": r"C^{(\mathrm{Ani})}_{A;$S} \; ($C)",
|
|
281
|
+
# Collision things.
|
|
282
|
+
"lnlambda": r"\ln\Lambda_{$S}",
|
|
283
|
+
"nuc": r"\nu_{$C,$S}",
|
|
284
|
+
"nc": r"N_{C;$S}",
|
|
285
|
+
# Misc
|
|
286
|
+
"VDFratio": r"\mathrm{ln}(\frac{f_i}{f_j} \left(v_i\right)_{$S})",
|
|
287
|
+
"chisq": r"\chi^2",
|
|
288
|
+
"chisqnu": r"\chi^2_\nu",
|
|
289
|
+
"edv": r"P_{\Delta v}/P_\mathrm{th}|_{$S}",
|
|
290
|
+
"pdv": r"P_{\Delta v_{$S}}",
|
|
291
|
+
"ab": r"A_{$S}",
|
|
292
|
+
"e": r"e\left({$C}_{$S}\right)",
|
|
293
|
+
"entropy": r"\mathrm{S}_{$S}",
|
|
294
|
+
# Alfvenic Turbulence
|
|
295
|
+
"zp": r"Z^+_{{$S}}",
|
|
296
|
+
"zm": r"Z^-_{{$S}}",
|
|
297
|
+
"ep": r"e^+_{{$S}}",
|
|
298
|
+
"em": r"e^-_{{$S}}",
|
|
299
|
+
"ev": r"e^v_{{$S}}",
|
|
300
|
+
"etot": r"E_{{$S}}",
|
|
301
|
+
"eres": r"e^r_{{$S}}",
|
|
302
|
+
"xhel": r"e^c_{{$S}}",
|
|
303
|
+
"sigma_c": r"\sigma_{c;{$S}}",
|
|
304
|
+
"sigma_r": r"\sigma_{r;{$S}}",
|
|
305
|
+
"sigma_m": r"\sigma_{m}",
|
|
306
|
+
"sigma_xy": r"\sigma_{\parallel}",
|
|
307
|
+
"ra": r"r_{A;{$S}}",
|
|
308
|
+
"re": r"r_{E;{$S}}",
|
|
309
|
+
"dn": r"\delta n_{{$S}}",
|
|
310
|
+
# Instability things
|
|
311
|
+
"Wn": r"\mathrm{W_n}",
|
|
312
|
+
"gamma": r"\gamma",
|
|
313
|
+
"gamma_max": r"\gamma_\mathrm{max}",
|
|
314
|
+
"omegaR": r"\omega_R",
|
|
315
|
+
"gyro_freq": r"\Omega_{{$S}}",
|
|
316
|
+
"eth": r"\eth", # "_{{$C;$S}}"
|
|
317
|
+
"kvec": r"\mathbf{k}_{$C}\rho_{$S}",
|
|
318
|
+
"k": r"k_{$C}\rho_{$S}",
|
|
319
|
+
"insta_power": r"\mathcal{P}_{{$S}}",
|
|
320
|
+
# Solar Activity
|
|
321
|
+
# "ssn": r"{{$C}} \; \mathrm{SSN}",
|
|
322
|
+
"Lalpha": r"\mathrm{L}\alpha",
|
|
323
|
+
"f10.7": r"\mathrm{F}10.7",
|
|
324
|
+
"CaK": r"\mathrm{CaK}",
|
|
325
|
+
"MgII": r"\mathrm{MgII}",
|
|
326
|
+
# Flux
|
|
327
|
+
"flux": r"\mathrm{Flux}_{$C}({$S})",
|
|
328
|
+
# Spectral Exponents
|
|
329
|
+
"spectral_exponent": r"\mathrm{Spectral \, Exponent}",
|
|
330
|
+
"MeV/nuc": r"\mathrm{Energy}",
|
|
331
|
+
# "differential_flux": r"\mathrm{\frac{dJ}{dE}}",
|
|
332
|
+
"SEP_differential_flux": r"{{$S}} \: dJ/dE",
|
|
333
|
+
"SEP_intensity": r"{{$S}} \: \mathrm{Intensity}",
|
|
334
|
+
"SEP_energy": r"{{$S}} \: \mathrm{Energy}",
|
|
335
|
+
"SEP_spectrum_index": r"\gamma_{{$S}}",
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
class Base(ABC):
|
|
340
|
+
"""Base class for all label objects."""
|
|
341
|
+
|
|
342
|
+
def __init__(self):
|
|
343
|
+
"""Initialize the logger."""
|
|
344
|
+
self._init_logger()
|
|
345
|
+
|
|
346
|
+
def __str__(self):
|
|
347
|
+
return self.with_units
|
|
348
|
+
|
|
349
|
+
def __repr__(self):
|
|
350
|
+
# Makes debugging easier.
|
|
351
|
+
return str(self.tex)
|
|
352
|
+
|
|
353
|
+
def __gt__(self, other):
|
|
354
|
+
return str(self) > str(other)
|
|
355
|
+
|
|
356
|
+
def __le__(self, other):
|
|
357
|
+
return str(self) < str(other)
|
|
358
|
+
|
|
359
|
+
def __eq__(self, other):
|
|
360
|
+
return str(self) == str(other)
|
|
361
|
+
|
|
362
|
+
def __geq__(self, other):
|
|
363
|
+
return str(self) >= str(other)
|
|
364
|
+
|
|
365
|
+
def __leq__(self, other):
|
|
366
|
+
return str(self) <= str(other)
|
|
367
|
+
|
|
368
|
+
def __hash__(self):
|
|
369
|
+
return hash(str(self))
|
|
370
|
+
|
|
371
|
+
@property
|
|
372
|
+
def logger(self):
|
|
373
|
+
return self._logger
|
|
374
|
+
|
|
375
|
+
def _init_logger(self, handlers=None):
|
|
376
|
+
"""Create a logger at the INFO level."""
|
|
377
|
+
logger = logging.getLogger("{}.{}".format(__name__, self.__class__.__name__))
|
|
378
|
+
self._logger = logger
|
|
379
|
+
|
|
380
|
+
@property
|
|
381
|
+
def with_units(self):
|
|
382
|
+
return rf"${self.tex} \; \left[{self.units}\right]$"
|
|
383
|
+
|
|
384
|
+
@property
|
|
385
|
+
def tex(self):
|
|
386
|
+
return self._tex
|
|
387
|
+
|
|
388
|
+
@property
|
|
389
|
+
def units(self):
|
|
390
|
+
return self._units
|
|
391
|
+
|
|
392
|
+
@property
|
|
393
|
+
def path(self):
|
|
394
|
+
return self._path
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
class TeXlabel(Base):
|
|
398
|
+
r"""Create a LaTeX label from measurement, component and species information.
|
|
399
|
+
|
|
400
|
+
The object can be used directly in plotting routines. String
|
|
401
|
+
representation returns the formatted label with units.
|
|
402
|
+
|
|
403
|
+
Notes
|
|
404
|
+
-----
|
|
405
|
+
Comparison operators and hashing use :func:`str` of the object so two
|
|
406
|
+
labels representing the same quantity compare equal.
|
|
407
|
+
"""
|
|
408
|
+
|
|
409
|
+
def __init__(self, mcs0, mcs1=None, axnorm=None, new_line_for_units=False):
|
|
410
|
+
"""Instantiate the label.
|
|
411
|
+
|
|
412
|
+
Parameters
|
|
413
|
+
----------
|
|
414
|
+
mcs0 : tuple of str
|
|
415
|
+
``("M", "C", "S")`` where ``m`` is the measurement, ``c`` the
|
|
416
|
+
component and ``s`` the species. Empty strings are allowed for
|
|
417
|
+
components or species.
|
|
418
|
+
mcs1 : tuple of str or None, optional
|
|
419
|
+
Denominator for fraction style labels. Units are compared and set
|
|
420
|
+
to dimensionless when equal.
|
|
421
|
+
axnorm : {"c", "r", "t", "d"}, optional
|
|
422
|
+
Axis normalization used when building colorbar labels.
|
|
423
|
+
new_line_for_units : bool, default ``False``
|
|
424
|
+
If ``True`` a newline separates label and units.
|
|
425
|
+
"""
|
|
426
|
+
super(TeXlabel, self).__init__()
|
|
427
|
+
self.set_axnorm(axnorm)
|
|
428
|
+
self.set_mcs(mcs0, mcs1)
|
|
429
|
+
self.set_new_line_for_units(new_line_for_units)
|
|
430
|
+
self.build_label()
|
|
431
|
+
|
|
432
|
+
@property
|
|
433
|
+
def mcs0(self):
|
|
434
|
+
return self._mcs0
|
|
435
|
+
|
|
436
|
+
@property
|
|
437
|
+
def mcs1(self):
|
|
438
|
+
return self._mcs1
|
|
439
|
+
|
|
440
|
+
@property
|
|
441
|
+
def new_line_for_units(self):
|
|
442
|
+
return self._new_line_for_units
|
|
443
|
+
|
|
444
|
+
@property
|
|
445
|
+
def tex(self):
|
|
446
|
+
return self._tex
|
|
447
|
+
|
|
448
|
+
@property
|
|
449
|
+
def units(self):
|
|
450
|
+
return self._units
|
|
451
|
+
|
|
452
|
+
@property
|
|
453
|
+
def with_units(self):
|
|
454
|
+
return self._with_units
|
|
455
|
+
|
|
456
|
+
@property
|
|
457
|
+
def path(self):
|
|
458
|
+
return self._path
|
|
459
|
+
|
|
460
|
+
@property
|
|
461
|
+
def axnorm(self):
|
|
462
|
+
return self._axnorm
|
|
463
|
+
|
|
464
|
+
def set_mcs(self, mcs0, mcs1):
|
|
465
|
+
mcs0_ = MCS(*mcs0)
|
|
466
|
+
|
|
467
|
+
mcs1_ = None
|
|
468
|
+
if mcs1 is not None:
|
|
469
|
+
mcs1_ = MCS(*mcs1)
|
|
470
|
+
|
|
471
|
+
self._mcs0 = mcs0_
|
|
472
|
+
self._mcs1 = mcs1_
|
|
473
|
+
|
|
474
|
+
def set_new_line_for_units(self, new):
|
|
475
|
+
self._new_line_for_units = bool(new)
|
|
476
|
+
|
|
477
|
+
def set_axnorm(self, new):
|
|
478
|
+
if isinstance(new, str):
|
|
479
|
+
new = new.lower()
|
|
480
|
+
|
|
481
|
+
assert new in (None, "c", "r", "t", "d")
|
|
482
|
+
self._axnorm = new
|
|
483
|
+
|
|
484
|
+
def make_species(self, pattern):
|
|
485
|
+
r"""Basic substitution of any species within a species string if the.
|
|
486
|
+
|
|
487
|
+
species has a substitution in the ion_species dictionary.
|
|
488
|
+
|
|
489
|
+
Notes
|
|
490
|
+
-----
|
|
491
|
+
This equation might only work because :math:`a\rightarrow\alpha` is
|
|
492
|
+
the only actual translation made and, based on lexsort order, would be
|
|
493
|
+
the first group. This function may need to be updated for more complex
|
|
494
|
+
patterns, e.g., if we translate something like
|
|
495
|
+
:math:`\mathrm{He}^{2+}\rightarrow\text{He}^{2+}`.
|
|
496
|
+
"""
|
|
497
|
+
|
|
498
|
+
# def repl(x):
|
|
499
|
+
# return _trans_species[x.group()]
|
|
500
|
+
|
|
501
|
+
substitution = _run_species_substitution(pattern)
|
|
502
|
+
|
|
503
|
+
return substitution[0]
|
|
504
|
+
|
|
505
|
+
def _build_one_label(self, mcs):
|
|
506
|
+
|
|
507
|
+
m = mcs.m
|
|
508
|
+
c = mcs.c
|
|
509
|
+
s = mcs.s
|
|
510
|
+
|
|
511
|
+
# mcs = MCS(m, c, s)
|
|
512
|
+
path = (
|
|
513
|
+
"_".join(
|
|
514
|
+
[
|
|
515
|
+
m.replace(r"/", "-OV-"),
|
|
516
|
+
c.replace(r"/", "-OV-"),
|
|
517
|
+
s.replace(r"/", "-OV-"),
|
|
518
|
+
]
|
|
519
|
+
)
|
|
520
|
+
.replace(",", "")
|
|
521
|
+
.replace(",{", "{")
|
|
522
|
+
.replace("{,", "{")
|
|
523
|
+
.replace("__", "_")
|
|
524
|
+
.replace(".", "")
|
|
525
|
+
.strip("_")
|
|
526
|
+
# The following two work jointly to remove cases
|
|
527
|
+
# where the species leads the label and it is empty.
|
|
528
|
+
.strip(r"{} \\")
|
|
529
|
+
.strip(r", ")
|
|
530
|
+
)
|
|
531
|
+
|
|
532
|
+
err = False
|
|
533
|
+
if "_err" in m:
|
|
534
|
+
m = m.replace("_err", "")
|
|
535
|
+
err = True
|
|
536
|
+
|
|
537
|
+
m1 = _trans_measurement.get(m, m)
|
|
538
|
+
c1 = _trans_component.get(c, c)
|
|
539
|
+
s1 = self.make_species(s)
|
|
540
|
+
d = {"M": m1, "C": c1, "S": s1}
|
|
541
|
+
|
|
542
|
+
template_string = _templates.get(m, _default_template_string)
|
|
543
|
+
template = StringTemplate(template_string)
|
|
544
|
+
|
|
545
|
+
tex = template.safe_substitute(**d)
|
|
546
|
+
if err:
|
|
547
|
+
tex = r"\sigma(%s)" % tex
|
|
548
|
+
|
|
549
|
+
# clean up empty parentheses
|
|
550
|
+
tex = (
|
|
551
|
+
tex.replace(r"\; ()", "")
|
|
552
|
+
.replace(r"\; {}", "")
|
|
553
|
+
.replace("()", "")
|
|
554
|
+
.replace("_{}", "")
|
|
555
|
+
.replace("{{}}", "")
|
|
556
|
+
.replace("{},", "")
|
|
557
|
+
.replace("{};", "")
|
|
558
|
+
.replace("{}", "")
|
|
559
|
+
.replace(",}", "}")
|
|
560
|
+
.replace("{,", "{")
|
|
561
|
+
.replace(";}", "}")
|
|
562
|
+
.replace("};{}", "}")
|
|
563
|
+
.replace("};}", "}}")
|
|
564
|
+
.replace(";}", "}")
|
|
565
|
+
.replace("_{}", "")
|
|
566
|
+
.rstrip("_")
|
|
567
|
+
.strip(" ")
|
|
568
|
+
# .lstrip(r"\:")
|
|
569
|
+
# .rstrip(r"\:")
|
|
570
|
+
# .strip(r"\:")
|
|
571
|
+
# .strip(r"\;")
|
|
572
|
+
.strip(" ")
|
|
573
|
+
)
|
|
574
|
+
|
|
575
|
+
# with_units = r"$%s \; [%s]$" % (tex, _trans_units[m])
|
|
576
|
+
ukey = m
|
|
577
|
+
if c in ("lat", "colat", "lon"):
|
|
578
|
+
ukey = c
|
|
579
|
+
|
|
580
|
+
units = _trans_units.get(ukey, "???")
|
|
581
|
+
|
|
582
|
+
self.logger.debug(
|
|
583
|
+
r"""Built TeX label
|
|
584
|
+
TeX : %s
|
|
585
|
+
units : %s
|
|
586
|
+
save path : %s
|
|
587
|
+
template : %s
|
|
588
|
+
M : %s -> %s
|
|
589
|
+
C : %s -> %s
|
|
590
|
+
S : %s -> %s""",
|
|
591
|
+
tex,
|
|
592
|
+
units,
|
|
593
|
+
path,
|
|
594
|
+
template_string,
|
|
595
|
+
m,
|
|
596
|
+
m1,
|
|
597
|
+
c if c else None,
|
|
598
|
+
c1 if c1 else None,
|
|
599
|
+
s if s else None,
|
|
600
|
+
s1 if s1 else None,
|
|
601
|
+
)
|
|
602
|
+
|
|
603
|
+
return tex, units, path
|
|
604
|
+
|
|
605
|
+
def _combine_tex_path_units_axnorm(self, tex, path, units):
|
|
606
|
+
"""Finalize label pieces with axis normalization."""
|
|
607
|
+
axnorm = self.axnorm
|
|
608
|
+
tex_norm = _trans_axnorm[axnorm]
|
|
609
|
+
if tex_norm:
|
|
610
|
+
units = r"\#"
|
|
611
|
+
tex = r"\mathrm{%s \; Norm} \; %s" % (tex_norm, tex) # noqa: W605
|
|
612
|
+
path = path / (axnorm.upper() + "norm")
|
|
613
|
+
|
|
614
|
+
with_units = r"${tex} {sep} \left[{units}\right]$".format(
|
|
615
|
+
tex=tex,
|
|
616
|
+
sep="$\n$" if self.new_line_for_units else r"\;",
|
|
617
|
+
units=units,
|
|
618
|
+
)
|
|
619
|
+
|
|
620
|
+
return tex, path, units, with_units
|
|
621
|
+
|
|
622
|
+
def build_label(self):
|
|
623
|
+
"""Construct the complete label."""
|
|
624
|
+
mcs0 = self.mcs0
|
|
625
|
+
mcs1 = self.mcs1
|
|
626
|
+
|
|
627
|
+
tex0, units0, path0 = self._build_one_label(mcs0)
|
|
628
|
+
|
|
629
|
+
if mcs1 is not None:
|
|
630
|
+
tex1, units1, path1 = self._build_one_label(mcs1)
|
|
631
|
+
|
|
632
|
+
m0, m1 = mcs0.m, mcs1.m
|
|
633
|
+
u0, u1 = (
|
|
634
|
+
_trans_units.get(m0.replace("_err", ""), "???"),
|
|
635
|
+
_trans_units.get(m1.replace("_err", ""), "???"),
|
|
636
|
+
)
|
|
637
|
+
if u0 == u1:
|
|
638
|
+
units = r"\#"
|
|
639
|
+
else:
|
|
640
|
+
units = r"{}/{}".format(u0, u1)
|
|
641
|
+
|
|
642
|
+
tex = "{}/{}".format(tex0, tex1)
|
|
643
|
+
# with_units = r"$%s \; [%s]$" % (tex, units)
|
|
644
|
+
path = Path("-OV-".join([path0, path1]))
|
|
645
|
+
|
|
646
|
+
else:
|
|
647
|
+
tex = tex0
|
|
648
|
+
units = units0
|
|
649
|
+
path = Path(path0)
|
|
650
|
+
|
|
651
|
+
tex1 = None
|
|
652
|
+
units1 = None
|
|
653
|
+
path1 = None
|
|
654
|
+
|
|
655
|
+
tex, path, units, with_units = self._combine_tex_path_units_axnorm(
|
|
656
|
+
tex, path, units
|
|
657
|
+
)
|
|
658
|
+
|
|
659
|
+
self.logger.debug(
|
|
660
|
+
r"""Joined ratio label
|
|
661
|
+
TeX : %s
|
|
662
|
+
units : %s
|
|
663
|
+
with units : %s
|
|
664
|
+
save path : %s
|
|
665
|
+
T0 : %s
|
|
666
|
+
U0 : %s
|
|
667
|
+
P0 : %s
|
|
668
|
+
T1 : %s
|
|
669
|
+
U1 : %s
|
|
670
|
+
P1 : %s""",
|
|
671
|
+
tex,
|
|
672
|
+
units,
|
|
673
|
+
with_units,
|
|
674
|
+
path,
|
|
675
|
+
tex0,
|
|
676
|
+
units0,
|
|
677
|
+
path0,
|
|
678
|
+
tex1,
|
|
679
|
+
units1,
|
|
680
|
+
path1,
|
|
681
|
+
)
|
|
682
|
+
|
|
683
|
+
self._tex = tex
|
|
684
|
+
self._units = units
|
|
685
|
+
self._with_units = with_units
|
|
686
|
+
self._path = Path(path)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""Common chemistry labels."""
|
|
2
|
+
|
|
3
|
+
from .special import ManualLabel
|
|
4
|
+
|
|
5
|
+
mass_per_charge = ManualLabel(
|
|
6
|
+
r"\mathrm{M/Q}",
|
|
7
|
+
r"\mathrm{AMU \, e^{-1}}",
|
|
8
|
+
path="M-OV-Q",
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
fip = ManualLabel(r"\mathrm{FIP}", r"\mathrm{eV}", path="FIP")
|
|
12
|
+
|
|
13
|
+
charge = ManualLabel(
|
|
14
|
+
r"\mathrm{Q}",
|
|
15
|
+
r"\mathrm{e}",
|
|
16
|
+
path="IonCharge",
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
mass = ManualLabel(r"\mathrm{M}", r"\mathrm{AMU}", path="IonMass")
|