Conversation
Resolves all remaining API integration issues between Phase 4 and Phase 5 components:
### Fixed API Mismatches:
1. **CircuitMuf vs MufCalculator** (prediction_engine.py:180)
- Changed from using CircuitMuf (dataclass) to MufCalculator (calculator class)
- Added circuit_muf attribute to store CircuitMuf results
- Updated all references from muf_calculator.muf to circuit_muf.muf
- Updated all references from muf_calculator.muf_info to circuit_muf.muf_info
2. **Layer Attribute Names** (prediction_engine.py, muf_calculator.py)
- Changed prof.e_layer → prof.e
- Changed prof.f1_layer → prof.f1
- Changed prof.f2_layer → prof.f2
- Standardized across all profile creation and access patterns
3. **Gyro Frequency Attribute** (prediction_engine.py)
- Changed prof.gyro_frequency → prof.gyro_freq
- Aligned with IonosphericProfile attribute naming
4. **Method Names** (muf_calculator.py, ionospheric_profile.py)
- Fixed compute_electron_density_profile() → compute_el_density_profile()
- Removed angle_count parameter from compute_oblique_frequencies()
- Added stub compute_derivative_loss() method for future implementation
5. **Dictionary Key Types** (prediction_engine.py)
- Changed muf_info[layer.value] → muf_info[layer.name]
- Fixed KeyError by using string keys ('E', 'F1', 'F2')
6. **Distribution Attributes** (prediction_engine.py)
- Fixed excessive_loss.value.median → excessive_loss.median
- Fixed excessive_loss.value.lower → excessive_loss.lo
- Fixed excessive_loss.value.upper → excessive_loss.hi
7. **Reflectrix Parameters** (prediction_engine.py)
- Changed frequency= → freq= in Reflectrix constructor
8. **Error Handling** (prediction_engine.py)
- Added None check for find_modes() return value
### Testing:
- All syntax checks pass
- Created test_phase5_api.py for verification
- Successfully runs end-to-end prediction with correct results
- Circuit MUF computation works correctly
- Profile attributes properly standardized
The prediction engine now successfully integrates all Phase 1-5 components.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves all remaining API integration issues between Phase 4 and Phase 5 components:
Fixed API Mismatches:
CircuitMuf vs MufCalculator (prediction_engine.py:180)
Layer Attribute Names (prediction_engine.py, muf_calculator.py)
Gyro Frequency Attribute (prediction_engine.py)
Method Names (muf_calculator.py, ionospheric_profile.py)
Dictionary Key Types (prediction_engine.py)
Distribution Attributes (prediction_engine.py)
Reflectrix Parameters (prediction_engine.py)
Error Handling (prediction_engine.py)
Testing:
The prediction engine now successfully integrates all Phase 1-5 components.