def niriss_grism_res(m=1):
    """Grism resolution

    Based on the pupil input and module, return the spectral
    dispersion and resolution as a tuple (res, dw).

    Parameters
    ----------
    m : int
        Spectral order (1 or 2).
    """

    # Spectral resolution in um/pixel
    dw = 0.00478
    res = 1. / dw

    if m==2:
        res *= 2
        dw *= 0.5

    return (res, dw)