cpod package

Submodules

cpod.sim_managers module

class cpod.sim_managers.SimManage(cpodConfPath)[source]

Bases: object

This class has been created to house functions that are used to manage and manipulate N-body simulations that used for the mass mapping projects.

DELTA_CONFIG_FILE_NAME = u'deltaConfig.conf'
cpod_quicksetup()[source]

This function has been written to quickly set up the environment for runing: MUSIC, Gadget2 and rockstar

mk_gadget2_config(dir_in, ic_datafile=u'ics_gadget.dat', ic_confgfile=u'ics_MUSIC.conf', list_a_file=u'outfile_a.dat', list_a_new=True, len_fac_out=0.5, zmax_out=2.0)[source]

This function is designed to automatically generate a gadget parameter file. This input for this is a directory that contains both the ic_files and the config files used to generate that ic data.

Parameters:
  • dir_in – directory containing ic data and ic config files
  • ic_datafile – name of the ic data file
  • ic_confgfile – name of the ic config file
  • list_a_file – file with the output a times
  • list_a_new – if True (default) the list_a_file is created
  • len_fac_out

    ???

  • zmax_out

    ???

Returns:

outdir,gadget_param_file,num_a_out

mk_list_a(file_out, ic_config, len_fac=0.5, zmax=2.0)[source]

Function for making a list of a value that will be used output results of the N-body simulations.

Parameters:
  • file_out – the output file where the a list will be stored
  • ic_configin – config instance used to generate initial conditions
  • len_fac

    ???

  • zmax

    ???

Returns:

num_a_out

mk_music_config(output_path, outfile=u'ics_MUSIC.conf', configin=None, template_conf_file=None, random_seed=None, ic_in_configdir=True)[source]

This function is designed to automatically generate the configuration file need to run MUSIC (IC generator)

Parameters:
  • output_path – path to the directory where the music configuration should be created
  • outfile – (optional) name of the output config file
  • configin – (optional) name of a file that contains entries to overwrite default values in template
  • template_conf_file – (optional) template config file to be used
  • random_seed – (optional) random seed to use
  • ic_in_configdir – (optional) if True (default) the output directory for ic files will be same as the config files
Returns:

the name of the MUSIC config file

mk_rockstar_config(dir_in=u'temp', dir_out=u'temp', rockstar_config_file=u'rockstar_confg.cfg', filename=u'snapshot_<snap>', num_snaps=50, startingsnap=0)[source]

function for making the config files need to run rock star

Parameters:
  • dir_in
  • dir_out
  • rockstar_config_file
  • filename
  • num_snaps
  • startingsnap
setup(deltaConfig=None, seed=None)[source]

Sets up the instance by creating the output directory structure

Parameters:
  • root_output_dir – the root of the desired output directory
  • deltaConfig – (optional) the delta config to use
  • seed – (optional) the seed to be used

cpod.utils module

Created on Mar 17, 2014

author: jakeret

cpod.utils.get_default_cpod_conf_path()[source]
cpod.utils.get_default_delta_conf_path()[source]

Module contents