Skip to content

Implement ITU-R P.676-13 gaseous attenuation recommendation#102

Merged
inigodelportillo merged 3 commits intomasterfrom
claude/crazy-ramanujan
Mar 4, 2026
Merged

Implement ITU-R P.676-13 gaseous attenuation recommendation#102
inigodelportillo merged 3 commits intomasterfrom
claude/crazy-ramanujan

Conversation

@inigodelportillo
Copy link
Copy Markdown
Owner

Summary

Key changes from P.676-12

Annex 1 (exact line-by-line method):

  • Replaces deprecated Eq. 18a (arccos) with Eq. 18b (arcsin) for the ray-bending angle in the layer-by-layer slant-path integration
  • Also fixes atmospheric profile evaluation at layer mid-points (not bottoms) for improved accuracy

Annex 2 (simplified method) — completely restructured:

  • Oxygen equivalent height h0 is now computed from a Part 1 coefficient lookup table using Eq. 31: h0 = a0(f) + b0(f)·T + c0(f)·Ps + d0(f)·ρ
  • Water-vapour equivalent height hw uses a new analytical formula (Eq. 37, Table 4 coefficients)
  • Both γ0 and γw are computed via the exact (line-by-line) method

New files

  • itur/data/676/v13_lines_oxygen.txt, v13_lines_water_vapour.txt — spectroscopic tables (identical to P.676-12)
  • itur/data/676/v13_h0_coefficients.txt — Part 1 oxygen equivalent-height coefficients (700 frequencies, 1–350 GHz)
  • test/test_itu676_13.py — 21 dedicated validation unit tests
  • test/test_data/676/ITURP676-13_gamma.csv, ITURP676-13_A_gas.csv — validation data from CG-3M3J-13-ValEx-Rev8.3.0.xlsx

Test plan

All tests validated against CG-3M3J-13-ValEx-Rev8.3.0.xlsx (ITU-R SG3 validation spreadsheet):

  • test/test_itu676_13.py — 21 tests: specific attenuation (SpAtt sheet), exact slant path (A_Gas_A1 sheet), Annex 2 approx (A_Gas_A2_INST sheet)
  • test/ITU_validation_test.pyITUR676_13TestCase: gamma0_exact, gammaw_exact, slant path exact and approx
  • test/ITU_validation_report_test.pyITUR676_13TestCase: CSV-driven tests for gamma0, gammaw, gamma, gaseous_attenuation_slant_path
python -m unittest test.ITU_validation_test test.ITU_validation_report_test test.test_itu676_13
Ran 89 tests in 18s — OK

🤖 Generated with Claude Code

Adds full support for P.676-13, the current revision of the gaseous
attenuation recommendation, superseding P.676-12. Closes #69.

Key changes from P.676-12:
- Annex 1: Eq. 18a (arccos) replaced by Eq. 18b (arcsin) for the
  ray-bending angle in the layer-by-layer slant-path integration.
- Annex 2: completely restructured. Oxygen equivalent height h0 is now
  computed from a Part 1 coefficient table (Eq. 31: h0 = a0 + b0*T +
  c0*Ps + d0*rho), and water-vapour equivalent height hw uses a new
  analytical formula (Eq. 37, Table 4 coefficients).

Implementation details:
- itur/data/676/v13_lines_oxygen.txt, v13_lines_water_vapour.txt:
  spectroscopic line data (Tables 1 & 2, identical to P.676-12).
- itur/data/676/v13_h0_coefficients.txt: Part 1 oxygen equivalent-height
  coefficient file (700 frequencies, 1–350 GHz), downloaded from the
  ITU document server.
- itur/models/itu676.py: new _ITU676_13_ class; default version bumped
  to 13.

Validation (all against CG-3M3J-13-ValEx-Rev8.3.0.xlsx):
- test/test_itu676_13.py: 21 dedicated unit tests.
- test/ITU_validation_test.py: ITUR676_13TestCase added (16 assertions
  covering SpAtt, exact slant path Annex 1, and Annex 2 approx).
- test/ITU_validation_report_test.py: ITUR676_13TestCase added with CSV-
  driven tests for gamma0, gammaw, gamma, and gaseous_attenuation_slant_path.
- test/test_data/676/ITURP676-13_gamma.csv,
  test/test_data/676/ITURP676-13_A_gas.csv: new validation data files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@inigodelportillo inigodelportillo force-pushed the claude/crazy-ramanujan branch from 3f5c19d to b574803 Compare March 3, 2026 03:15
inigodelportillo and others added 2 commits March 2, 2026 22:16
Tests are covered by ITU_validation_test.py (ITUR676_13TestCase) and
ITU_validation_report_test.py (ITUR676_13TestCase).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Generate HTML validation tables for ITU-R P.676-13 equivalent to the
existing P.676-12 tables, without modifying any pre-existing HTML files.

Changes:
- test/test_data/676/ITURP676-13_gamma.csv: expanded from 5 to 350 rows,
  covering f = 1–350 GHz at standard conditions (P=1013.25 hPa,
  T=288.15 K, rho=7.5 g/m³), values taken directly from the
  'P.676-13 SpAtt' sheet of CG-3M3J-13-ValEx-Rev8.3.0.xlsx.
- test/ITU_validation_report_test.py: ITUR676_13TestCase now passes
  prefixed test_name strings ('itur676_13_*') to __run__() so the
  generated HTML files are uniquely named and do not overwrite the
  P.676-12 tables.
- docs/validation/itur676_13.rst: regenerated to reference the new
  prefixed HTML files.
- docs/validation/itur676_13_gamma0_table.html (new, 350 rows)
- docs/validation/itur676_13_gammaw_table.html (new, 350 rows)
- docs/validation/itur676_13_gamma_table.html (new, 350 rows)
- docs/validation/itur676_13_attenuation_gas_table.html (new, 10 rows)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@inigodelportillo inigodelportillo merged commit facd5e5 into master Mar 4, 2026
6 checks passed
@inigodelportillo inigodelportillo deleted the claude/crazy-ramanujan branch March 4, 2026 01:20
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.

New version of recommendation 676

1 participant