PeTar
N-body code for collisional gravitational systems
|
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 | |
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
def galpy_help.listCPot | ( | ) |
def galpy_help.listPot | ( | ) |
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
def galpy_help.printPotTitle | ( | ) |
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
def galpy_help.printSpliter | ( | ) |
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
def galpy_help.usage | ( | ) |
galpy_help.config_filename = "" |
galpy_help.kwargs = dict() |
list galpy_help.longargs = ['help'] |
galpy_help.n_pot |
galpy_help.opts |
galpy_help.pot_arg |
galpy_help.pot_instance |
galpy_help.POT_LIST_INFO = dict() |
galpy_help.pot_module |
galpy_help.pot_name = remainder[0] |
galpy_help.pot_type |
bool galpy_help.print_help_flag = False |
galpy_help.remainder |
string galpy_help.shortargs = 'o:dhl' |
galpy_help.type_arg |