def __init__(self, filename): DetectorImageBase.__init__(self, filename) try: from cbflib_adaptbx import CBFAdaptor # optional package self.adaptor = CBFAdaptor(filename) # for testing only: ''' self.adaptor.read_header() print " size1:", self.adaptor.size1() print " size2:", self.adaptor.size2() print " overload:", self.adaptor.overload() print "wavelength:", self.adaptor.wavelength() print " distance:", self.adaptor.distance() print "pixel size:", self.adaptor.pixel_size() print " beamx:", self.adaptor.beam_index_slow*self.adaptor.pixel_size() print " beamy:", self.adaptor.beam_index_fast*self.adaptor.pixel_size() print " osc_start:", self.adaptor.osc_start() print " osc_range:", self.adaptor.osc_range() print self.adaptor.raster_description() flags = self.adaptor.transform_flags() print flags.transpose, flags.reverse_slow, flags.reverse_fast ''' except Exception: from iotbx.detectors.marIP import NullAdaptor self.adaptor = NullAdaptor() self.vendortype = "CBF" self.readHeader() try: self.vendor_specific_null_value = int( self.adaptor.undefined_value()) except RuntimeError as e: self.vendor_specific_null_value = 0
def __init__(self, filename, index=0): DetectorImageBase.__init__(self, filename) self.vendortype = "EigerX" self.supports_multiple_images = True self.img_number = index # 0-indexed to clients, internally 1-indexed if self.img_number == None: self.img_number = 0 self.vendor_specific_null_value = -1
def __init__(self,filename): DetectorImageBase.__init__(self,filename) try: from cbflib_adaptbx import CBFAdaptor # optional package self.adaptor = CBFAdaptor(filename) # for testing only: ''' self.adaptor.read_header() print " size1:", self.adaptor.size1() print " size2:", self.adaptor.size2() print " overload:", self.adaptor.overload() print "wavelength:", self.adaptor.wavelength() print " distance:", self.adaptor.distance() print "pixel size:", self.adaptor.pixel_size() print " beamx:", self.adaptor.beam_index_slow*self.adaptor.pixel_size() print " beamy:", self.adaptor.beam_index_fast*self.adaptor.pixel_size() print " osc_start:", self.adaptor.osc_start() print " osc_range:", self.adaptor.osc_range() print self.adaptor.raster_description() flags = self.adaptor.transform_flags() print flags.transpose, flags.reverse_slow, flags.reverse_fast ''' except Exception: from iotbx.detectors.marIP import NullAdaptor self.adaptor = NullAdaptor() self.vendortype = "CBF" self.readHeader() self.vendor_specific_null_value = int(self.adaptor.undefined_value())
def __init__(self,filename): DetectorImageBase.__init__(self,filename) try: from cbflib_adaptbx import Mar345Adaptor # optional package self.adaptor = Mar345Adaptor(filename) except Exception: self.adaptor = NullAdaptor() self.vendortype = "MARIP"
def __init__(self, filename): DetectorImageBase.__init__(self, filename) try: from cbflib_adaptbx import Mar345Adaptor # optional package self.adaptor = Mar345Adaptor(filename) except Exception: self.adaptor = NullAdaptor() self.vendortype = "MARIP"
def __init__(self,filename): DetectorImageBase.__init__(self,filename) self.vendortype = "MARCCD" byte_order = str(open(self.filename,"rb").read(2)) if byte_order == 'II': self.endian = 0 else: self.endian = 1 assert not self.isCompressed()
def __init__(self, filename): DetectorImageBase.__init__(self, filename) self.vendortype = "MARCCD" with open(self.filename, "rb") as fh: byte_order = fh.read(2) if byte_order == b"II": self.endian = 0 else: self.endian = 1 assert not self.isCompressed()
def __init__(self, file_name): DetectorImageBase.__init__(self, file_name) raw = open(file_name, "rb").read() self.binary_sections = get_binary_sections(raw) self.header_sections = get_header_sections(raw, self.binary_sections) assert len(self.binary_sections)==1 cif = iotbx.cif.fast_reader(input_string=self.header_sections) self.cif_model = cif.model() im1 = self.cif_model["image_1"] self.vendortype = "CBF" self.readHeader()
def __init__(self, file_name): DetectorImageBase.__init__(self, file_name) raw = open(file_name, "rb").read() self.binary_sections = get_binary_sections(raw) self.header_sections = get_header_sections(raw, self.binary_sections) assert len(self.binary_sections) == 1 cif = iotbx.cif.fast_reader(input_string=self.header_sections) self.cif_model = cif.model() im1 = self.cif_model["image_1"] self.vendortype = "CBF" self.readHeader()
def __init__(self, filename): """Initialize the instance""" # Make sure the image name is a string for iotbx try: image_str = unicodedata.normalize("NFKD", filename).encode("ascii", "ignore") except TypeError: image_str = filename DetectorImageBase.__init__(self, image_str) # self.vendortype = "MARCCD" byte_order = str(open(self.filename, "rb").read(2)) if byte_order == "II": self.endian = 0 else: self.endian = 1 assert not self.isCompressed()
def __init__(self,filename): DetectorImageBase.__init__(self,filename) self.vendortype = "Eiger" self.vendor_specific_null_value = -1
def __init__(self,filename): DetectorImageBase.__init__(self,filename) self.vendortype = "ADSC"
def __init__(self,filename): DetectorImageBase.__init__(self,filename) self.vendortype = "ADSC" self.open_file = open # default: open files with built-in, unless otherwise instructed by dxtbx format
def __init__(self, filename): DetectorImageBase.__init__(self, filename) self.vendortype = "Pilatus" self.vendor_specific_null_value = -1
def __init__(self,filename): DetectorImageBase.__init__(self,filename) Raxis.__init__(self,filename) self.vendortype = "RAXIS"
def __init__(self, filename): DetectorImageBase.__init__(self, filename) self.vendortype = "SMV(Generic)"
def __init__(self,filename): DetectorImageBase.__init__(self,filename) self.filename = filename self.vendortype = "MacScience" self.getImageSize()
def __init__(self,filename): DetectorImageBase.__init__(self,filename) self.vendortype = "SMV(Generic)"
def __init__(self,filename): DetectorImageBase.__init__(self,filename) self.vendortype = "EIGER" self.supports_multiple_images = True self.img_number = 0 # 0-indexed to clients, internally 1-indexed
def __init__(self,filename): DetectorImageBase.__init__(self,filename) self.vendortype = "RigakuSaturn"
def __init__(self, filename, source_data=None): DetectorImageBase.__init__(self, filename) self.vendortype = "npy_raw" self.source_data = source_data
def __init__(self, filename): DetectorImageBase.__init__(self, filename) self.vendortype = "Hamamatsu"
def __init__(self, filename, source_data = None): DetectorImageBase.__init__(self, filename) self.vendortype = "npy_raw" self.source_data = source_data
def __init__(self, filename): DetectorImageBase.__init__(self, filename) Raxis.__init__(self, filename) self.vendortype = "RAXIS"
def __init__(self, filename, source_data=None): DetectorImageBase.__init__(self, filename) self.vendortype = "npy_raw" self.source_data = image_dict_to_unicode(source_data)