예제 #1
0
파일: utils.py 프로젝트: eddiejessup/ahoy
def t_u_nets_scalar(dirname):
    """Calculate the particles' overall centre-of-mass speed over time
    for a model output directory.

    Parameters
    ----------
    dirname: str
        A model output directory path

    Returns
    -------
    ts: numpy.ndarray[dtype=float]
        Times.
    v_nets: numpy.ndarray[dtype=float]
         Centre-of-mass particle speeds.
    """
    return t_measures(dirname, get_time, get_u_net_scalar)
예제 #2
0
파일: utils.py 프로젝트: eddiejessup/ahoy
def t_u_nets_vector(dirname):
    """Calculate the particle's centre-of-mass velocity over time
    for a model output directory.

    Parameters
    ----------
    dirname: str
        A model output directory path

    Returns
    -------
    ts: numpy.ndarray[dtype=float]
        Times.
    v_nets: numpy.ndarray[dtype=float]
         Centre-of-mass particle velocities.
    """
    return t_measures(dirname, get_time, get_u_net_vector)
예제 #3
0
파일: utils.py 프로젝트: eddiejessup/ahoy
def t_rs_abs(dirname):
    """Calculate the absolute particle displacement over time along each axis
    for a model output directory.

    Parameters
    ----------
    dirname: str
        A model output directory path

    Returns
    -------
    ts: numpy.ndarray[dtype=float]
        Times.
    rs: numpy.ndarray[dtype=float]
         Particle absolute displacements
    """
    return t_measures(dirname, get_time, get_r_abs)
예제 #4
0
파일: utils.py 프로젝트: eddiejessup/ahoy
def t_rs_scalar(dirname):
    """Calculate the overall particle displacement over time
    for a model output directory.

    Parameters
    ----------
    dirname: str
        A model output directory path

    Returns
    -------
    ts: numpy.ndarray[dtype=float]
        Times.
    rs: numpy.ndarray[dtype=float]
         Particle displacements
    """
    return t_measures(dirname, get_time, get_r_scalar)
예제 #5
0
파일: utils.py 프로젝트: eddiejessup/ahoy
def t_Ds_vector(dirname):
    """Calculate the particle diffusion constant over time along each axis
    for a model output directory.

    Parameters
    ----------
    dirname: str
        A model output directory path

    Returns
    -------
    ts: numpy.ndarray[dtype=float]
        Times.
    Ds: numpy.ndarray[dtype=float]
         Particle diffusion constants.
    """
    return t_measures(dirname, get_time, get_D_vector)
예제 #6
0
파일: utils.py 프로젝트: eddiejessup/ahoy
def t_uds_abs(dirname):
    """Calculate the overall particle absolute drift speed over time
    for a model output directory.

    Parameters
    ----------
    dirname: str
        A model output directory path

    Returns
    -------
    ts: numpy.ndarray[dtype=float]
        Times.
    uds_abs: numpy.ndarray[dtype=float]
         Particle absolute drift speeds.
    """
    return t_measures(dirname, get_time, get_ud_abs)
예제 #7
0
파일: utils.py 프로젝트: eddiejessup/ahoy
def t_uds_vector(dirname):
    """Calculate the particle drift speed over time along each axis
    for a model output directory.

    Parameters
    ----------
    dirname: str
        A model output directory path

    Returns
    -------
    ts: numpy.ndarray[dtype=float]
        Times.
    uds: numpy.ndarray[dtype=float]
         Drift speeds, normalised by the swimmer speed.
    """
    return t_measures(dirname, get_time, get_ud_vector)