Ejemplo n.º 1
0
def read_esrf_id19(fname, proj=None, sino=None):
    """
    Read ESRF ID-19 standard data format.

    Parameters
    ----------
    fname : str
        Path to edf file.

    proj : {sequence, int}, optional
        Specify projections to read. (start, end, step)

    sino : {sequence, int}, optional
        Specify sinograms to read. (start, end, step)

    Returns
    -------
    ndarray
        3D tomographic data.

    ndarray
        3D flat field data.

    ndarray
        3D dark field data.
    """

    fname = os.path.abspath(fname)
    tomo_name = os.path.join(fname, 'tomo.edf')
    flat_name = os.path.join(fname, 'flat.edf')
    dark_name = os.path.join(fname, 'dark.edf')
    tomo = dxreader.read_edf(tomo_name, slc=(proj, sino))
    flat = dxreader.read_edf(flat_name, slc=(None, sino))
    dark = dxreader.read_edf(dark_name, slc=(None, sino))
    return tomo, flat, dark
Ejemplo n.º 2
0
def read_esrf_id19(fname, proj=None, sino=None):
    """
    Read ESRF ID-19 standard data format.

    Parameters
    ----------
    fname : str
        Path to edf file.

    proj : {sequence, int}, optional
        Specify projections to read. (start, end, step)

    sino : {sequence, int}, optional
        Specify sinograms to read. (start, end, step)

    Returns
    -------
    ndarray
        3D tomographic data.

    ndarray
        3D flat field data.

    ndarray
        3D dark field data.
    """

    fname = os.path.abspath(fname)
    tomo_name = os.path.join(fname, 'tomo.edf')
    flat_name = os.path.join(fname, 'flat.edf')
    dark_name = os.path.join(fname, 'dark.edf')
    tomo = dxreader.read_edf(tomo_name, slc=(proj, sino))
    flat = dxreader.read_edf(flat_name, slc=(None, sino))
    dark = dxreader.read_edf(dark_name, slc=(None, sino))
    return tomo, flat, dark