PeTar
N-body code for collisional gravitational systems
galpy_help Namespace Reference

Functions

def getPotInstance (pot_name)
 
def savePotTypeArg (config_filename, n_pot, pot_type, pot_arg)
 
def printPotTypeArg (pot_name, pot_module, pot_instance, print_front_offset=0, print_long_list=False)
 
def printPotTitle ()
 
def printSpliter ()
 
def listPot ()
 
def printCPot (pot_name)
 
def listCPot ()
 
def usage ()
 

Variables

 POT_LIST_INFO = dict()
 
bool print_help_flag = False
 
string config_filename = ""
 
string shortargs = 'o:dhl'
 
list longargs = ['help']
 
 opts
 
 remainder
 
 kwargs = dict()
 
 pot_name = remainder[0]
 
 pot_module
 
 pot_instance
 
 type_arg
 
 n_pot
 
 pot_type
 
 pot_arg
 

Function Documentation

◆ getPotInstance()

def galpy_help.getPotInstance (   pot_name)
Try to get an instance of a give pot_name
Return
----------
pot_module: module object of pot_name, if it is a combined list, return None
pot_instance: module instance, if it is not 3D or not available, return None
Here is the caller graph for this function:

◆ listCPot()

def galpy_help.listCPot ( )
Here is the call graph for this function:

◆ listPot()

def galpy_help.listPot ( )
Here is the call graph for this function:

◆ printCPot()

def galpy_help.printCPot (   pot_name)
Print descriptions of potential for c interface.
The c arguments of potential can be different from Python one

Parameters:
-----------
pot_name: string 
    Print the potential description for given potential name

◆ printPotTitle()

def galpy_help.printPotTitle ( )
Here is the caller graph for this function:

◆ printPotTypeArg()

def galpy_help.printPotTypeArg (   pot_name,
  pot_module,
  pot_instance,
  print_front_offset = 0,
  print_long_list = False 
)
print the petar --type-arg options for a given potential
Format of --type-arg is 
type1,type2,...:arg1,arg2,... or type1:arg1-1,arg1-2,...|type2:arg2-1,arg2-2,...

Parameters
----------
pot_name: string
    Name of potential
pot_module: class object
    The corresponding Potential class of a given potential, if the potential is a list of potential instances, input None
pot_instance: potential instance
    The potential instance or a list of potential instances

Return
----------
type_arg: petar --type-arg option argument for the given potential
npot:     number of potential models
pot_type: a list of potential types used in the given potential
pot_arg:  a list of potential argments used in the given potential
Here is the caller graph for this function:

◆ printSpliter()

def galpy_help.printSpliter ( )
Here is the caller graph for this function:

◆ savePotTypeArg()

def galpy_help.savePotTypeArg (   config_filename,
  n_pot,
  pot_type,
  pot_arg 
)
save type argument of a potential to a configure file

Parameters
----------
config_filename: string
    file name of output
n_pot: int
    number of types
pot_type: np.ndarray.astype(int)
    type list
pot_arg: np.ndarray
    argument list

◆ usage()

def galpy_help.usage ( )

Variable Documentation

◆ config_filename

galpy_help.config_filename = ""

◆ kwargs

galpy_help.kwargs = dict()

◆ longargs

list galpy_help.longargs = ['help']

◆ n_pot

galpy_help.n_pot

◆ opts

galpy_help.opts

◆ pot_arg

galpy_help.pot_arg

◆ pot_instance

galpy_help.pot_instance

◆ POT_LIST_INFO

galpy_help.POT_LIST_INFO = dict()

◆ pot_module

galpy_help.pot_module

◆ pot_name

galpy_help.pot_name = remainder[0]

◆ pot_type

galpy_help.pot_type

◆ print_help_flag

bool galpy_help.print_help_flag = False

◆ remainder

galpy_help.remainder

◆ shortargs

string galpy_help.shortargs = 'o:dhl'

◆ type_arg

galpy_help.type_arg