Space Waves Github -
### 📁 `src/` (Core Modules)
def plasma_frequency(electron_density): """Calculate plasma frequency (Hz) from electron density (m^-3).""" e = 1.602e-19 eps0 = 8.854e-12 m_e = 9.109e-31 return np.sqrt(electron_density * e**2 / (eps0 * m_e)) / (2 * np.pi) space waves github
def refractive_index(frequency, plasma_freq): """Collisionless ionospheric refractive index.""" return np.sqrt(1 - (plasma_freq / frequency)**2) </code></pre> <p><strong><code>src/link_budget.py</code></strong></p> <pre><code class="language-python">def link_budget(freq_hz, tx_power_dbm, tx_gain_dbi, rx_gain_dbi, distance_m, losses_db=0): """Simple satellite link budget.""" c = 3e8 wavelength = c / freq_hz fspl_db = 20 * np.log10(4 * np.pi * distance_m / wavelength) rx_power = tx_power_dbm + tx_gain_dbi + rx_gain_dbi - fspl_db - losses_db return rx_power </code></pre> <hr> <h3>📁 <code>notebooks/</code> (Jupyter Tutorials)</h3> <ul> <li><code>01_ionospheric_refraction.ipynb</code> – Plot refractive index vs altitude</li> <li><code>02_faraday_rotation.ipynb</code> – Calculate rotation angle for linearly polarized satellite signals</li> <li><code>03_scintillation_simulation.ipynb</code> – Generate phase/amplitude scintillation time series</li> </ul> <hr> <h3>📁 <code>data/</code></h3> <ul> <li><code>tec_map_2025-01-01.csv</code> – Sample TEC values in TECU</li> <li><code>ionosonde_data.csv</code> – Virtual height vs frequency</li> <li><code>solar_flux.txt</code> – Daily F10.7 cm flux values</li> </ul> <hr> <h3>📁 <code>examples/</code></h3> <p><strong><code>examples/satellite_pass_calc.py</code></strong></p> <pre><code class="language-python"># Predicts Doppler shift and free-space loss for a LEO satellite pass </code></pre> <hr> <h3>📄 <code>requirements.txt</code></h3> <pre><code>numpy scipy matplotlib pandas requests astropy </code></pre> <hr> <h3>📄 <code>CONTRIBUTING.md</code></h3> <p>Guidelines for adding new propagation models (e.g., magnetoionic theory, ray tracing in 3D).</p> <hr> <h3>📄 <code>LICENSE</code></h3> <p>MIT License</p> <hr> <h3>📄 <code>.gitignore</code></h3> <pre><code>__pycache__/ *.pyc .DS_Store *.nc *.h5 .idea/ .vscode/ data/*.csv </code></pre> <hr> <h2>🧪 Bonus: Space Weather API Integration</h2> <p>Add <code>src/space_weather.py</code> to fetch real-time data from NASA/NOAA:</p> <pre><code class="language-python">import requests – Plot refractive index vs altitude<
**`src/ionosphere.py`** ```python import numpy as np – Generate phase/amplitude scintillation time series<
def get_solar_wind_speed(): url = "https://services.swpc.noaa.gov/products/solar-wind/plasma-1-day.json" data = requests.get(url).json() return float(data[-1][2]) # latest speed in km/s </code></pre> <hr>
📄 README.md # 🌌 Space Waves