pyTomoAO.slodar.slodarResult¶
- class pyTomoAO.slodar.slodarResult(altitude, altitude_zenith, r0m53, cn2dh, fractionalCn2, r0, r0_zenith, L0, wavelength, zenithAngleInDeg=0.0, noiseVariance=<factory>, residualRms=nan, L0Grid=<factory>, L0Cost=<factory>, measured=<factory>, model=<factory>)[source]¶
Bases:
objectTurbulence profile returned by
slodarProfiler.fit_profile().- Parameters:
- altitude¶
Layer ranges along the line of sight [m].
- Type:
- altitude_zenith¶
Layer altitudes above the telescope,
altitude * cos(zenith)[m].- Type:
- r0m53¶
Layer strengths as \(r_0^{-5/3}\) at
wavelength[m^-5/3], line of sight.- Type:
- cn2dh¶
Integrated \(C_n^2\,dh\) per layer [m^1/3], line of sight.
- Type:
- fractionalCn2¶
Normalised layer weights (sum to one); pyTomoAO’s
fractionnalR0.- Type:
- noiseVariance¶
Per-WFS slope noise variance estimated from the auto-covariance [rad^2], or an empty array when the auto-covariance was not fitted.
- Type:
- residualRms¶
Weighted RMS of the fit residual, relative to the weighted RMS of the data.
- Type:
- L0Grid, L0Cost
Outer scales tried and their fit cost when
fitL0was requested (else empty). SeeL0AtGridEdge.- Type:
- measured, model
The fitted data vector and the best-fit model, for diagnostics.
- Type:
- property L0AtGridEdge¶
True when
L0was fitted and the best value is at an end ofL0Grid.The fit minimum then lies outside the grid, so L0 is not constrained by the data. This is typical of short telemetry records, where it can ruin the profile.
- to_atmosphere_config(windSpeed=None, windDirection=None, minFraction=0.0)[source]¶
Express the profile as an
atmosphere_parametersconfiguration section.The result can be dropped into a pyTomoAO YAML configuration (or passed to
atmosphereParametersinside a{"atmosphere_parameters": ...}dictionary) so that a reconstructor can be rebuilt on the measured profile.- Parameters:
windSpeed (
array_like, optional) – Per-layer wind; SLODAR from spatial covariances does not measure it, so zeros are used by default.windDirection (
array_like, optional) – Per-layer wind; SLODAR from spatial covariances does not measure it, so zeros are used by default.minFraction (
float, optional) – Layers with a fractional strength below this are dropped (default 0, keep all).
- Returns:
dict– Keys as documented foratmosphere_parameters. Altitudes are zenith altitudes in km andr0is the zenith value, as the configuration expects.
Notes
Dropping layers with
minFractionrenormalises the remaining fractions but keeps the totalr0, so the strength of the dropped layers is shared out over the kept ones in proportion to their own.
- noise_covariance(d=None, nValidSubap=None, wavelength=None, reconstructor=None)[source]¶
Per-slope noise variances from this fit, for
build_reconstructor.See
slope_noise_covariance();wavelengthdefaults to the reconstructor’s atmosphere wavelength whenreconstructoris given, else to the profile’s.Caution
On real Shack-Hartmann data the noise fitted here, from the zero-offset excess of the auto-covariance, absorbs any mismatch between the sensor and the geometric slope model at zero offset. In SPECULA simulations with a physical Shack-Hartmann it overestimated the noise by up to 5x. For the reconstructor, prefer
slodarProfiler.temporal_noise_variance()on the (pseudo-)open-loop slopes. At low flux, also calibrate the centroid gain first (see the SLODAR user guide).- Parameters:
d (default:
None) – As inslope_noise_covariance().nValidSubap (default:
None) – As inslope_noise_covariance().wavelength (default:
None) – As inslope_noise_covariance().reconstructor (default:
None) – As inslope_noise_covariance().
- Returns:
numpy.ndarray–(nGS * 2 * nValidSubap,)variances.
- plot(ax=None, reference=None, label='SLODAR')[source]¶
Plot the fractional profile against altitude.
- Parameters:
ax (
matplotlib.axes.Axes, optional) – Axes to draw into; a new figure is created by default.reference (
tupleofarray_like, optional) –(altitude_m, fraction)of a reference profile to overplot.label (
str, optional) – Legend label of the SLODAR profile.
- Returns: