def StringColumnNames(self): result = "" for i in range(self.columnNamesIntegers.shape[0]): result = "%s %s" % ( result, "%i= %s" % (i, charToString(self.columnNamesIntegers[i])), ) for i in range(self.columnNamesFloats.shape[0]): result = "%s %s" % ( result, "%i= %s" % (i, charToString(self.columnNamesFloats[i])), ) return result
def PrintValues(self): print("The values contained in the MMF header:") print("1) Information about the file itself:") print(" gridSize = ", self.gridSize) print(" totalGrid = ", self.totalGrid) print(" feature = ", self.Feature()) print(" scale = ", self.scale) print(" radius = ", self.radius) print(" bias = ", self.bias) print(" filter = ", self.FilterType()) print(" fileType = ", self.FileType()) print(" noMMFFiles = ", self.noMMFFiles) if self.noMMFFiles > 1: print(" MMFFileGrid = ", self.MMFFileGrid) print(" indexMMFFile = ", self.indexMMFFile) print(" method = ", self.Method()) print(" box coordinates = ", self.box) print( "\n2) Information about the Gadget snapshot used to compute the density:" ) print(" npartTotal = ", self.npartTotal) print(" mass = ", self.mass) print(" time = ", self.time) print(" redshift = ", self.redshift) print(" BoxSize = ", self.BoxSize) print(" Omega0 = ", self.Omega0) print(" OmegaLambda = ", self.OmegaLambda) print(" HubbleParam = ", self.HubbleParam) print("\n3) Additional information:") print(" FILE_ID = ", self.FILE_ID) print(" fill = %s" % charToString(self.fill)) print()
def PrintColumnNames(self): print("\tInteger data columns:") for i in range(self.columnNamesIntegers.shape[0]): print( " %s" % ("%i= %s" % (i, charToString(self.columnNamesIntegers[i]))), # end=" ", ) print("\n\tFloating data columns:") for i in range(self.columnNamesFloats.shape[0]): print( " %s" % ("%i= %s" % (i, charToString(self.columnNamesFloats[i]))), # end=" ", ) print()
def Description(self): __description = [ ( "npartTotal", "=%s - the total number of particles in the given Gadget snapshot" % " ".join(str(self.npartTotal).split()), ), ( "mass", "=%s - the mass of each particle in the Gadget snapshot (10^10 M_0/h)" % " ".join(str(self.mass).split()), ), ("time", "=%f - the scaling factor of the snapshot" % self.time), ("redshift", "=%f - the redshift of the snapshot" % self.redshift), ( "BoxSize", "=%f - the size of the simulation box in comoving corodinates (kpc/h)" % self.BoxSize, ), ("Omega0", "=%f - the matter density" % self.Omega0), ( "OmegaLambda", "=%f - the Lambda energy density" % self.OmegaLambda, ), ( "HubbleParam", "=%f - Hubble parameter 'h' where the Hubble constant H=100 km/s h" % self.HubbleParam, ), ( "gadgetFill", "='%s' - additional information" % charToString(self.fill), ), ] return __description
def PrintValues(self): print("The values contained in the Gadget header:") print(" npart = ", self.npart) print(" mass = ", self.mass) print(" time = ", self.time) print(" redshift = ", self.redshift) print(" npartTotal = ", self.npartTotal) print(" num_files = ", self.num_files) print(" BoxSize = ", self.BoxSize) print(" Omega0 = ", self.Omega0) print(" OmegaLambda = ", self.OmegaLambda) print(" HubbleParam = ", self.HubbleParam) print(" fill = ", charToString(self.fill)) print()
def PrintValues(self, showColumnNames=True): print("The values contained in the halo header:") print(" noHalos = ", self.noHalos) print(" noColumnsIntegers = ", self.noColumnsIntegers) print(" noColumnsFloats = ", self.noColumnsFloats) print(" noColumns = ", self.noColumns) print(" mpcUnit = ", self.mpcUnit) print(" box coordinates = ", self.box) print(" positionColumns = ", self.positionColumns) print(" massUnit = ", self.massUnit) print(" massRange = ", self.massRange) print(" massColumn = ", self.massColumn) print(" noFiles = ", self.noFiles) print(" FILE_ID = ", self.FILE_ID) print(" fill = %s" % charToString(self.fill)) print() if showColumnNames: self.PrintColumnNames()