Exemplo n.º 1
0
 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
Exemplo n.º 2
0
    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()
Exemplo n.º 3
0
 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()
Exemplo n.º 4
0
 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
Exemplo n.º 5
0
 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()
Exemplo n.º 6
0
 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()