예제 #1
0
    def setUp(self):

        if not hasattr(self, 'data'):
            self.data = {}

        self.data['integer'] = 42
        self.data['float'] = 42.424242
        self.data['string'] = 'TestString! 66'
        self.data['long'] = compat.long_type(444444444444444444)
        self.data['numpy_array'] = np.array([[3232.3, 323232323232.32323232],
                                             [4., 4.]])
        self.data['tuple'] = (444, 444, 443)
        self.data['list'] = ['3', '4', '666']
        self.data['dict'] = {'a': 'b', 'c': 42, 'd': (1, 2, 3)}
        self.data['object_table'] = ObjectTable(
            data={
                'characters': ['Luke', 'Han', 'Spock'],
                'Random_Values': [42, 43, 44],
                'Arrays':
                [np.array([1, 2]),
                 np.array([3, 4]),
                 np.array([5, 5])]
            })
        self.data['pandas_frame'] = pd.DataFrame(
            data={
                'characters': ['Luke', 'Han', 'Spock'],
                'Random_Values': [42, 43, 44],
                'Doubles': [1.2, 3.4, 5.6]
            })

        self.data['nested_data.hui.buh.integer'] = 42

        myframe = pd.DataFrame(
            data={
                'TC1': [1, 2, 3],
                'TC2': ['Waaa', np.nan, ''],
                'TC3': [1.2, 42.2, np.nan]
            })

        myseries = myframe['TC1']

        mypanel = pd.Panel({
            'Item1': pd.DataFrame(np.random.randn(4, 3)),
            'Item2': pd.DataFrame(np.random.randn(4, 2))
        })

        self.data['series'] = myseries
        self.data['panel'] = mypanel

        # self.data['p4d'] = pd.Panel4D(np.random.randn(2, 2, 5, 4),
        #     labels=['Label1','Label2'],
        #    items=['Item1', 'Item2'],
        #    major_axis=pd.date_range('1/1/2000', periods=5),
        #   minor_axis=['A', 'B', 'C', 'D'])

        self.make_constructor()
        self.make_results()
예제 #2
0
    def setUp(self):

        if not hasattr(self,'data'):
            self.data={}

        self.data['integer'] = 42
        self.data['float'] = 42.424242
        self.data['string'] = 'TestString! 66'
        self.data['long'] = compat.long_type(444444444444444444)
        self.data['numpy_array'] = np.array([[3232.3,323232323232.32323232],[4.,4.]])
        self.data['tuple'] = (444,444,443)
        self.data['list'] = ['3','4','666']
        self.data['dict'] = {'a':'b','c':42, 'd': (1,2,3)}
        self.data['object_table'] = ObjectTable(data={'characters':['Luke', 'Han', 'Spock'],
                                    'Random_Values' :[42,43,44],
                                    'Arrays': [np.array([1,2]),np.array([3, 4]), np.array([5,5])]})
        self.data['pandas_frame'] = pd.DataFrame(data={'characters':['Luke', 'Han', 'Spock'],
                                    'Random_Values' :[42,43,44],
                                    'Doubles': [1.2,3.4,5.6]})

        self.data['nested_data.hui.buh.integer'] = 42

        myframe = pd.DataFrame(data ={'TC1':[1,2,3],'TC2':['Waaa',np.nan,''],'TC3':[1.2,42.2,np.nan]})


        myseries = myframe['TC1']

        mypanel = pd.Panel({'Item1' : pd.DataFrame(np.random.randn(4, 3)),
                            'Item2' : pd.DataFrame(np.random.randn(4, 2))})

        self.data['series'] = myseries
        self.data['panel'] = mypanel

        # self.data['p4d'] = pd.Panel4D(np.random.randn(2, 2, 5, 4),
        #     labels=['Label1','Label2'],
        #    items=['Item1', 'Item2'],
        #    major_axis=pd.date_range('1/1/2000', periods=5),
        #   minor_axis=['A', 'B', 'C', 'D'])

        self.make_constructor()
        self.make_results()
