예제 #1
0
파일: pv.py 프로젝트: poposhi/pecos
def energy(P, tfilter=None):
    """
    Convert energy defined as:
    
    :math:`E=\int{Pdt}`
    
    where 
    :math:`P` is power and 
    :math:`dt` is the time step between observations.
    The time integral is computed using the trapezoidal rule.
    Results are given in [power units]*seconds.
    
    Parameters
    -----------
    P : pandas DataFrame
        Power time series
         
    tfilter : pandas Series (optional)
        Time filter containing boolean values for each time index
        
    Returns
    -------
    pandas Series
        Energy
    """

    E = time_integral(P, tfilter=tfilter)

    return E
예제 #2
0
파일: pv.py 프로젝트: poposhi/pecos
def insolation(G, tfilter=None):
    """
    Compute insolation defined as:
    
    :math:`H=\int{Gdt}`
    
    where 
    :math:`G` is irradiance and 
    :math:`dt` is the time step between observations.
    The time integral is computed using the trapezoidal rule.
    Results are given in [irradiance units]*seconds.
    
    Parameters
    -----------
    G : pandas DataFrame
        Irradiance time series
        
    tfilter : pandas Series (optional)
        Time filter containing boolean values for each time index
        
    Returns
    -------
    pandas Series
        Insolation
    """

    H = time_integral(G, tfilter=tfilter)

    return H
예제 #3
0
파일: pv.py 프로젝트: cedricleroy/pecos
def insolation(G, tfilter=None, per_day=True):
    """
    Compute insolation defined as:
    
    :math:`H=\int{Gdt}`
    
    where 
    :math:`G` is irradiance and 
    :math:`dt` is the time step between observations.
    The time integral is computed using the trapezoidal rule.
    Results are given in [irradiance units]*seconds.
    
     Parameters
    -----------
    G : pd.DataFrame
        Irradiance time series
        
    tfilter : pd.Series (optional)
        Time filter containing boolean values for each time index
        
    per_day : boolean (optional)
        Flag indicating if the results should be computed per day, default = True
    
    Returns
    -------
    H : pd.DataFrame
        Insolation
    """
    if type(G) is pd.core.series.Series:
        G = G.to_frame('Irradiance')
        
    H = time_integral(G,  tfilter=tfilter, per_day=per_day)
    
    return H
예제 #4
0
파일: pv.py 프로젝트: cedricleroy/pecos
def energy(P, tfilter=None, per_day=True):
    """
    Convert energy defined as:
    
    :math:`E=\int{Pdt}`
    
    where 
    :math:`P` is power and 
    :math:`dt` is the time step between observations.
    The time integral is computed using the trapezoidal rule.
    Results are given in [power units]*seconds.
    
    Parameters
    -----------
    P : pd.DataFrame
        Power time series
         
    tfilter : pd.Series (optional)
        Time filter containing boolean values for each time index
        
    per_day : boolean (optional)
        Flag indicating if the results should be computed per day, default = True
    
    Returns
    -------
    E : pd.DataFrame
        Energy
    """
    if type(P) is pd.core.series.Series:
        P = P.to_frame('Power')
        
    E = time_integral(P, tfilter=tfilter, per_day=per_day)
    
    return E
예제 #5
0
def energy(P, tfilter=None, per_day=True):
    """
    Convert energy defined as:
    
    :math:`E=\int{Pdt}`
    
    where 
    :math:`P` is power and 
    :math:`dt` is the time step between observations.
    The time integral is computed using the trapezoidal rule.
    Results are given in [power units]*seconds.
    
    Parameters
    -----------
    P : pd.DataFrame
        Power time series
         
    tfilter : pd.Series (optional)
        Time filter containing boolean values for each time index
        
    per_day : boolean (optional)
        Flag indicating if the results should be computed per day, default = True
    
    Returns
    -------
    E : pd.DataFrame
        Energy
    """
    if type(P) is pd.core.series.Series:
        P = P.to_frame('Power')

    E = time_integral(P, tfilter=tfilter, per_day=per_day)

    return E
예제 #6
0
def insolation(G, tfilter=None, per_day=True):
    """
    Compute insolation defined as:
    
    :math:`H=\int{Gdt}`
    
    where 
    :math:`G` is irradiance and 
    :math:`dt` is the time step between observations.
    The time integral is computed using the trapezoidal rule.
    Results are given in [irradiance units]*seconds.
    
     Parameters
    -----------
    G : pd.DataFrame
        Irradiance time series
        
    tfilter : pd.Series (optional)
        Time filter containing boolean values for each time index
        
    per_day : boolean (optional)
        Flag indicating if the results should be computed per day, default = True
    
    Returns
    -------
    H : pd.DataFrame
        Insolation
    """
    if type(G) is pd.core.series.Series:
        G = G.to_frame('Irradiance')

    H = time_integral(G, tfilter=tfilter, per_day=per_day)

    return H