def read_detector_pars(filename):
    """Read detector parameters from ASCII file.

    Table must contain 4 columns without header.
    Comment lines are allowed and will be ignored.
    Columns are automatically named:

    #. ``OBSMODE`` - Observation mode.
    #. ``SCALE`` - Pixel scale in arcseconds.
    #. ``NX`` - X dimension in pixels.
    #. ``NY`` - Y dimension in pixels.

    Example::

        # DETECTORS.DAT -- Comments.
        # More comments.
        acs,hrc     0.027   1024  1024
        acs,sbc     0.032   1024  1024
        stis,g140l  0.0244  1024  1024
        stis,g140m  0.0290  1024  1024

    Parameters
    ----------
    filename : str
        Detector parameters filename. Must be ASCII format.

    Returns
    -------
    data : `~astropy.table.Table`
        Data table.

    """
    return ascii.read(filename, guess=False, format='no_header', delimiter=
        '\\s', names=('OBSMODE', 'SCALE', 'NX', 'NY'), converters={
        'OBSMODE': [ascii.convert_numpy(str)], 'SCALE': [ascii.
        convert_numpy(float)], 'NX': [ascii.convert_numpy(int)], 'NY': [
        ascii.convert_numpy(int)]})