예제 #3
0
def create_param_dict(param_dict):
    '''Fills a dictionary with some parameters that can be put into a trajectory.
    '''
    param_dict['Normal'] = {}
    param_dict['Numpy'] = {}
    param_dict['Sparse'] ={}
    param_dict['Numpy_2D'] = {}
    param_dict['Numpy_3D'] = {}
    param_dict['Tuples'] ={}
    param_dict['Pickle']={}

    normal_dict = param_dict['Normal']
    normal_dict['string'] = 'Im a test string!'
    normal_dict['int'] = 42
    normal_dict['long'] = compat.long_type(42)
    normal_dict['double'] = 42.42
    normal_dict['bool'] =True
    normal_dict['trial'] = 0

    numpy_dict=param_dict['Numpy']
    numpy_dict['string'] = np.array(['Uno', 'Dos', 'Tres'])
    numpy_dict['int'] = np.array([1,2,3,4])
    numpy_dict['double'] = np.array([1.0,2.0,3.0,4.0])
    numpy_dict['bool'] = np.array([True,False, True])

    param_dict['Numpy_2D']['double'] = np.matrix([[1.0,2.0],[3.0,4.0]])
    param_dict['Numpy_3D']['double'] = np.array([[[1.0,2.0],[3.0,4.0]],[[3.0,-3.0],[42.0,41.0]]])

    spsparse_csc = spsp.csc_matrix((2222,22))
    spsparse_csc[1,2] = 44.6
    spsparse_csc[1,9] = 44.5

    spsparse_csr = spsp.csr_matrix((2222,22))
    spsparse_csr[1,3] = 44.7
    spsparse_csr[17,17] = 44.755555

    spsparse_bsr = spsp.bsr_matrix(np.matrix([[1, 1, 0, 0, 2, 2],
        [1, 1, 0, 0, 2, 2],
        [0, 0, 0, 0, 3, 3],
        [0, 0, 0, 0, 3, 3],
        [4, 4, 5, 5, 6, 6],
        [4, 4, 5, 5, 6, 6]]))

    spsparse_dia = spsp.dia_matrix(np.matrix([[1, 0, 3, 0],
        [1, 2, 0, 4],
        [0, 2, 3, 0],
        [0, 0, 3, 4]]))


    param_dict['Sparse']['bsr_mat'] = spsparse_bsr
    param_dict['Sparse']['csc_mat'] = spsparse_csc
    param_dict['Sparse']['csr_mat'] = spsparse_csr
    param_dict['Sparse']['dia_mat'] = spsparse_dia

    param_dict['Tuples']['int'] = (1,2,3)
    param_dict['Tuples']['float'] = (44.4,42.1,3.)
    param_dict['Tuples']['str'] = ('1','2wei','dr3i')

    param_dict['Pickle']['list']= ['b','h', 53, (),0]
    param_dict['Pickle']['list']= ['b','h', 42, (),1]
    param_dict['Pickle']['list']= ['b',[444,43], 44, (),2]
