pyCloudy  0.9.6
manage Cloudy photoionization code
pyCloudy.c1d.cloudy_model Namespace Reference

Classes

class  CloudyInput
 
class  CloudyModel
 

Functions

def load_models (model_name=None, mod_list=None, n_sample=None, verbose=False, kwargs)
 
def print_make_file
 
def run_cloudy
 Function used to run Cloudy on input files. More...
 

Function Documentation

def pyCloudy.c1d.cloudy_model.load_models (   model_name = None,
  mod_list = None,
  n_sample = None,
  verbose = False,
  kwargs 
)

Return a list of CloudyModel correspondig to a generic name

Parameters:

  • model_name: generic name. The method is looking for any "model_name*.out" file.
  • mod_list: in case model_name=None, this is the list of model names (something.out or something)
  • n_sample: randomly select n_sample from the model list
  • verbose: print out the name of the models read
  • **kwargs: arguments passed to CloudyModel
def pyCloudy.c1d.cloudy_model.print_make_file (   dir_ = None)
Create a Makefile in the dir_ directory, using pc.config.cloudy_exe as executable for cloudy
def pyCloudy.c1d.cloudy_model.run_cloudy (   dir_ = None,
  n_proc = 1,
  use_make = True,
  model_name = None,
  precom = "",
  cloudy_version = None 
)

Function used to run Cloudy on input files.

Run a (set of ) cloudy model(s)

Parameters:
    - dir_:        Directory where the model input files are
    - n_proc:      number of CPUs to run (default=1)
    - use_make:    if True (default), make is used. Otherwise Cloudy is run on one single model, 
        assuming that model_name.in exists
    - model_name:  if not None, used by: make name="model_name" or cloudy < model_name.in
        if None and use_make, make will run any pending model
    - precom: a string to put before Cloudy (e.g. "\nice 10")
    - cloudy_version: one of the keys of pc.config.cloudy_dict, pointing to the location of the executable,
        e.g. '10.00' or '13.03'. If set to None (default), then pc.config.cloudy.exe is used