def is_same_size(sicd1, sicd2):
    """
    Are the two SICD structures the same size in pixels?

    Parameters
    ----------
    sicd1 : sarpy.io.complex.sicd_elements.SICD.SICDType
    sicd2 : sarpy.io.complex.sicd_elements.SICD.SICDType

    Returns
    -------
    bool
    """

    if sicd1 is sicd2:
        return True

    try:
        return (sicd1.ImageData.NumRows == sicd2.ImageData.NumRows) and \
               (sicd1.ImageData.NumCols == sicd2.ImageData.NumCols)
    except AttributeError:
        return False