예제 #4
0
def simple_calculations(traj, arg1, simple_kwarg):

        print('>>>>>Starting Simple Calculations')
        my_dict = {}

        my_dict2={}
        param_dict=traj.parameters.f_to_dict(fast_access=True,short_names=False)
        for key in sorted(param_dict.keys())[0:10]:
            val = param_dict[key]
            if 'trial' in key:
                continue
            newkey = key.replace('.','_')
            my_dict[newkey] = str(val)
            my_dict2[newkey] = [str(val)+' juhu!']

        my_dict['__FLOAT'] = 44.0
        my_dict['__INT'] = 66
        my_dict['__NPINT'] = np.int_(55)
        my_dict['__INTaRRAy'] = np.array([1,2,3])
        my_dict['__FLOATaRRAy'] = np.array([1.0,2.0,41.0])
        my_dict['__FLOATaRRAy_nested'] = np.array([np.array([1.0,2.0,41.0]),np.array([1.0,2.0,41.0])])
        my_dict['__STRaRRAy'] = np.array(['sds','aea','sf'])
        my_dict['__LONG'] = compat.long_type(42)
        my_dict['__UNICODE'] = u'sdfdsf'
        my_dict['__BYTES'] = b'zweiundvierzig'
        my_dict['__NUMPY_UNICODE'] = np.array([u'$%&ddss'])
        my_dict['__NUMPY_BYTES'] = np.array([b'zweiundvierzig'])

        keys = sorted(to_dict_wo_config(traj).keys())
        for idx,key in enumerate(keys[0:10]):
            keys[idx] = key.replace('.', '_')

        traj.f_add_result_group('List', comment='Im a result group')
        traj.f_add_result_group('Iwiiremainempty.yo', comment='Empty group!')
        traj.Iwiiremainempty.f_store_child('yo')

        traj.f_add_result('List.Of.Keys', dict1=my_dict, dict2=my_dict2, comment='Test')
        traj.List.f_store_child('Of', recursive=True)
        traj.f_add_result('DictsNFrame', keys=keys, comment='A dict!')
        traj.f_add_result('ResMatrix',np.array([1.2,2.3]), comment='ResMatrix')
        #traj.f_add_derived_parameter('All.To.String', str(traj.f_to_dict(fast_access=True,short_names=False)))

        myframe = pd.DataFrame(data ={'TC1':[1,2,3],'TC2':['Waaa',np.nan,''],'TC3':[1.2,42.2,np.nan]})

        myseries = myframe['TC1']

        mypanel = pd.Panel({'Item1' : pd.DataFrame(np.ones((4, 3))),'Item2' : pd.DataFrame(np.ones((4, 2)))})

        # p4d = pd.Panel4D(np.random.randn(2, 2, 5, 4),
        #     labels=['Label1','Label2'],
        #    items=['Item1', 'Item2'],
        #    major_axis=pd.date_range('1/1/2000', periods=5),
        #   minor_axis=['A', 'B', 'C', 'D'])


        traj.f_add_result('myseries', myseries, comment='dd')
        traj.f_store_item('myseries')
        traj.f_add_result('mypanel', mypanel, comment='dd')
        #traj.f_add_result('mypanel4d', p4d, comment='dd')

        traj.f_get('DictsNFrame').f_set(myframe)

        traj.f_add_result('IStore.SimpleThings',1.0,3,np.float32(5.0), 'Iamstring',(1,2,3),[4,5,6],zwei=2).v_comment='test'
        traj.f_add_derived_parameter('super.mega',33, comment='It is huuuuge!')
        traj.super.f_set_annotations(AgainATestAnnotations='I am a string!111elf')

        traj.f_add_result(PickleResult,'pickling.result.proto1', my_dict, protocol=1, comment='p1')
        traj.f_add_result(PickleResult,'pickling.result.proto2', my_dict, protocol=2, comment='p2')
        traj.f_add_result(PickleResult,'pickling.result.proto0', my_dict, protocol=0, comment='p0')

        traj.f_add_result(SparseResult, 'sparse.csc',traj.csc_mat,42).v_comment='sdsa'
        traj.f_add_result(SparseResult, 'sparse.bsr',traj.bsr_mat,52).v_comment='sdsa'
        traj.f_add_result(SparseResult, 'sparse.csr',traj.csr_mat,62).v_comment='sdsa'
        traj.f_add_result(SparseResult, 'sparse.dia',traj.dia_mat,72).v_comment='sdsa'

        traj.sparse.v_comment = 'I contain sparse data!'

        myobjtab = ObjectTable(data={'strings':['a','abc','qwertt'], 'ints':[1,2,3]})

        traj.f_add_result('object.table', myobjtab, comment='k').v_annotations.f_set(test=42)
        traj.object.f_set_annotations(test2=42.42)

        traj.f_add_result('$.here', 77, comment='huhu')
        traj.f_add_result('or.not.$', dollah=77, comment='duh!')
        traj.f_add_result('or.not.rrr.$.j', 77, comment='duh!')

        #traj.f_add_result('PickleTerror', result_type=PickleResult, test=traj.SimpleThings)
        print('<<<<<<Finished Simple Calculations')

        return 42
