Image for :meth`.Surface.is_valid` docstring.
764273
def surface_is_valid1(surface):
    """"""
    if NO_IMAGES:
        return

    ax = surface.plot(256)
    ax.axis("scaled")
    ax.set_xlim(-0.125, 2.125)
    ax.set_ylim(-0.125, 2.125)
    save_image(ax.figure, "surface_is_valid1.png")
328372
def is_valid(self):
        """"""
        if not self.total:
            return False
        if not self.contributor.freelanceprofile.is_freelance:
            return False
        return True
345923
def verify(path):
        """"""
        valid = False
        try:
            h5 = h5py.File(path, mode="r")
        except (OSError, IsADirectoryError):
            pass
        else:
            if ("file_format" in h5.attrs and
                h5.attrs["file_format"].lower() == "hyperspy" and
                    "Experiments" in h5):
                valid = True
        return valid
693423
def is_valid(self, qstr=None):
        """"""
        if qstr is None:
            qstr = self.currentText()
        return osp.isdir(to_text_string(qstr))
1229024
def is_image(self, key):
        """"""
        data = self.model.get_data()
        return isinstance(data[key], Image)
194350
def check_animated(cls, raw_image):
        ""
        try:
            raw_image.seek(1)
        except EOFError:
            isanimated= False
        else:
            isanimated= True
            raise cls.AnimatedImageException
625721
def is_valid(self):
        """"""
        for lineedit in self.lineedits:
            if lineedit in self.validate_data and lineedit.isEnabled():
                validator, invalid_msg = self.validate_data[lineedit]
                text = to_text_string(lineedit.text())
                if not validator(text):
                    QMessageBox.critical(self, self.get_name(),
                                     "%s:<br><b>%s</b>" % (invalid_msg, text),
                                     QMessageBox.Ok)
                    return False
        return True
70195
def is_valid(self, qstr=None):
        """"""
        if qstr is None:
            qstr = self.currentText()
        return QUrl(qstr).isValid()
702374
def is_imagej(self):
        """"""
        for description in (self.description, self.description1):
            if not description:
                return None
            if description[:7] == 'ImageJ=':
                return description
        return None
248814
def is_valid_url(url):
    """"""
    from .misc import to_text

    if not url:
        return url
    pieces = urllib_parse.urlparse(to_text(url))
    return all([pieces.scheme, pieces.netloc])
1344123
def surface_to_image(surface):
    """"""
    from IPython.display import Image
    buf = BytesIO()
    surface.write_to_png(buf)
    data = buf.getvalue()
    buf.close()
    return Image(data=data)
989204
def verify_exif(filename):
    '''
    
    '''
    # required tags in IFD name convention
    required_exif = required_fields()
    exif = ExifRead(filename)
    required_exif_exist = exif.fields_exist(required_exif)
    return required_exif_exist
212312
def _is_image(self, var):
        """"""
        try:
            from PIL import Image
            return isinstance(var, Image.Image)
        except:
            return False
1158528
def is_valid(self):
        ''''''
        return (self.is_primitive and self.name) \
            or (self.is_complex and self.name) \
            or (self.is_list and self.nested) \
            or (self.is_map and self.nested) \
            or (self.is_model and self.nested)
857768
def valid(cls, data, context=None):
        """"""
        return cls(cls.TagType.VALID, data, context)
1005526
def is_valid_shape(value):
    """"""
    if is_int_positive(value):
        return True, value
    elif isinstance(value, tuple) or isinstance(value, list):
        for v in value:
            if not is_int_positive(v):
                return False, value
        return True, value
    else:
        return False, value
949205
def is_valid(self):
        """"""
        if not all([
            isinstance(self.zoom, int),
            self.zoom >= 0,
            isinstance(self.row, int),
            self.row >= 0,
            isinstance(self.col, int),
            self.col >= 0
        ]):
            raise TypeError("zoom, col and row must be integers >= 0")
        cols = self.tile_pyramid.matrix_width(self.zoom)
        rows = self.tile_pyramid.matrix_height(self.zoom)
        if self.col >= cols:
            raise ValueError("col (%s) exceeds matrix width (%s)" % (self.col, cols))
        if self.row >= rows:
            raise ValueError("row (%s) exceeds matrix height (%s)" % (self.row, rows))
        return True