arte/atmo/cn2_profile.py
def from_fractional_j(cls,
                          r0AtZenith,
                          layersFractionalJ,
                          layersL0,
                          layersAltitude,
                          layersWindSpeed,
                          layersWindDirection):
        """
        Cn2 profile constructor from total r0 at zenith and fractional J of
        each layer

        Parameters
        ----------
            r0AtZenith: float
                        overall r0 at zenith [m]
            layersFractionalJ: :class:`~numpy:numpy.ndarray`
                               array of J values for each layer.
                               Array must sum up to 1
            layersL0: :class:`~numpy:numpy.ndarray`
                      array of layers outer-scale L0 in meters
            layersAltitude: :class:`~numpy:numpy.ndarray`
                      array of layers altitude at Zenith in meters
            layersWindSpeed: :class:`~numpy:numpy.ndarray`
                      array of layers wind speed in meters per second
            layersWindDirection: :class:`~numpy:numpy.ndarray`
                      array of layers wind direction in degrees, clockwise
                      from North


        Every array must be 1D and have the same size, defining the number of
        layers of the profile

        All parameters must be defined at zenith

        """
        r0AtZenith = cls._quantitiesToValue(r0AtZenith)
        layersFractionalJ = cls._quantitiesToValue(layersFractionalJ)
        layersL0 = cls._quantitiesToValue(layersL0)
        layersAltitude = cls._quantitiesToValue(layersAltitude)
        layersWindSpeed = cls._quantitiesToValue(layersWindSpeed)
        layersWindDirection = cls._quantitiesToValue(
            np.deg2rad(layersWindDirection))
        sumJ = np.array(layersFractionalJ).sum()
        assert (np.abs(sumJ - 1.0) < 0.01), \
            "Total of J values must be 1.0, got %g" % sumJ
        totalJ = r0AtZenith ** (-5. / 3) / (
            0.422727 * (2 * np.pi / cls.DEFAULT_LAMBDA) ** 2 *
            cls.DEFAULT_AIRMASS)
        js = np.array(layersFractionalJ) * totalJ
        return Cn2Profile(js,
                          layersL0,
                          layersAltitude,
                          layersWindSpeed,
                          layersWindDirection)

        Cn2 profile constructor from total r0 at zenith and fractional J of
        each layer

        Parameters
        ----------
            r0AtZenith: float
                        overall r0 at zenith [m]
            layersFractionalJ: :class:`~numpy:numpy.ndarray`
                               array of J values for each layer.
                               Array must sum up to 1
            layersL0: :class:`~numpy:numpy.ndarray`
                      array of layers outer-scale L0 in meters
            layersAltitude: :class:`~numpy:numpy.ndarray`
                      array of layers altitude at Zenith in meters
            layersWindSpeed: :class:`~numpy:numpy.ndarray`
                      array of layers wind speed in meters per second
            layersWindDirection: :class:`~numpy:numpy.ndarray`
                      array of layers wind direction in degrees, clockwise
                      from North


        Every array must be 1D and have the same size, defining the number of
        layers of the profile

        All parameters must be defined at zenith

        
Cn2 profile constructor from total r0 at zenith and fractional J of
each layer

Parameters

float
overall r0 at zenith [m]
layersFractionalJ: :class:`~numpy:numpy.ndarray`
array of J values for each layer.

Every array must be 1D and have the same size, defining the number of
layers of the profile

All parameters must be defined at zenith
Cn2 profile constructor from total r0 at zenith and fractional J of each layer Parameters float overall r0 at zenith [ m ] layersFractionalJ : : class : ` ~numpy : numpy . ndarray ` array of J values for each layer . Every array must be 1D and have the same size defining the number of layers of the profile All parameters must be defined at zenith
def from_fractional_j(cls,
                          r0AtZenith,
                          layersFractionalJ,
                          layersL0,
                          layersAltitude,
                          layersWindSpeed,
                          layersWindDirection):
        r0AtZenith = cls._quantitiesToValue(r0AtZenith)
        layersFractionalJ = cls._quantitiesToValue(layersFractionalJ)
        layersL0 = cls._quantitiesToValue(layersL0)
        layersAltitude = cls._quantitiesToValue(layersAltitude)
        layersWindSpeed = cls._quantitiesToValue(layersWindSpeed)
        layersWindDirection = cls._quantitiesToValue(
            np.deg2rad(layersWindDirection))
        sumJ = np.array(layersFractionalJ).sum()
        assert (np.abs(sumJ - 1.0) < 0.01), \
            "Total of J values must be 1.0, got %g" % sumJ
        totalJ = r0AtZenith ** (-5. / 3) / (
            0.422727 * (2 * np.pi / cls.DEFAULT_LAMBDA) ** 2 *
            cls.DEFAULT_AIRMASS)
        js = np.array(layersFractionalJ) * totalJ
        return Cn2Profile(js,
                          layersL0,
                          layersAltitude,
                          layersWindSpeed,
                          layersWindDirection)
def from_fractional_j ( cls , r0AtZenith , layersFractionalJ , layersL0 , layersAltitude , layersWindSpeed , layersWindDirection ) : r0AtZenith = cls . _quantitiesToValue ( r0AtZenith ) layersFractionalJ = cls . _quantitiesToValue ( layersFractionalJ ) layersL0 = cls . _quantitiesToValue ( layersL0 ) layersAltitude = cls . _quantitiesToValue ( layersAltitude ) layersWindSpeed = cls . _quantitiesToValue ( layersWindSpeed ) layersWindDirection = cls . _quantitiesToValue ( np . deg2rad ( layersWindDirection ) ) sumJ = np . array ( layersFractionalJ ) . sum ( ) assert ( np . abs ( sumJ - 1.0 ) < 0.01 ) , "Total of J values must be 1.0, got %g" % sumJ totalJ = r0AtZenith ** ( - 5. / 3 ) / ( 0.422727 * ( 2 * np . pi / cls . DEFAULT_LAMBDA ) ** 2 * cls . DEFAULT_AIRMASS ) js = np . array ( layersFractionalJ ) * totalJ return Cn2Profile ( js , layersL0 , layersAltitude , layersWindSpeed , layersWindDirection )
Cn2 profile constructor from total r0 at zenith and fractional J of
each layer
Cn2 profile constructor from total r0 at zenith and fractional J of each layer
"""
        Cn2 profile constructor from total r0 at zenith and fractional J of
        each layer

        Parameters
        ----------
            r0AtZenith: float
                        overall r0 at zenith [m]
            layersFractionalJ: :class:`~numpy:numpy.ndarray`
                               array of J values for each layer.
                               Array must sum up to 1
            layersL0: :class:`~numpy:numpy.ndarray`
                      array of layers outer-scale L0 in meters
            layersAltitude: :class:`~numpy:numpy.ndarray`
                      array of layers altitude at Zenith in meters
            layersWindSpeed: :class:`~numpy:numpy.ndarray`
                      array of layers wind speed in meters per second
            layersWindDirection: :class:`~numpy:numpy.ndarray`
                      array of layers wind direction in degrees, clockwise
                      from North


        Every array must be 1D and have the same size, defining the number of
        layers of the profile

        All parameters must be defined at zenith

        """
cls
r0AtZenith
layersFractionalJ
layersL0
layersAltitude
layersWindSpeed
layersWindDirection