예제 #5
0
파일: data.py 프로젝트: nigroup/pypet
def simple_calculations(traj, arg1, simple_kwarg):

        if traj.v_idx == 0:
            # to shuffle runs
            time.sleep(0.1)

        rootlogger = get_root_logger()

        if not 'runs' in traj.res:
            traj.res.f_add_result_group('runs')

        rootlogger.info('>>>>>Starting Simple Calculations')
        my_dict = {}

        my_dict2={}
        param_dict=traj.parameters.f_to_dict(fast_access=True,short_names=False)
        for key in sorted(param_dict.keys())[0:5]:
            val = param_dict[key]
            if 'trial' in key:
                continue
            newkey = key.replace('.','_')
            my_dict[newkey] = str(val)
            my_dict2[newkey] = [str(val)+' juhu!']

        my_dict['__FLOAT'] = 44.0
        my_dict['__INT'] = 66
        my_dict['__NPINT'] = np.int_(55)
        my_dict['__INTaRRAy'] = np.array([1,2,3])
        my_dict['__FLOATaRRAy'] = np.array([1.0,2.0,41.0])
        my_dict['__FLOATaRRAy_nested'] = np.array([np.array([1.0,2.0,41.0]),np.array([1.0,2.0,41.0])])
        my_dict['__STRaRRAy'] = np.array(['sds','aea','sf'])
        my_dict['__LONG'] = compat.long_type(4266)
        my_dict['__UNICODE'] = u'sdfdsf'
        my_dict['__BYTES'] = b'zweiundvierzig'
        my_dict['__NUMPY_UNICODE'] = np.array([u'$%&ddss'])
        my_dict['__NUMPY_BYTES'] = np.array([b'zweiundvierzig'])

        keys = sorted(to_dict_wo_config(traj).keys())
        for idx,key in enumerate(keys[0:5]):
            keys[idx] = key.replace('.', '_')

        listy=traj.f_add_result_group('List', comment='Im a result group')
        traj.f_add_result_group('Iwiiremainempty.yo', comment='Empty group!')
        traj.Iwiiremainempty.f_store_child('yo')

        traj.Iwiiremainempty.f_add_link('kkk',listy )
        listy.f_add_link('hhh', traj.Iwiiremainempty)

        if not traj.Iwiiremainempty.kkk.v_full_name == traj.List.v_full_name:
            raise RuntimeError()

        if not traj.Iwiiremainempty.kkk.v_full_name == traj.List.hhh.kkk.v_full_name:
            raise RuntimeError()

        traj.f_add_result('runs.' + traj.v_crun + '.ggg', 5555, comment='ladida')
        traj.res.runs.f_add_result(traj.v_crun + '.ggjg', 5555, comment='didili')
        traj.res.runs.f_add_result('hhg', 5555, comment='jjjj')

        traj.res.f_add_result(name='lll', comment='duh', data=444)

        x = traj.res.f_add_result(name='nested', comment='duh')

        x['nested0.nested1.nested2.nested3'] =  44

        traj.res.f_add_result(name='test.$set.$', comment='duh', data=444)

        try:
            traj.f_add_config('teeeeest', 12)
            raise RuntimeError()
        except TypeError:
            pass

        # if not traj.f_contains('results.runs.' + traj.v_crun + '.ggjg', shortcuts=False):
        #     raise RuntimeError()
        # if not traj.f_contains('results.runs.' + traj.v_crun + '.ggg', shortcuts=False):
        #     raise RuntimeError()
        if not traj.f_contains('results.runs.' + traj.v_crun + '.hhg', shortcuts=False):
            raise RuntimeError()

        traj.f_add_result('List.Of.Keys', dict1=my_dict, dict2=my_dict2, comment='Test')
        traj.List.f_store_child('Of', recursive=True)
        traj.f_add_result('DictsNFrame', keys=keys, comment='A dict!')
        traj.f_add_result('ResMatrix',np.array([1.2,2.3]), comment='ResMatrix')

        traj.f_add_result('empty.stuff', (), [], {}, np.array([]), comment='empty stuff')
        #traj.f_add_derived_parameter('All.To.String', str(traj.f_to_dict(fast_access=True,short_names=False)))

        myframe = pd.DataFrame(data ={'TC1':[1,2,3],'TC2':['Waaa','',''],'TC3':[1.2,42.2,77]})

        myseries = myframe['TC1']

        mypanel = pd.Panel({'Item1' : pd.DataFrame(np.ones((4, 3))),'Item2' : pd.DataFrame(np.ones((4, 2)))})

        # p4d = pd.Panel4D(np.random.randn(2, 2, 5, 4),
        #     labels=['Label1','Label2'],
        #    items=['Item1', 'Item2'],
        #    major_axis=pd.date_range('1/1/2000', periods=5),
        #   minor_axis=['A', 'B', 'C', 'D'])


        traj.f_add_result('myseries', myseries, comment='dd')
        traj.f_store_item('myseries')
        traj.f_add_result('mypanel', mypanel, comment='dd')
        #traj.f_add_result('mypanel4d', p4d, comment='dd')

        traj.f_get('DictsNFrame').f_set(myframe)

        traj.f_add_result('IStore.SimpleThings',1.0,3,np.float32(5.0),
                          'Iamstring',
                          (1,2,3), [4,5,6],
                          zwei=2).v_comment='test'
        traj.f_add_derived_parameter('super.mega',33, comment='It is huuuuge!')
        traj.super.f_set_annotations(AgainATestAnnotations='I am a string!111elf')

        traj.f_add_result(PickleResult,'pickling.result.proto1', my_dict2, protocol=1, comment='p1')
        traj.f_add_result(PickleResult,'pickling.result.proto2', my_dict2, protocol=2, comment='p2')
        traj.f_add_result(PickleResult,'pickling.result.proto0', my_dict2, protocol=0, comment='p0')

        traj.f_add_result(SparseResult, 'sparse.csc', traj.csc_mat, 42).v_comment='sdsa'
        traj.f_add_result(SparseResult, 'sparse.bsr', traj.bsr_mat, 52).v_comment='sdsa'
        traj.f_add_result(SparseResult, 'sparse.csr', traj.csr_mat, 62).v_comment='sdsa'
        traj.f_add_result(SparseResult, 'sparse.dia', traj.dia_mat, 72).v_comment='sdsa'

        traj.sparse.v_comment = 'I contain sparse data!'

        myobjtab = ObjectTable(data={'strings':['a','abc','qwertt'], 'ints':[1,2,3]})

        traj.f_add_result('object.table', myobjtab, comment='k').v_annotations.f_set(test=42)
        traj.object.f_set_annotations(test2=42.42)

        traj.f_add_result('$.here', 77, comment='huhu')
        traj.f_add_result('tor.hot.$', dollah=77, comment='duh!')
        traj.f_add_result('tor.hot.rrr.$.j', 77, comment='duh!')
        traj.f_add_result('tor.hot.rrr.crun.jjj', 777, comment='duh**2!')

        #traj.f_add_result('PickleTerror', result_type=PickleResult, test=traj.SimpleThings)
        rootlogger.info('<<<<<<Finished Simple Calculations')

        # let's see if the traj can also always be returned
        if isinstance(traj.v_storage_service, LockWrapper):
            traj.v_storage_service.pickle_lock = False
        return 42, traj
