def findCols(cat, el): if cat == "time": return [col for col in tds.posCols() if col in el] if cat == "freq": return [col for col in fds.posCols() if col in el] if cat == "vel": return [col for col in vel.posCols() if col in el] if cat == "peak": parts = el.split("_") if len(parts) == 2: return [(parts[0], None)] if len(parts) == 3: return [(parts[0], parts[1], parts[2] == "cor")] return []
def getAllFeatures(): part = { 'time': { 'cols': tds.posCols(), 'features': tds.posFeatures().keys() }, 'freq': { 'cols': fds.posCols(), 'features': fds.posFeatures().keys() }, 'vel': { 'cols': vs.posCols(), 'features': vs.posFeatures().keys() }, 'peak': { 'cols': ps.posPeaks(), 'features': ps.posFeatures().keys() } } return { 'ankle': part, 'hip': part }