pypet/storageservice.py
def _srvc_check_hdf_properties(self, traj):
        """Reads out the properties for storing new data into the hdf5file

        :param traj:

            The trajectory

        """

        for attr_name in HDF5StorageService.ATTR_LIST:
            try:
                config = traj.f_get('config.hdf5.' + attr_name).f_get()
                setattr(self, attr_name, config)
            except AttributeError:
                self._logger.debug('Could not find `%s` in traj config, '
                                     'using (default) value `%s`.' %
                                     (attr_name, str(getattr(self, attr_name))))

        for attr_name, table_name in HDF5StorageService.NAME_TABLE_MAPPING.items():
            try:
                if table_name in ('parameters', 'config'):
                    table_name += '_overview'
                config = traj.f_get('config.hdf5.overview.' + table_name).f_get()
                setattr(self, attr_name, config)
            except AttributeError:
                self._logger.debug('Could not find `%s` in traj config, '
                                     'using (default) value `%s`.' %
                                     (table_name, str(getattr(self, attr_name))))

        for attr_name, name in HDF5StorageService.PR_ATTR_NAME_MAPPING.items():
            try:
                config = traj.f_get('config.hdf5.' + name).f_get()
                setattr(self, attr_name, config)
            except AttributeError:
                self._logger.debug('Could not find `%s` in traj config, '
                                     'using (default) value `%s`.' %
                                     (name, str(getattr(self, attr_name))))

        if ((not self._overview_results_summary or
                    not self._overview_derived_parameters_summary) and
                    self._purge_duplicate_comments):
            raise RuntimeError('You chose to purge duplicate comments but disabled a summary '
                                   'table. You can only use the purging if you enable '
                                   'the summary tables.')

        self._filters = None
def _srvc_check_hdf_properties(self, traj):
        for attr_name in HDF5StorageService.ATTR_LIST:
            try:
                config = traj.f_get('config.hdf5.' + attr_name).f_get()
                setattr(self, attr_name, config)
            except AttributeError:
                self._logger.debug('Could not find `%s` in traj config, '
                                     'using (default) value `%s`.' %
                                     (attr_name, str(getattr(self, attr_name))))

        for attr_name, table_name in HDF5StorageService.NAME_TABLE_MAPPING.items():
            try:
                if table_name in ('parameters', 'config'):
                    table_name += '_overview'
                config = traj.f_get('config.hdf5.overview.' + table_name).f_get()
                setattr(self, attr_name, config)
            except AttributeError:
                self._logger.debug('Could not find `%s` in traj config, '
                                     'using (default) value `%s`.' %
                                     (table_name, str(getattr(self, attr_name))))

        for attr_name, name in HDF5StorageService.PR_ATTR_NAME_MAPPING.items():
            try:
                config = traj.f_get('config.hdf5.' + name).f_get()
                setattr(self, attr_name, config)
            except AttributeError:
                self._logger.debug('Could not find `%s` in traj config, '
                                     'using (default) value `%s`.' %
                                     (name, str(getattr(self, attr_name))))

        if ((not self._overview_results_summary or
                    not self._overview_derived_parameters_summary) and
                    self._purge_duplicate_comments):
            raise RuntimeError('You chose to purge duplicate comments but disabled a summary '
                                   'table. You can only use the purging if you enable '
                                   'the summary tables.')

        self._filters = None
def _srvc_check_hdf_properties ( self , traj ) : for attr_name in HDF5StorageService . ATTR_LIST : try : config = traj . f_get ( 'config.hdf5.' + attr_name ) . f_get ( ) setattr ( self , attr_name , config ) except AttributeError : self . _logger . debug ( 'Could not find `%s` in traj config, ' 'using (default) value `%s`.' % ( attr_name , str ( getattr ( self , attr_name ) ) ) ) for attr_name , table_name in HDF5StorageService . NAME_TABLE_MAPPING . items ( ) : try : if table_name in ( 'parameters' , 'config' ) : table_name += '_overview' config = traj . f_get ( 'config.hdf5.overview.' + table_name ) . f_get ( ) setattr ( self , attr_name , config ) except AttributeError : self . _logger . debug ( 'Could not find `%s` in traj config, ' 'using (default) value `%s`.' % ( table_name , str ( getattr ( self , attr_name ) ) ) ) for attr_name , name in HDF5StorageService . PR_ATTR_NAME_MAPPING . items ( ) : try : config = traj . f_get ( 'config.hdf5.' + name ) . f_get ( ) setattr ( self , attr_name , config ) except AttributeError : self . _logger . debug ( 'Could not find `%s` in traj config, ' 'using (default) value `%s`.' % ( name , str ( getattr ( self , attr_name ) ) ) ) if ( ( not self . _overview_results_summary or not self . _overview_derived_parameters_summary ) and self . _purge_duplicate_comments ) : raise RuntimeError ( 'You chose to purge duplicate comments but disabled a summary ' 'table. You can only use the purging if you enable ' 'the summary tables.' ) self . _filters = None
Reads out the properties for storing new data into the hdf5file

        :param traj:

            The trajectory
Reads out the properties for storing new data into the hdf5file