def obsmode_del(ad):
    """
    Deletes the 'OBSMODE' keyword from the PHUs of images produced by
    IRAF routines in the GMOS package.

    Parameters
    ----------
    ad: AstroData
        image to remove header keywords from

    Returns
    -------
    AstroData
        the fixed image
    """
    if 'GMOS' in ad.tags:
        for keyword in ['OBSMODE', 'GPREPARE', 'GBIAS', 'GSREDUCE']:
            if keyword in ad.phu:
                ad.phu.remove(keyword)
    return ad