def _start(self): """Open the image file, read the image header, copy it into a dictionary for future reference.""" FormatCBF._start(self) cif_header = FormatCBF.get_cbf_header(self._image_file) self._cif_header_dictionary = {} for record in cif_header.split("\n"): if record[:1] != "#": continue if len(record[1:].split()) <= 2 and record.count(":") == 2: self._cif_header_dictionary["timestamp"] = record[1:].strip() continue tokens = record.replace("=", "").replace(":", "").split() self._cif_header_dictionary[tokens[1]] = " ".join(tokens[2:]) for record in self._mime_header.split("\n"): if not record.strip(): continue token, value = record.split(":") self._cif_header_dictionary[token.strip()] = value.strip()
def _start(self): '''Open the image file, read the image header, copy it into a dictionary for future reference.''' FormatCBF._start(self) cif_header = FormatCBF.get_cbf_header(self._image_file) self._cif_header_dictionary = {} for record in cif_header.split('\n'): if not '#' in record[:1]: continue if len(record[1:].split()) <= 2 and record.count(':') == 2: self._cif_header_dictionary['timestamp'] = record[1:].strip() continue tokens = record.replace('=', '').replace(':', '').split()[1:] self._cif_header_dictionary[tokens[0]] = ' '.join(tokens[1:]) for record in self._mime_header.split('\n'): if not record.strip(): continue token, value = record.split(':') self._cif_header_dictionary[token.strip()] = value.strip() return
def _start(self): '''Open the image file, read the image header, copy it into a dictionary for future reference.''' FormatCBF._start(self) cif_header = FormatCBF.get_cbf_header(self._image_file) self._cif_header_dictionary = { } for record in cif_header.split('\n'): if not '#' in record[:1]: continue if len(record[1:].split()) <= 2 and record.count(':') == 2: self._cif_header_dictionary['timestamp'] = record[1:].strip() continue tokens = record.replace('=', '').replace(':', '').split()[1:] self._cif_header_dictionary[tokens[0]] = ' '.join(tokens[1:]) for record in self._mime_header.split('\n'): if not record.strip(): continue token, value = record.split(':') self._cif_header_dictionary[token.strip()] = value.strip() return
def _start(self): '''Open the image file as a cbf file handle, and keep this somewhere safe.''' FormatCBF._start(self) from iotbx.detectors.cbf import CBFImage self.detectorbase = CBFImage(self._image_file) self.detectorbase.readHeader()
def _start(self): """Read the image header and copy it into a dictionary for future reference. In this case the header is useless, so we populate the dictionary manually with dummy values""" FormatCBF._start(self) self._cif_header_dictionary = {} self._cif_header_dictionary["Detector_distance"] = "3.523 m" self._cif_header_dictionary["Beam_xy"] = "(1024.0, 1024.0) pixels" self._cif_header_dictionary["Wavelength"] = "0.02508 A" self._cif_header_dictionary["Pixel_size"] = "30e-6 m x 30e-6 m" self._cif_header_dictionary["X-Binary-Size-Fastest-Dimension"] = "2048" self._cif_header_dictionary["X-Binary-Size-Second-Dimension"] = "2048" self._cif_header_dictionary["Count_cutoff"] = "65535 counts" self._cif_header_dictionary["Phi"] = "0.0000 deg."
def _start(self): """Open the image file as a cbf file handle, and keep this somewhere safe.""" from dxtbx.format.FormatCBF import FormatCBF FormatCBF._start(self) # Note, skip up an inhieritance level
def _start(self): '''Open the image file as a cbf file handle, and keep this somewhere safe.''' FormatCBF._start(self)
def _start(self): """Open the image file as a cbf file handle, and keep this somewhere safe.""" FormatCBF._start(self)
def _start(self): """Open the image file as a cbf file handle, and keep this somewhere safe.""" FormatCBF._start(self) # Note, skip up an inheritance level
def _start(self): '''Open the image file as a cbf file handle, and keep this somewhere safe.''' from dxtbx.format.FormatCBF import FormatCBF FormatCBF._start(self) # Note, skip up an inhieritance level