Pickle Contents

SPHGR stores data in a pickle file. This file is a serialization of objects similar to Java‘s JSON. This lets us store data in a way where upon reading it back in, all of the objects and functions associated with said objects are restored. The contents of the SPHGR pickle file contains a number of containers, which hold other objects; basically a way of organizing the data. The general idea is to have a hierarchy of data that looks something like this:

PICKLE
- container1
  - data
- container2
  - data
...

Which can then be accessed very easily. To get data within the first container you would refer to it like so:

> PICKLE.container1.data

These objects are very similar to a common struct, but are more flexible in that they can also contain functions or methods. The hierarchy of an SPHGR pickle file look something like this:

_images/sphgr_pickle.png

Global Attributes & Containers

note: - - denotes a container

pickleFile.:

- - rto                 # run-time-options
- - constants           # universal constants
- - conversionFactors   # conversion factors
- - locs                # file locations
- - snapAttribs         # snapshot info
- - particleLists       # holds methods to read in particle lists
- - particleData        # holds methods to read in particle data
- - halos               # list of all halo objects
- - galaxies            # list of all galaxy objects
- halo_index_translator #
- n_side                # number of particles per side (N^1/3)
- nparts                # list of particle numbers (types 0-5)
- h                     # Hubble parameter
- boxsize               # boxsize
- boxsize_h             # boxsize/h
- redshift              # redshift
- time                  # scale factor
- num_halos             # number of halos
- num_galaxies          # number of galaxies
- snapdir               # snapshot directory
- snapname              # snapshot base name (excluding directory)
- snapnum               # snapshot number
- snap                  # full snap path
- pickle                # path and name of pickle file
- pprogress             # run time parameter

rto

pickleFile.rto.:

- DEBUG
- DS
- EPSILON_FACT
- GROUPDIRPREFIX
- HDF5
- TIPSY
- PERIODIC
- SKIPRAN
- SUPRESS
- zoomSim
- ZOOM_LOWRES
- localDensitySearchFactor
- pprogress
- pygr_OPTS
- snapnum_str

locs

pickleFile.locs.:

- GRID_DATA
- LOSER_DATADIR
- LOSER_FILES
- PROGEN_DIR
- PROGEN_GALAXY_FILE
- PROGEN_HALO_FILE
- RS_BINFILE
- RS_DIR
- RS_PARENTFILE
- SKID_DIR
- SKID_FILE
- SKID_GRPFILE
- SKID_STATFILE
- snap
- snapdir

constants

pickleFile.constants.:

- cm_per_mpc
- kpc_to_cm
- cm_to_kpc
- Msun_in_g
- protonmass_in_g
- c
- G
- Boltzmann
- cm_to_km
- H_He_mass_in_g
- UnitMass_in_g
- UnitLength_in_cm
- UnitVelocity_in_cm_per_s

conversionFactors

pickleFile.conversionFactors.:

- LCONVERT              # --> kpc
- MCONVERT              # --> Msun
- rconvert              # length conversion factor [1/(1+z)]
- vfactor               # velocity conversion factor [sqrt(a)]
- VCONVERT              # --> km/s
- RS_L_CONVERT          # RS length conversion factor --> Mpc/h
- RS_M_CONVERT          # RS mass conversion factor --> Msun/h
- TIPSY_L_convert       # TIPSY length conversion factor
- TIPSY_V_convert       # TIPSY velocity conversion factor
- TIPSY_M_convert       # TIPSY mass conversion factor
- TIPSY_RHO_convert     # TIPSY density conversion factor

snapAttribs

pickleFile.snapAttribs.:

- DM_ONLY               # set to 1 if this is a DM only sim
- redshift              # redshift
- time                  # scale factor
- h                     # hubble parameter
- O0                    # matter density
- Ol                    # vacuum energy density
- boxsize               # size of the box (no little h)
- boxsize_h             # size of the box (little h divided out)
- n_gas                 # number of type [0] gas particles
- n_star                # number of type [4] star particles
- n_dm                  # number of type [1] dm particles
- n_bulge               # number of type [3] bulge particles
- n_disk                # number of type [2] disk particles
- n_bndry               # number of type [5] bndry particles
- nparts                # list - [n_gas,n_dm,n_bulge,n_disk,n_star,n_bndry]
- nfiles                # number of files for this snapshot
- flagSFR               # SFR flag
- flagFB                # FB flag
- flagCooling           # Cooling flag
- flagAge               # Stellar Age flag
- flagFH2               # fH2 flag

particleData

pickleFile.particleData.:

- getParticleIDs()
- getParticleData()
- deleteParticleIDs()
- deleteParticleData()
- cleanUp()

particleLists

pickleFile.particleLists.:

- getParticleLists()
- saveParticleLists()

galaxies (galaxy class)

pickleFile.galaxies[N].:

- cm                    # x,y,z center-of-mass
- vel                   # x,y,z center-of-mass velocities
- HMR                   # half-mass-radius  (SKID)
- FMR                   # full-mass-radius  (SKID)
- stellar_FMR           # maximum stellar radius
- gas_mass              # total gas mass
- stellar_mass          # total stellar mass
- total_mass            # gas + stellar
- HImass                # HI mass
- H2mass                # H2 mass
- Hmass                 # H  mass
- HMR_cv                # circular velocity at HMR (SKID)
- FMR_cv                # circular velocity at FMR (SKID)
- max_cv                # maximum circular velocity
- max_cv_r              # radius at maximum vphi
- sigma1d               # 1D velocity dispersion
- central               # -1=unassigned, 0=satellite, 1=central
- originalIndex         # original SKID index
- sfr                   # total SFR
- Z                     # SFR-weighted metallicity
- mwZ                   # MASS-weighted metallicity
- glist                 # indexes of gas particles that belong to this gal
- slist                 # indexes of star particles that belong to this gal
- L                     # Lx,Ly,Lz angular momentum vector
- ALPHA                 # first rotation angle to align L with z-axis
- BETA                  # second rotation angle to align L with z-axis
- local_mass_density    # local mass density of galaxies
- local_number_density  # local number density of galaxies
- halo_index            # index of corresponding RS halo
- halo_distance         # distance between galaxy CoM and halo CoM
- halo_dm_mass          # total DM mass within the halo
- halo_gmass            # total gas mass within the halo
- halo_smass            # total stellar mass within the halo
- halo_total_mass       # halo_gas + halo_star + halo_dm mass
- halo_mass             # total DM mass within the halo
- halo_isparent         # -1=parent, anything else is substructure

halos (halo class)

pickleFile.halos[N].:

- cm                    # x,y,z center-of-mass
- r200                  # radius
- maxrad                # maximum radius
- L                     # Lx,Ly,Lz angular momentum vector
- hparent               # -1=parent, anything else is substructure
- particle_count        # number of DM particles
- galaxy_list           # list of galaxy indexes contained within this halo
- subhalos              # list of subhalo indexes contained
- glist                 # indexes of gas particles that belong to this halo
- slist                 # indexes of star particles that belong to this halo
- dmlist                # indexes of dm particles that belong to this halo
- lrlist                # list of low-res particles (if present)
- mass                  # virial mass given by RS
- dm_mass               # total DM mass within the halo
- gas_mass              # total gas mass within the halo
- stellar_mass          # total stellar mass within the halo
- total_mass            # gas + star + dm mass
- local_mass_density    # local mass density of halos
- local_number_density  # local number density of halos
- energy                #
- spin                  #
- vmax                  #
- rvmax                 #
- vrms                  #
- originalIndex         #