def subarrays(inst):
    """function to show availalble subarrays and their times (in secons)

  Parameters
  ----------
  inst : str
    string of either niriss, nirspec, miri or nircam

  Returns
  -------
  dict
    dictionary with name of subarray as keys and time in seconds as entry
  """
    print(
        "Subarray field stored in inst_dict['configuration']['detector']['subarray']"
        )
    if inst.lower() == 'niriss':
        return {'substrip96': 2.2129, 'substrip256': 5.4913}
    elif inst.lower() == 'nirspec':
        return {'sub1024a': 0.451, 'sub1024b': 0.451, 'sub2048': 0.90156,
            'sub512': 0.22572}
    elif inst.lower() == 'miri':
        return {'slitlessprism': 0.159}
    elif inst.lower() == 'nircam':
        return {'subgrism64': 0.34, 'subgrism128': 0.67, 'subgrism256': 
            1.34, 'subgrism64 (noutputs=1)': 1.3,
            'subgrism128 (noutputs=1)': 2.6, 'subgrism256 (noutputs=1)': 5.2}
    else:
        raise Exception(
            'Only instruments are niriss, nirspec, miri, nircam. Pick one.')
