Skip to content

Fix parser misaligning MODE array elements#37

Merged
skyelaird merged 1 commit intomainfrom
claude/fix-parser-mode-alignment-01LJdsC9rMmzAaMJLoUsuDGV
Nov 14, 2025
Merged

Fix parser misaligning MODE array elements#37
skyelaird merged 1 commit intomainfrom
claude/fix-parser-mode-alignment-01LJdsC9rMmzAaMJLoUsuDGV

Conversation

@skyelaird
Copy link
Copy Markdown
Owner

The VOACAP output parser was incorrectly splitting MODE values like "2 E" into separate array elements ['2', 'E'], causing misalignment between frequencies and their corresponding metrics.

Fixed by:

  1. Using regex split on 2+ spaces (not any whitespace) to preserve MODE values like "2 E" as single elements
  2. Correctly aligning metric arrays with frequencies by skipping the first column (which corresponds to MUF, not a frequency)
  3. Trimming all metric arrays to match the frequency count

This ensures that freq[i], MODE[i], and SNR[i] now correctly correspond to the same propagation mode.

The VOACAP output parser was incorrectly splitting MODE values like "2 E"
into separate array elements ['2', 'E'], causing misalignment between
frequencies and their corresponding metrics.

Fixed by:
1. Using regex split on 2+ spaces (not any whitespace) to preserve
   MODE values like "2 E" as single elements
2. Correctly aligning metric arrays with frequencies by skipping the
   first column (which corresponds to MUF, not a frequency)
3. Trimming all metric arrays to match the frequency count

This ensures that freq[i], MODE[i], and SNR[i] now correctly correspond
to the same propagation mode.
@skyelaird skyelaird merged commit 2c398e3 into main Nov 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants