def subarray_specs(subarr):
    """
    Get the pixel information for a NIRISS subarray

    The returned dictionary defines the extent ('x' and 'y'),
    the starting pixel ('xloc' and 'yloc'), and the number
    of reference pixels at each subarray edge ('x1', 'x2',
    'y1', 'y2) as defined by SSB/DMS coordinates shown below:
        ___________________________________
       |               y2                  |
       |                                   |
       |                                   |
       | x1                             x2 |
       |                                   |
       |               y1                  |
       |___________________________________|
    (1,1)

    Parameters
    ----------
    subarr: str
        The subarray name

    Returns
    -------
    dict
        The dictionary of the specified subarray
        or a nested dictionary of all subarrays
    """
    pix = {'FULL': {'xloc': 1, 'x': 2048, 'x1': 4, 'x2': 4, 'yloc': 1, 'y':
        2048, 'y1': 4, 'y2': 4, 'tfrm': 10.737, 'tgrp': 10.737},
        'SUBSTRIP96': {'xloc': 1, 'x': 2048, 'x1': 4, 'x2': 4, 'yloc': 1803,
        'y': 96, 'y1': 0, 'y2': 0, 'tfrm': 2.213, 'tgrp': 2.213},
        'SUBSTRIP256': {'xloc': 1, 'x': 2048, 'x1': 4, 'x2': 4, 'yloc': 
        1793, 'y': 256, 'y1': 0, 'y2': 4, 'tfrm': 5.491, 'tgrp': 5.491}}
    return pix[subarr]
