def get_unit_spike_feature_names(self, unit_id=None):
        '''This function returns the names of spike features for a single
        unit or across all units (depending on the given unit_id).

        Returns
        ----------
        spike_features: list
            A list of string names for each feature in the specified unit.

        unit_id: int
            The unit_id for which the feature names will be returned. If None,
            the function will return all feature names across all units).
        '''
        if unit_id is None:
            feature_names = []
            for unit_id in self.get_unit_ids():
                curr_feature_names = self.get_unit_spike_feature_names(unit_id)
                for curr_feature_name in curr_feature_names:
                    feature_names.append(curr_feature_name)
            feature_names = sorted(list(set(feature_names)))
            return feature_names
        if isinstance(unit_id, (int, np.integer)):
            if unit_id in self.get_unit_ids():
                if unit_id not in self._unit_features:
                    self._unit_features[unit_id] = {}
                feature_names = sorted(self._unit_features[unit_id].keys())
                return feature_names
            else:
                raise ValueError(str(unit_id) + " is not a valid unit_id")
        else:
            raise ValueError(str(unit_id) + " must be an int")
def get_unit_spike_feature_names ( self , unit_id = None ) : if unit_id is None : feature_names = [ ] for unit_id in self . get_unit_ids ( ) : curr_feature_names = self . get_unit_spike_feature_names ( unit_id ) for curr_feature_name in curr_feature_names : feature_names . append ( curr_feature_name ) feature_names = sorted ( list ( set ( feature_names ) ) ) return feature_names if isinstance ( unit_id , ( int , np . integer ) ) : if unit_id in self . get_unit_ids ( ) : if unit_id not in self . _unit_features : self . _unit_features [ unit_id ] = { } feature_names = sorted ( self . _unit_features [ unit_id ] . keys ( ) ) return feature_names else : raise ValueError ( str ( unit_id ) + " is not a valid unit_id" ) else : raise ValueError ( str ( unit_id ) + " must be an int" )
This function returns the names of spike features for a single
        unit or across all units (depending on the given unit_id).

        Returns
        ----------
        spike_features: list
            A list of string names for each feature in the specified unit.

        unit_id: int
            The unit_id for which the feature names will be returned. If None,
            the function will return all feature names across all units).