Atmospheric Simulation#
- phobos.modules.atmosphere.atmo_screen_kolmogorov(
- size,
- physical_size,
- r0,
- L0,
- fc=25,
- correc=1.0,
Generate a Kolmogorov-Von Karman type atmospheric phase screen.
- Parameters:
size (int) – Screen size in pixels (size x size)
physical_size (float) – Physical extent of the screen in meters
r0 (float) – Fried parameter in meters (at a reference wavelength)
L0 (float) – Outer scale in meters
fc (float, optional) – Cutoff frequency for AO correction (in cycles across the screen)
correc (float, optional) – Amplitude correction factor up to fc
- Returns:
Phase screen in radians (size x size)
- Return type:
ndarray
- phobos.modules.atmosphere.get_delays(
- n_telescopes=4,
- telescope_diameter=1.8,
- telescope_positions=None,
- r0=0.8,
- L0=25.0,
- wavelength=1.65e-06,
- wind_speed=10.0,
- wind_direction=45.0,
- screen_size=512,
- screen_physical_size=None,
- time_step=0.1,
- n_steps=100,
- demo=False,
- save_as=None,
Calculate atmospheric phase delays for multiple telescopes.
The atmosphere follows a Kolmogorov-Von Karman model that evolves in time by moving with a given wind speed and direction (frozen flow turbulence model).
- Parameters:
n_telescopes (int, optional) – Number of telescopes (default: 4)
telescope_diameter (float, optional) – Telescope diameter in meters (default: 1.8 m)
telescope_positions (ndarray, optional) – Telescope positions in meters, array of shape (n_telescopes, 2). If None, uses a square configuration. (default: None)
r0 (float, optional) – Fried parameter in meters at reference wavelength 1.55 μm. Typical values at 1.55 μm: 0.5 m (poor), 0.8 m (average), 1.0 m (good), 1.5 m (excellent) (default: 0.8)
L0 (float, optional) – Outer scale of turbulence in meters (default: 25.0)
wavelength (float, optional) – Observation wavelength in meters (default: 1.65e-6, H-band)
wind_speed (float, optional) – Wind speed in m/s (default: 10.0)
wind_direction (float, optional) – Wind direction in degrees (0° = East, 90° = North) (default: 45.0)
screen_size (int, optional) – Phase screen size in pixels (default: 512)
screen_physical_size (float, optional) – Physical screen size in meters. If None, automatically calculated from telescope positions and diameter with 20% margin (default: None)
time_step (float, optional) – Time step in seconds (default: 0.1)
n_steps (int, optional) – Number of time steps to calculate (default: 100)
demo (bool, optional) – (default: False)
save_as (str, optional) – Path to save the animation as a GIF (e.g. “atmo.gif”). Only used if demo=True. (default: None)
- Returns:
delays (ndarray) – Phase delays for each telescope in nanometers. Shape: (n_steps, n_telescopes)
times (ndarray) – Corresponding times in seconds. Shape: (n_steps,)
Examples
>>> # Simple configuration with 4 telescopes >>> delays, times = get_delays(n_telescopes=4, demo=True)
>>> # Custom configuration >>> positions = np.array([[0, 0], [10, 0], [10, 10], [0, 10]]) >>> delays, times = get_delays( ... telescope_positions=positions, ... wind_speed=15.0, ... wind_direction=30.0, ... demo=False ... )