build/lib/vcor_dual_prf/file_tools.py
def prf_factor_array(radar, sw):
    """
    Returns an array with the dual-PRF factor for each gate.
    Raises error if dual-PRF factor info is not available in
     the radar object.

    Parameters
    ----------
    radar : Radar
        Py-ART radar structure
 
    Returns
    -------
    prf_fac_arr : numpy array
        Data with dual-PRF factor for each gate
    """

    v_ny, prf_h, prf_fact, prf_flag = get_prf_pars(radar, sw)
    dim = (radar.nrays, radar.ngates)
    if prf_fact is None:
        print('ERROR: dual-PRF factor is missing.\nIs this dual-PRF data?')
        return None

    if prf_flag is None:
        flag_vec = np.zeros(dim[0])
        print('WARNING: prf_flag is missing.')

    else:
        flag_vec = prf_flag

    flag_arr = np.transpose(np.tile(flag_vec.astype(int), (dim[1], 1)))    
    prf_fac_arr = flag_arr + prf_fact

    return prf_fac_arr

    Returns an array with the dual-PRF factor for each gate.
    Raises error if dual-PRF factor info is not available in
     the radar object.

    Parameters
    ----------
    radar : Radar
        Py-ART radar structure
 
    Returns
    -------
    prf_fac_arr : numpy array
        Data with dual-PRF factor for each gate
    
Returns an array with the dual-PRF factor for each gate.
Raises error if dual-PRF factor info is not available in
the radar object.

Parameters

radar : Radar
Py-ART radar structure

Returns

prf_fac_arr : numpy array
Data with dual-PRF factor for each gate
Returns an array with the dual - PRF factor for each gate . Raises error if dual - PRF factor info is not available in the radar object . Parameters radar : Radar Py - ART radar structure Returns prf_fac_arr : numpy array Data with dual - PRF factor for each gate
def prf_factor_array(radar, sw):
    v_ny, prf_h, prf_fact, prf_flag = get_prf_pars(radar, sw)
    dim = (radar.nrays, radar.ngates)
    if prf_fact is None:
        print('ERROR: dual-PRF factor is missing.\nIs this dual-PRF data?')
        return None
    if prf_flag is None:
        flag_vec = np.zeros(dim[0])
        print('WARNING: prf_flag is missing.')
    else:
        flag_vec = prf_flag
    flag_arr = np.transpose(np.tile(flag_vec.astype(int), (dim[1], 1)))    
    prf_fac_arr = flag_arr + prf_fact
    return prf_fac_arr
def prf_factor_array ( radar , sw ) : v_ny , prf_h , prf_fact , prf_flag = get_prf_pars ( radar , sw ) dim = ( radar . nrays , radar . ngates ) if prf_fact is None : print ( 'ERROR: dual-PRF factor is missing.\nIs this dual-PRF data?' ) return None if prf_flag is None : flag_vec = np . zeros ( dim [ 0 ] ) print ( 'WARNING: prf_flag is missing.' ) else : flag_vec = prf_flag flag_arr = np . transpose ( np . tile ( flag_vec . astype ( int ) , ( dim [ 1 ] , 1 ) ) ) prf_fac_arr = flag_arr + prf_fact return prf_fac_arr
Returns an array with the dual-PRF factor for each gate.
Returns an array with the dual - PRF factor for each gate .
"""
    Returns an array with the dual-PRF factor for each gate.
    Raises error if dual-PRF factor info is not available in
     the radar object.

    Parameters
    ----------
    radar : Radar
        Py-ART radar structure
 
    Returns
    -------
    prf_fac_arr : numpy array
        Data with dual-PRF factor for each gate
    """
radar
sw