pypet/trajectory.py
def load_trajectory(name=None,
                    index=None,
                    as_new=False,
                    load_parameters=pypetconstants.LOAD_DATA,
                    load_derived_parameters=pypetconstants.LOAD_SKELETON,
                    load_results=pypetconstants.LOAD_SKELETON,
                    load_other_data=pypetconstants.LOAD_SKELETON,
                    recursive=True,
                    load_data=None,
                    max_depth=None,
                    force=False,
                    dynamic_imports=None,
                    new_name='my_trajectory',
                    add_time=True,
                    wildcard_functions=None,
                    with_run_information=True,
                    storage_service=storage.HDF5StorageService,
                    **kwargs):
    """Helper function that creates a novel trajectory and loads it from disk.

    For the parameters see :func:`~pypet.trajectory.Trajectory.f_load`.

    ``new_name`` and ``add_time`` are only used in case ``as_new`` is ``True``.
    Accordingly, they determine the new name of trajectory.

    """
    if name is None and index is None:
        raise ValueError('Please specify either a name or an index')
    elif name is not None and index is not None:
        raise ValueError('Please specify either a name or an index')

    traj = Trajectory(name=new_name, add_time=add_time, dynamic_imports=dynamic_imports,
                      wildcard_functions=wildcard_functions)
    traj.f_load(name=name, index=index, as_new=as_new, load_parameters=load_parameters,
                load_derived_parameters=load_derived_parameters, load_results=load_results,
                load_other_data=load_other_data, recursive=recursive, load_data=load_data,
                max_depth=max_depth, force=force, with_run_information=with_run_information,
                storage_service=storage_service, **kwargs)
    return traj
def load_trajectory(name=None,
                    index=None,
                    as_new=False,
                    load_parameters=pypetconstants.LOAD_DATA,
                    load_derived_parameters=pypetconstants.LOAD_SKELETON,
                    load_results=pypetconstants.LOAD_SKELETON,
                    load_other_data=pypetconstants.LOAD_SKELETON,
                    recursive=True,
                    load_data=None,
                    max_depth=None,
                    force=False,
                    dynamic_imports=None,
                    new_name='my_trajectory',
                    add_time=True,
                    wildcard_functions=None,
                    with_run_information=True,
                    storage_service=storage.HDF5StorageService,
                    **kwargs):
    if name is None and index is None:
        raise ValueError('Please specify either a name or an index')
    elif name is not None and index is not None:
        raise ValueError('Please specify either a name or an index')

    traj = Trajectory(name=new_name, add_time=add_time, dynamic_imports=dynamic_imports,
                      wildcard_functions=wildcard_functions)
    traj.f_load(name=name, index=index, as_new=as_new, load_parameters=load_parameters,
                load_derived_parameters=load_derived_parameters, load_results=load_results,
                load_other_data=load_other_data, recursive=recursive, load_data=load_data,
                max_depth=max_depth, force=force, with_run_information=with_run_information,
                storage_service=storage_service, **kwargs)
    return traj
def load_trajectory ( name = None , index = None , as_new = False , load_parameters = pypetconstants . LOAD_DATA , load_derived_parameters = pypetconstants . LOAD_SKELETON , load_results = pypetconstants . LOAD_SKELETON , load_other_data = pypetconstants . LOAD_SKELETON , recursive = True , load_data = None , max_depth = None , force = False , dynamic_imports = None , new_name = 'my_trajectory' , add_time = True , wildcard_functions = None , with_run_information = True , storage_service = storage . HDF5StorageService , * * kwargs ) : if name is None and index is None : raise ValueError ( 'Please specify either a name or an index' ) elif name is not None and index is not None : raise ValueError ( 'Please specify either a name or an index' ) traj = Trajectory ( name = new_name , add_time = add_time , dynamic_imports = dynamic_imports , wildcard_functions = wildcard_functions ) traj . f_load ( name = name , index = index , as_new = as_new , load_parameters = load_parameters , load_derived_parameters = load_derived_parameters , load_results = load_results , load_other_data = load_other_data , recursive = recursive , load_data = load_data , max_depth = max_depth , force = force , with_run_information = with_run_information , storage_service = storage_service , * * kwargs ) return traj
Helper function that creates a novel trajectory and loads it from disk.

    For the parameters see :func:`~pypet.trajectory.Trajectory.f_load`.

    ``new_name`` and ``add_time`` are only used in case ``as_new`` is ``True``.
    Accordingly, they determine the new name of trajectory.
Helper function that creates a novel trajectory and loads it from disk .