@classmethod
def from_dir(cls, base_dir, hdu_table_filename=None, obs_table_filename=None):
    'Create from a directory.\n\n        Parameters\n        ----------\n        base_dir : str, Path\n            Base directory of the data files.\n        hdu_table_filename : str, Path\n            Filename of the HDU index file. May be specified either relative\n            to `base_dir` or as an absolute path. If None, the default filename\n            will be looked for.\n        obs_table_filename : str, Path\n            Filename of the observation index file. May be specified either relative\n            to `base_dir` or as an absolute path. If None, the default filename\n            will be looked for.\n        '
    base_dir = make_path(base_dir)
    if hdu_table_filename:
        hdu_table_filename = make_path(hdu_table_filename)
        if (base_dir / hdu_table_filename).exists():
            hdu_table_filename = (base_dir / hdu_table_filename)
    else:
        hdu_table_filename = (base_dir / cls.DEFAULT_HDU_TABLE)
    if obs_table_filename:
        obs_table_filename = make_path(obs_table_filename)
        if (base_dir / obs_table_filename).exists():
            obs_table_filename = (base_dir / obs_table_filename)
    else:
        obs_table_filename = (base_dir / cls.DEFAULT_OBS_TABLE)
    if (not hdu_table_filename.exists()):
        raise IOError('File not found: {}'.format(hdu_table_filename))
    log.debug('Reading {}'.format(hdu_table_filename))
    hdu_table = HDUIndexTable.read(str(hdu_table_filename), format='fits')
    hdu_table.meta['BASE_DIR'] = str(base_dir)
    if (not obs_table_filename.exists()):
        raise IOError('File not found: {}'.format(obs_table_filename))
    log.debug('Reading {}'.format(str(obs_table_filename)))
    obs_table = ObservationTable.read(str(obs_table_filename), format='fits')
    return cls(hdu_table=hdu_table, obs_table=obs_table)
Create from a directory.

Parameters
----------
base_dir : str, Path
    Base directory of the data files.
hdu_table_filename : str, Path
    Filename of the HDU index file. May be specified either relative
    to `base_dir` or as an absolute path. If None, the default filename
    will be looked for.
obs_table_filename : str, Path
    Filename of the observation index file. May be specified either relative
    to `base_dir` or as an absolute path. If None, the default filename
    will be looked for.
@classmethod
def from_dir(cls, base_dir, hdu_table_filename=None, obs_table_filename=None):
    'Create from a directory.\n\n        Parameters\n        ----------\n        base_dir : str, Path\n            Base directory of the data files.\n        hdu_table_filename : str, Path\n            Filename of the HDU index file. May be specified either relative\n            to `base_dir` or as an absolute path. If None, the default filename\n            will be looked for.\n        obs_table_filename : str, Path\n            Filename of the observation index file. May be specified either relative\n            to `base_dir` or as an absolute path. If None, the default filename\n            will be looked for.\n        '
    base_dir = make_path(base_dir)
    if hdu_table_filename:
        hdu_table_filename = make_path(hdu_table_filename)
        if (base_dir / hdu_table_filename).exists():
            hdu_table_filename = (base_dir / hdu_table_filename)
    else:
        hdu_table_filename = (base_dir / cls.DEFAULT_HDU_TABLE)
    if obs_table_filename:
        obs_table_filename = make_path(obs_table_filename)
        if (base_dir / obs_table_filename).exists():
            obs_table_filename = (base_dir / obs_table_filename)
    else:
        obs_table_filename = (base_dir / cls.DEFAULT_OBS_TABLE)
    if (not hdu_table_filename.exists()):
        raise IOError('File not found: {}'.format(hdu_table_filename))
    log.debug('Reading {}'.format(hdu_table_filename))
    hdu_table = HDUIndexTable.read(str(hdu_table_filename), format='fits')
    hdu_table.meta['BASE_DIR'] = str(base_dir)
    if (not obs_table_filename.exists()):
        raise IOError('File not found: {}'.format(obs_table_filename))
    log.debug('Reading {}'.format(str(obs_table_filename)))
    obs_table = ObservationTable.read(str(obs_table_filename), format='fits')
    return cls(hdu_table=hdu_table, obs_table=obs_table)