Global Constants

Here you can find global constants. These constants define the data supported by the storage service and the standard parameter, maximum lenght of comments, messages for storing and loading etc.

This module contains constants defined for a global scale and used across most pypet modules.

It contains constants defining the maximum length of a parameter/result name or constants that are recognized by storage services to determine how to store and load data.

pypet.pypetconstants.PARAMETERTYPEDICT = {"<type 'float'>": <type 'float'>, "<type 'long'>": <type 'long'>, "<type 'numpy.int32'>": <Mock object at 0x7f5414b31290>, "<type 'numpy.uint32'>": <Mock object at 0x7f5414b313d0>, "<type 'bool'>": <type 'bool'>, "<type 'numpy.uint16'>": <Mock object at 0x7f5414b31390>, "<type 'numpy.float64'>": <Mock object at 0x7f5414b31210>, "<type 'numpy.string_'>": <Mock object at 0x7f5414b31350>, "<type 'numpy.float32'>": <Mock object at 0x7f5414b311d0>, "<type 'numpy.complex128'>": <Mock object at 0x7f5414b31150>, "<type 'numpy.uint8'>": <Mock object at 0x7f5414b31450>, "<type 'complex'>": <type 'complex'>, "<type 'numpy.int16'>": <Mock object at 0x7f5414b31250>, "<type 'numpy.int64'>": <Mock object at 0x7f5414b312d0>, "<type 'int'>": <type 'int'>, "<type 'numpy.uint64'>": <Mock object at 0x7f5414b31410>, "<type 'numpy.bool_'>": <Mock object at 0x7f5414b310d0>, "<type 'numpy.int8'>": <Mock object at 0x7f5414b31310>, "<type 'str'>": <type 'str'>, "<type 'numpy.complex64'>": <Mock object at 0x7f5414b31190>}

A Mapping (dict) from the the string representation of a type and the type.

These are the so far supported types of the storage service and the standard parameter!

pypet.pypetconstants.PARAMETER_SUPPORTED_DATA = (<Mock object at 0x7f5414b31490>, <Mock object at 0x7f5414b314d0>, <Mock object at 0x7f5414b31510>, <Mock object at 0x7f5414b31550>, <Mock object at 0x7f5414b31590>, <Mock object at 0x7f5414b315d0>, <Mock object at 0x7f5414b31610>, <Mock object at 0x7f5414b31650>, <Mock object at 0x7f5414b31690>, <Mock object at 0x7f5414b316d0>, <Mock object at 0x7f5414b31710>, <Mock object at 0x7f5414b31750>, <Mock object at 0x7f5414b31790>, <Mock object at 0x7f5414b317d0>, <Mock object at 0x7f5414b31810>, <Mock object at 0x7f5414b31850>, <Mock object at 0x7f5414b31890>, <Mock object at 0x7f5414b318d0>, <Mock object at 0x7f5414b31910>, <Mock object at 0x7f5414b31950>, <Mock object at 0x7f5414b31990>, <Mock object at 0x7f5414b319d0>)

Set of supported scalar types by the storage service and the standard parameter

pypet.pypetconstants.HDF5_STRCOL_MAX_NAME_LENGTH = 128

Maximum length of a (short) name

pypet.pypetconstants.HDF5_STRCOL_MAX_LOCATION_LENGTH = 256

Maximum length of the location string

pypet.pypetconstants.HDF5_STRCOL_MAX_VALUE_LENGTH = 64

Maximum length of a value string

pypet.pypetconstants.HDF5_STRCOL_MAX_COMMENT_LENGTH = 512

Maximum length of a comment

pypet.pypetconstants.HDF5_STRCOL_MAX_ARRAY_LENGTH = 1024

Maximum length of a parameter array summary

pypet.pypetconstants.HDF5_STRCOL_MAX_RUNTIME_LENGTH = 18

Maximum length of human readable runtime, 18 characters allows to display up to 999 days excluding the microseconds

pypet.pypetconstants.HDF5_MAX_OBJECT_TABLE_TYPE_ATTRS = 32

Maximum number of attributes before a distinct table is created

pypet.pypetconstants.WRAP_MODE_QUEUE = 'QUEUE'

For multiprocessing, queue multiprocessing mode

pypet.pypetconstants.WRAP_MODE_LOCK = 'LOCK'

Lock multiprocessing mode

pypet.pypetconstants.WRAP_MODE_NONE = 'NONE'

No multiprocessing wrapping for the storage service

pypet.pypetconstants.LOAD_SKELETON = 1

For trajectory loading, loads only the skeleton.

pypet.pypetconstants.LOAD_DATA = 2

Loads skeleton and data.

pypet.pypetconstants.LOAD_NOTHING = 0

Loads nothing

pypet.pypetconstants.OVERWRITE_DATA = 3

Overwrites all data in RAM with data from disk

pypet.pypetconstants.UPDATE_SKELETON = 1

DEPRECATED: Updates skeleton, i.e. adds only items that are not part of your current trajectory.

pypet.pypetconstants.UPDATE_DATA = 2

DEPRECATED: Updates skeleton and data, adds only items that are not part of your current trajectory.

pypet.pypetconstants.LEAF = 'LEAF'

For trajectory or item storage, stores a leaf node, i.e. parameter or result object

pypet.pypetconstants.TRAJECTORY = 'TRAJECTORY'

Stores the whole trajectory

pypet.pypetconstants.MERGE = 'MERGE'

Merges two trajectories

pypet.pypetconstants.GROUP = 'GROUP'

Stores a group node, can be recursive.

pypet.pypetconstants.LIST = 'LIST'

Stores a list of different things, in order to avoid reopening and closing of the hdf5 file.

pypet.pypetconstants.SINGLE_RUN = 'SINGLE_RUN'

Stores a single run

pypet.pypetconstants.PREPARE_MERGE = 'PREPARE_MERGE'

Updates a trajectory before it is going to be merged

pypet.pypetconstants.BACKUP = 'BACKUP'

Backs up a trajectory

pypet.pypetconstants.DELETE = 'DELETE'

Removes an item from hdf5 file

pypet.pypetconstants.TREE = 'TREE'

Stores a subtree of the trajectory

pypet.pypetconstants.FORMAT_ZEROS = 8

Number of leading zeros

pypet.pypetconstants.RUN_NAME = 'run_'

Name of a single run

pypet.pypetconstants.RUN_NAME_DUMMY = 'run_ALL'

Dummy name if not created during run

pypet.pypetconstants.FORMATTED_RUN_NAME = 'run_%08d'

Name formatted with leading zeros