def init_vitals(self): ''' Vital information ''' if not file_exists(self.projection_file): raise RuntimeError("%s does not exist, this is vital" % self.projection_file) if not file_exists(self.simmx_file): raise RuntimeError("%s does not exist, this is vital" % self.simmx_file) if self.particle_file != None and not file_exists(self.particle_file): raise RuntimeError("%s does not exist, this is vital" % self.particle_file) n = EMUtil.get_image_count(self.projection_file) nx, ny = gimme_image_dimensions2D(self.simmx_file) if nx != n: raise RuntimeError( "Error: the number of projections %d does not match the x dimension %d of the simmx file" % (n, nxs)) self.num_particles = ny eulers = get_eulers_from(self.projection_file) self.specify_eulers(eulers) self.projections = EMData().read_images(self.projection_file) self.__update_cmp_attribute(False) self.set_emdata_list_as_data(self.projections, "cmp")
def init_vitals(self): ''' Vital information ''' if not file_exists(self.projection_file): raise RuntimeError("%s does not exist, this is vital" %self.projection_file) if not file_exists(self.simmx_file): raise RuntimeError("%s does not exist, this is vital" %self.simmx_file) if self.particle_file != None and not file_exists(self.particle_file): raise RuntimeError("%s does not exist, this is vital" %self.particle_file) n = EMUtil.get_image_count(self.projection_file) nx,ny = gimme_image_dimensions2D(self.simmx_file) if nx != n: raise RuntimeError("Error: the number of projections %d does not match the x dimension %d of the simmx file" %(n,nxs)) self.num_particles = ny eulers = get_eulers_from(self.projection_file) self.specify_eulers(eulers) self.projections = EMData().read_images(self.projection_file) self.__update_cmp_attribute(False) self.set_emdata_list_as_data(self.projections,"cmp")