예제 #6
0
def create_param_dict(param_dict):
    '''Fills a dictionary with some parameters that can be put into a trajectory.
    '''
    param_dict['Normal'] = {}
    param_dict['Numpy'] = {}
    param_dict['Sparse'] = {}
    param_dict['Numpy_2D'] = {}
    param_dict['Numpy_3D'] = {}
    param_dict['Tuples'] = {}
    param_dict['Lists'] = {}
    param_dict['Pickle'] = {}

    normal_dict = param_dict['Normal']
    normal_dict['string'] = 'Im a test string!'
    normal_dict['int'] = 42
    normal_dict['long'] = compat.long_type(42)
    normal_dict['double'] = 42.42
    normal_dict['bool'] = True
    normal_dict['trial'] = 0

    numpy_dict = param_dict['Numpy']
    numpy_dict['string'] = np.array(['Uno', 'Dos', 'Tres'])
    numpy_dict['int'] = np.array([1, 2, 3, 4])
    numpy_dict['double'] = np.array([1.0, 2.0, 3.0, 4.0])
    numpy_dict['bool'] = np.array([True, False, True])

    param_dict['Numpy_2D']['double'] = np.matrix([[1.0, 2.0], [3.0, 4.0]])
    param_dict['Numpy_3D']['double'] = np.array([[[1.0, 2.0], [3.0, 4.0]],
                                                 [[3.0, -3.0], [42.0, 41.0]]])

    spsparse_csc = spsp.lil_matrix((222, 22))
    spsparse_csc[1, 2] = 44.6
    spsparse_csc[1, 9] = 44.5
    spsparse_csc = spsparse_csc.tocsc()

    spsparse_csr = spsp.lil_matrix((222, 22))
    spsparse_csr[1, 3] = 44.7
    spsparse_csr[17, 17] = 44.755555
    spsparse_csr = spsparse_csr.tocsr()

    spsparse_bsr = spsp.bsr_matrix(
        np.matrix([[1, 1, 0, 0, 2, 2], [1, 1, 0, 0, 2, 2], [0, 0, 0, 0, 3, 3],
                   [0, 0, 0, 0, 3, 3], [4, 4, 5, 5, 6, 6], [4, 4, 5, 5, 6,
                                                            6]]))

    spsparse_dia = spsp.dia_matrix(
        np.matrix([[1, 0, 3, 0], [1, 2, 0, 4], [0, 2, 3, 0], [0, 0, 3, 4]]))

    param_dict['Sparse']['bsr_mat'] = spsparse_bsr
    param_dict['Sparse']['csc_mat'] = spsparse_csc
    param_dict['Sparse']['csr_mat'] = spsparse_csr
    param_dict['Sparse']['dia_mat'] = spsparse_dia

    param_dict['Tuples']['empty'] = ()
    param_dict['Tuples']['int'] = (1, 2, 3)
    param_dict['Tuples']['float'] = (44.4, 42.1, 3.)
    param_dict['Tuples']['str'] = ('1', '2wei', 'dr3i')

    param_dict['Lists']['lempty'] = []
    param_dict['Lists']['lint'] = [1, 2, 3]
    param_dict['Lists']['lfloat'] = [44.4, 42.1, 3.]
    param_dict['Lists']['lstr'] = ['1', '2wei', 'dr3i']

    param_dict['Pickle']['list'] = ['b', 'h', 53, (), 0]
    param_dict['Pickle']['list'] = ['b', 'h', 42, (), 1]
    param_dict['Pickle']['list'] = ['b', [444, 43], 44, (), 2]
예제 #7
0
def simple_calculations(traj, arg1, simple_kwarg):

    if traj.v_idx == 0:
        # to shuffle runs
        time.sleep(0.1)

    rootlogger = get_root_logger()

    if not 'runs' in traj.res:
        traj.res.f_add_result_group('runs')

    rootlogger.info('>>>>>Starting Simple Calculations')
    my_dict = {}

    my_dict2 = {}
    param_dict = traj.parameters.f_to_dict(fast_access=True, short_names=False)
    for key in sorted(param_dict.keys())[0:5]:
        val = param_dict[key]
        if 'trial' in key:
            continue
        newkey = key.replace('.', '_')
        my_dict[newkey] = str(val)
        my_dict2[newkey] = [str(val) + ' juhu!']

    my_dict['__FLOAT'] = 44.0
    my_dict['__INT'] = 66
    my_dict['__NPINT'] = np.int_(55)
    my_dict['__INTaRRAy'] = np.array([1, 2, 3])
    my_dict['__FLOATaRRAy'] = np.array([1.0, 2.0, 41.0])
    my_dict['__FLOATaRRAy_nested'] = np.array(
        [np.array([1.0, 2.0, 41.0]),
         np.array([1.0, 2.0, 41.0])])
    my_dict['__STRaRRAy'] = np.array(['sds', 'aea', 'sf'])
    my_dict['__LONG'] = compat.long_type(4266)
    my_dict['__UNICODE'] = u'sdfdsf'
    my_dict['__BYTES'] = b'zweiundvierzig'
    my_dict['__NUMPY_UNICODE'] = np.array([u'$%&ddss'])
    my_dict['__NUMPY_BYTES'] = np.array([b'zweiundvierzig'])

    keys = sorted(to_dict_wo_config(traj).keys())
    for idx, key in enumerate(keys[0:5]):
        keys[idx] = key.replace('.', '_')

    listy = traj.f_add_result_group('List', comment='Im a result group')
    traj.f_add_result_group('Iwiiremainempty.yo', comment='Empty group!')
    traj.Iwiiremainempty.f_store_child('yo')

    traj.Iwiiremainempty.f_add_link('kkk', listy)
    listy.f_add_link('hhh', traj.Iwiiremainempty)

    if not traj.Iwiiremainempty.kkk.v_full_name == traj.List.v_full_name:
        raise RuntimeError()

    if not traj.Iwiiremainempty.kkk.v_full_name == traj.List.hhh.kkk.v_full_name:
        raise RuntimeError()

    traj.f_add_result('runs.' + traj.v_crun + '.ggg', 5555, comment='ladida')
    traj.res.runs.f_add_result(traj.v_crun + '.ggjg', 5555, comment='didili')
    traj.res.runs.f_add_result('hhg', 5555, comment='jjjj')

    traj.res.f_add_result(name='lll', comment='duh', data=444)

    x = traj.res.f_add_result(name='nested', comment='duh')

    x['nested0.nested1.nested2.nested3'] = 44

    traj.res.f_add_result(name='test.$set.$', comment='duh', data=444)

    try:
        traj.f_add_config('teeeeest', 12)
        raise RuntimeError()
    except TypeError:
        pass

    # if not traj.f_contains('results.runs.' + traj.v_crun + '.ggjg', shortcuts=False):
    #     raise RuntimeError()
    # if not traj.f_contains('results.runs.' + traj.v_crun + '.ggg', shortcuts=False):
    #     raise RuntimeError()
    if not traj.f_contains('results.runs.' + traj.v_crun + '.hhg',
                           shortcuts=False):
        raise RuntimeError()

    traj.f_add_result('List.Of.Keys',
                      dict1=my_dict,
                      dict2=my_dict2,
                      comment='Test')
    traj.List.f_store_child('Of', recursive=True)
    traj.f_add_result('DictsNFrame', keys=keys, comment='A dict!')
    traj.f_add_result('ResMatrix', np.array([1.2, 2.3]), comment='ResMatrix')

    traj.f_add_result('empty.stuff', (), [], {},
                      np.array([]),
                      comment='empty stuff')
    #traj.f_add_derived_parameter('All.To.String', str(traj.f_to_dict(fast_access=True,short_names=False)))

    myframe = pd.DataFrame(data={
        'TC1': [1, 2, 3],
        'TC2': ['Waaa', '', ''],
        'TC3': [1.2, 42.2, 77]
    })

    myseries = myframe['TC1']

    mypanel = pd.Panel({
        'Item1': pd.DataFrame(np.ones((4, 3))),
        'Item2': pd.DataFrame(np.ones((4, 2)))
    })

    # p4d = pd.Panel4D(np.random.randn(2, 2, 5, 4),
    #     labels=['Label1','Label2'],
    #    items=['Item1', 'Item2'],
    #    major_axis=pd.date_range('1/1/2000', periods=5),
    #   minor_axis=['A', 'B', 'C', 'D'])

    traj.f_add_result('myseries', myseries, comment='dd')
    traj.f_store_item('myseries')
    traj.f_add_result('mypanel', mypanel, comment='dd')
    #traj.f_add_result('mypanel4d', p4d, comment='dd')

    traj.f_get('DictsNFrame').f_set(myframe)

    traj.f_add_result('IStore.SimpleThings',
                      1.0,
                      3,
                      np.float32(5.0),
                      'Iamstring', (1, 2, 3), [4, 5, 6],
                      zwei=2).v_comment = 'test'
    traj.f_add_derived_parameter('super.mega', 33, comment='It is huuuuge!')
    traj.super.f_set_annotations(AgainATestAnnotations='I am a string!111elf')

    traj.f_add_result(PickleResult,
                      'pickling.result.proto1',
                      my_dict2,
                      protocol=1,
                      comment='p1')
    traj.f_add_result(PickleResult,
                      'pickling.result.proto2',
                      my_dict2,
                      protocol=2,
                      comment='p2')
    traj.f_add_result(PickleResult,
                      'pickling.result.proto0',
                      my_dict2,
                      protocol=0,
                      comment='p0')

    traj.f_add_result(SparseResult, 'sparse.csc', traj.csc_mat,
                      42).v_comment = 'sdsa'
    traj.f_add_result(SparseResult, 'sparse.bsr', traj.bsr_mat,
                      52).v_comment = 'sdsa'
    traj.f_add_result(SparseResult, 'sparse.csr', traj.csr_mat,
                      62).v_comment = 'sdsa'
    traj.f_add_result(SparseResult, 'sparse.dia', traj.dia_mat,
                      72).v_comment = 'sdsa'

    traj.sparse.v_comment = 'I contain sparse data!'

    myobjtab = ObjectTable(data={
        'strings': ['a', 'abc', 'qwertt'],
        'ints': [1, 2, 3]
    })

    traj.f_add_result('object.table', myobjtab,
                      comment='k').v_annotations.f_set(test=42)
    traj.object.f_set_annotations(test2=42.42)

    traj.f_add_result('$.here', 77, comment='huhu')
    traj.f_add_result('tor.hot.$', dollah=77, comment='duh!')
    traj.f_add_result('tor.hot.rrr.$.j', 77, comment='duh!')
    traj.f_add_result('tor.hot.rrr.crun.jjj', 777, comment='duh**2!')

    #traj.f_add_result('PickleTerror', result_type=PickleResult, test=traj.SimpleThings)
    rootlogger.info('<<<<<<Finished Simple Calculations')

    # let's see if the traj can also always be returned
    if isinstance(traj.v_storage_service, LockWrapper):
        traj.v_storage_service.pickle_lock = False
    return 42, traj