Module Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias alias alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Import alias identifier ImportFrom alias identifier Import alias identifier Import alias Import alias ImportFrom alias alias Assign NameStore Num Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore BinOpDiv Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Num Return BinOpDiv Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr BinOpSub NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return BinOpDiv Call AttributeLoad NameLoad attr BinOpPow NameLoad Num Call AttributeLoad NameLoad attr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Expr Str Assign NameStore Call AttributeLoad NameLoad attr BinOpPow NameLoad Num Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr BinOpDiv NameLoad NameLoad If CompareNotEq NameLoad BinOpMult NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Slice Num BinOpMult NameLoad NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Str attr Assign NameStore BinOpDiv Call AttributeLoad NameLoad attr BinOpPow NameLoad Num keyword Num BinOpAdd NameLoad NameLoad Assign NameStore UnaryOpUSub Call AttributeLoad NameLoad attr BinOpMult NameLoad Call AttributeLoad NameLoad attr BinOpAdd NameLoad NameLoad Return NameLoad decorator_list Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore BinOpMult Call AttributeLoad NameLoad attr Num BinOpAdd Call NameLoad NameLoad Num BinOpDiv NameLoad BinOpMult Num Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpDiv NameLoad Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr BinOpMult NameLoad NameLoad Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore BinOpDiv NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpDiv Call AttributeLoad NameLoad attr BinOpMult BinOpPow BinOpSub NameLoad NameLoad Num NameLoad NameLoad Assign NameStore BinOpDiv NameLoad BinOpDiv NameLoad Num Assign NameStore BinOpDiv NameLoad BinOpDiv NameLoad Num Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpPow NameLoad Num Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr BinOpDiv NameLoad NameLoad If CompareNotEq NameLoad BinOpMult NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Slice Num BinOpMult NameLoad NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Str attr Assign NameStore BinOpDiv Call AttributeLoad NameLoad attr BinOpPow NameLoad Num keyword Num BinOpAdd NameLoad NameLoad Assign NameStore UnaryOpUSub Call AttributeLoad NameLoad attr BinOpMult NameLoad Call AttributeLoad NameLoad attr BinOpAdd NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpPow BinOpSub BinOpDiv NameLoad NameLoad BinOpDiv NameLoad NameLoad Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr BinOpPow NameLoad Num Assign NameStore Call NameLoad NameLoad Assign NameStore BinOpMult NameLoad NameLoad Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr BinOpPow NameLoad Num NameLoad Assign ListStore NameStore Call AttributeLoad NameLoad attr CompareGt NameLoad NameLoad If CompareGt Call NameLoad NameLoad Num body Assign NameStore BinOpDiv Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Call NameLoad NameLoad orelse Assign NameStore Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore BinOpSub Call AttributeLoad NameLoad attr BinOpMult Num NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Str Assign NameStore SubscriptLoad NameLoad Index BinOpSub Call NameLoad NameLoad Num Assign NameStore SubscriptLoad NameLoad Slice Call NameLoad NameLoad Num Assign ListStore NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad If CompareEq Call NameLoad NameLoad Num body Assign NameStore BinOpSub Call NameLoad NameLoad Num orelse Assign NameStore SubscriptLoad NameLoad Index Num If CompareGt NameLoad Call NameLoad NameLoad body Assign NameStore BinOpSub Call NameLoad NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr BinOpPow NameLoad Num Assign SubscriptStore NameLoad Slice NameLoad NameLoad BinOpDiv SubscriptLoad NameLoad Slice NameLoad NameLoad BinOpAdd Call AttributeLoad NameLoad attr BinOpMult NameLoad SubscriptLoad NameLoad Slice NameLoad NameLoad Num NameLoad Assign NameStore Call NameLoad NameLoad If CompareGt NameLoad Num body Assign NameStore Num Assign NameStore Num orelse If CompareEq Call NameLoad NameLoad Num body Assign NameStore Num Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpDiv NameLoad BinOpAdd NameLoad NameLoad If CompareGt NameLoad Num body Assign NameStore Num If CompareLt NameLoad Num body Assign NameStore Num Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Num Assign NameStore BinOpDiv Num Num Assign NameStore Num Assign NameStore Num Assign NameStore Num If CompareLt NameLoad Num body Assign NameStore Num Assign NameStore BinOpAdd NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd NameLoad Num Assign SubscriptStore NameLoad Slice NameLoad BinOpAdd NameLoad BinOpMult Call AttributeLoad NameLoad attr NameLoad NameLoad Assign SubscriptStore NameLoad Slice NameLoad BinOpMult SubscriptLoad NameLoad Index BinOpSub NameLoad Num BinOpPow NameLoad Call AttributeLoad NameLoad attr Num BinOpAdd NameLoad Num Assign NameStore BinOpDiv Num BinOpSub SubscriptLoad NameLoad Slice Num SubscriptLoad NameLoad Slice Num Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Assign NameStore BinOpMult BinOpDiv Call AttributeLoad NameLoad attr NameLoad BinOpMult Num NameLoad NameLoad For NameStore Call NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore SubscriptLoad NameLoad Index BinOpAdd NameLoad Num Assign NameStore SubscriptLoad NameLoad Index BinOpAdd NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd Call AttributeLoad NameLoad attr BinOpDiv BinOpMult NameLoad NameLoad NameLoad Num BinOpAdd Call AttributeLoad NameLoad attr BinOpDiv BinOpMult NameLoad NameLoad NameLoad Num keyword AttributeLoad NameLoad attr Assign NameStore BinOpDiv SubscriptLoad NameLoad Index NameLoad BinOpSub NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd Call AttributeLoad NameLoad attr BinOpDiv BinOpMult NameLoad NameLoad NameLoad Num BinOpAdd Call AttributeLoad NameLoad attr BinOpDiv BinOpMult NameLoad NameLoad NameLoad Num keyword AttributeLoad NameLoad attr Assign NameStore BinOpDiv SubscriptLoad NameLoad Index NameLoad BinOpSub NameLoad NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index NameLoad BinOpMult NameLoad BinOpSub SubscriptLoad NameLoad Index NameLoad NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index NameLoad BinOpMult NameLoad BinOpSub NameLoad SubscriptLoad NameLoad Index NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad Call NameLoad NameLoad keyword Num keyword Str keyword Num Slice NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr ListComp BinOpDiv BinOpMult BinOpAdd NameLoad Num NameLoad BinOpMult Num NameLoad comprehension NameStore Call NameLoad NameLoad Assign NameStore Num Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr BinOpMult Num Call AttributeLoad NameLoad attr BinOpDiv NameLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr TupleLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr CompareEq NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad AttributeLoad SubscriptLoad NameLoad Index Num attr Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore ListLoad Str Str Str Str Str Str Str Str Str Str Str Str Assign NameStore BinOpPow NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Assign SubscriptStore NameLoad Index NameLoad NameLoad AugAssignDiv NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Num Num Assign NameStore Call NameLoad BinOpMult Call AttributeLoad NameLoad attr BinOpDiv SubscriptLoad AttributeLoad NameLoad attr Index Num Num Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad Assign SubscriptStore NameLoad Slice Num SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpDiv SubscriptLoad AttributeLoad NameLoad attr Index Num Num Num Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword Num attr AugAssignDiv NameStore Call AttributeLoad NameLoad attr Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpDiv NameLoad BinOpPow Num Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Assign NameStore BinOpDiv BinOpSub NameLoad NameLoad BinOpSub NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Num Assign NameStore Num Assign NameStore Call NameLoad BinOpDiv NameLoad Num Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListLoad keyword AttributeLoad NameLoad attr While CompareLt BinOpSub BinOpAdd NameLoad NameLoad Num NameLoad body AugAssignAdd NameStore Num Assign NameStore SubscriptLoad NameLoad Slice NameLoad BinOpAdd NameLoad NameLoad Assign NameStore BinOpAdd NameLoad NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Slice Num NameLoad Assign NameStore BinOpDiv NameLoad Call NameLoad NameLoad Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad ExtSlice Slice Index Num If CompareEq NameLoad Num body Assign NameStore AttributeLoad NameLoad attr orelse Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad AttributeLoad NameLoad attr Assign NameStore NameLoad Assign NameStore ListComp BinOpDiv BinOpMult NameLoad NameLoad NameLoad comprehension NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num If NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr ExtSlice Slice Num Slice Assign NameStore BinOpDiv SubscriptLoad AttributeLoad NameLoad attr Index Num BinOpMult Num SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad BinOpDiv NameLoad Num Expr Call AttributeLoad NameLoad attr Call NameLoad BinOpDiv NameLoad Num BinOpMult Call NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice Num Assign NameStore BinOpDiv NameLoad Num Assign NameStore Call NameLoad Num NameLoad NameLoad Assign NameStore ListComp BinOpMod Str BinOpDiv Call NameLoad BinOpMult NameLoad NameLoad NameLoad comprehension NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpMult NameLoad NameLoad Assign NameStore Call NameLoad ListLoad Num ListLoad Num Num NameLoad Assign NameStore BinOpAdd Num BinOpDiv NameLoad Num Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListComp NameLoad comprehension NameStore NameLoad CompareGtE Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad BinOpMult NameLoad BinOpDiv NameLoad BinOpMult Num AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore ListLoad Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Assign NameStore Call NameLoad Call NameLoad BinOpDiv Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign NameStore BinOpMult Num Call AttributeLoad Call AttributeLoad NameLoad attr BinOpSub SubscriptLoad NameLoad ExtSlice Index NameLoad Slice Num Num SubscriptLoad NameLoad ExtSlice Index NameLoad Slice Num NameLoad attr Assign ListStore NameStore NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Index NameLoad Slice NameLoad Assign NameStore ListLoad For NameStore Call NameLoad BinOpSub Call NameLoad NameLoad Num body Expr Call AttributeLoad NameLoad attr BinOpSub SubscriptLoad NameLoad Index BinOpAdd NameLoad Num SubscriptLoad NameLoad Index NameLoad Assign ListStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr Num BinOpAdd NameLoad Num Assign NameStore BinOpDiv BinOpAdd SubscriptLoad NameLoad Slice Num Num SubscriptLoad NameLoad Slice Num NameLoad Num Assign NameStore BinOpDiv Call AttributeLoad NameLoad attr NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num AugAssignAdd NameStore NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Num Num BinOpAdd NameLoad Num Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Index NameLoad Slice Str For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index TupleLoad NameLoad NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr ListLoad Expr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr ListLoad If NameLoad body Expr Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpDiv Num BinOpMult NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore BinOpDiv SubscriptLoad NameLoad Index NameLoad Call AttributeLoad NameLoad attr If NameLoad body Assign NameStore SubscriptLoad NameLoad Index CompareLt NameLoad Num Assign NameStore SubscriptLoad NameLoad Index CompareLt NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr keyword NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpDiv NameLoad BinOpPow Num Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Assign NameStore BinOpDiv BinOpSub NameLoad NameLoad BinOpSub NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Num Assign NameStore Num Assign NameStore Call NameLoad BinOpDiv NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad keyword AttributeLoad NameLoad attr While CompareLt BinOpSub BinOpAdd NameLoad NameLoad Num NameLoad body AugAssignAdd NameStore Num Assign NameStore SubscriptLoad NameLoad Slice NameLoad BinOpAdd NameLoad NameLoad Assign NameStore BinOpAdd NameLoad NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Slice Num NameLoad Assign NameStore BinOpDiv NameLoad Call NameLoad NameLoad If CompareEq NameLoad Num body Assign NameStore BinOpPow NameLoad Num orelse Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Assign NameStore ListComp BinOpDiv BinOpMult BinOpAdd NameLoad Num NameLoad BinOpMult Num NameLoad comprehension NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore ListComp BinOpDiv BinOpMult NameLoad NameLoad NameLoad comprehension NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num If NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad Call AttributeLoad NameLoad attr ExtSlice Slice Num Slice Assign NameStore Call NameLoad BinOpDiv NameLoad Num Assign NameStore Call NameLoad Num BinOpAdd Call NameLoad NameLoad NameLoad NameLoad Assign NameStore ListComp Call NameLoad BinOpSub BinOpDiv NameLoad Num Call NameLoad BinOpDiv BinOpMult NameLoad NameLoad BinOpMult Num NameLoad comprehension NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpDiv NameLoad Num Assign NameStore Call NameLoad Num NameLoad NameLoad Assign NameStore ListComp BinOpMod Str BinOpDiv Call NameLoad BinOpMult NameLoad NameLoad NameLoad comprehension NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Return TupleLoad NameLoad NameLoad NameLoad decorator_list Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpDiv NameLoad BinOpPow Num Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Assign NameStore BinOpDiv BinOpSub NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Num Assign NameStore Num Assign NameStore BinOpDiv NameLoad Num Assign ListStore NameStore NameStore Call NameLoad NameLoad NameLoad Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore BinOpAdd BinOpAdd BinOpAdd NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListLoad keyword AttributeLoad NameLoad attr While CompareLt BinOpSub BinOpAdd NameLoad NameLoad Num NameLoad body AugAssignAdd NameStore Num Assign NameStore SubscriptLoad NameLoad Slice NameLoad BinOpAdd NameLoad NameLoad Assign NameStore BinOpAdd NameLoad NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Slice Num NameLoad Assign NameStore BinOpDiv NameLoad Call NameLoad NameLoad If CompareEq NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad Num Assign SubscriptStore NameLoad Index Num Call NameLoad NameLoad Assign SubscriptStore NameLoad Index Num Call NameLoad NameLoad Assign SubscriptStore NameLoad Index Num Call NameLoad NameLoad Assign ListStore SubscriptStore NameLoad Index Num SubscriptStore NameLoad Index Num Call NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index Num Call NameLoad NameLoad Assign SubscriptStore NameLoad Index Num Call NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index Num Call NameLoad NameLoad Num NameLoad Assign SubscriptStore NameLoad ExtSlice Slice NameLoad BinOpAdd NameLoad NameLoad Index Num Call AttributeLoad Call NameLoad NameLoad NameLoad NameLoad attr Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Slice BinOpAdd NameLoad NameLoad BinOpSub BinOpAdd BinOpAdd NameLoad NameLoad NameLoad Num NameLoad Assign SubscriptStore NameLoad Index BinOpSub BinOpAdd BinOpAdd NameLoad NameLoad NameLoad Num Call AttributeLoad NameLoad attr If CompareEq NameLoad Num body Assign NameStore NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad Call NameLoad BinOpDiv NameLoad NameLoad Assign NameStore Call NameLoad Call NameLoad BinOpDiv NameLoad NameLoad Assign NameStore ListLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Num Assign NameStore ListLoad For NameStore Call NameLoad BinOpMult NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr ListLoad For NameStore Call NameLoad NameLoad body Assign NameStore Num Assign NameStore Call NameLoad SubscriptLoad NameLoad Index NameLoad While CompareLt NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore BinOpAdd NameLoad NameLoad If CompareGt NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index NameLoad Slice NameLoad NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index BinOpAdd NameLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad AugAssignAdd NameStore NameLoad Return TupleLoad Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpDiv NameLoad BinOpPow Num Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Assign NameStore BinOpDiv BinOpSub NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore BinOpDiv Num Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore BinOpAdd NameLoad NameLoad Assign NameStore BinOpDiv NameLoad Num If CompareLt NameLoad Num body Assign NameStore Num Assign NameStore BinOpAdd NameLoad NameLoad Assign NameStore BinOpDiv NameLoad Num Assign ListStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Num Assign NameStore Num Assign NameStore BinOpAdd BinOpAdd NameLoad NameLoad NameLoad Assign NameStore ListLoad While CompareLt BinOpSub BinOpAdd NameLoad NameLoad Num NameLoad body AugAssignAdd NameStore Num Assign NameStore SubscriptLoad NameLoad Slice NameLoad BinOpAdd NameLoad NameLoad Assign NameStore BinOpAdd NameLoad NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Slice Num NameLoad Assign NameStore BinOpDiv NameLoad Call NameLoad NameLoad Assign NameStore Num Assign NameStore Num Assign SubscriptStore NameLoad Slice Num Num Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr ListLoad Assign NameStore ListLoad Assign NameStore TupleLoad Str Str Str Assign NameStore ListLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call NameLoad NameLoad For NameStore NameLoad body Assign ListStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body Assign ListStore NameStore NameStore Call NameLoad NameLoad NameLoad Call NameLoad BinOpMult NameLoad NameLoad Call NameLoad BinOpMult NameLoad NameLoad Call NameLoad BinOpMult NameLoad NameLoad Call NameLoad BinOpMult NameLoad NameLoad Assign ListStore NameStore NameStore Call NameLoad NameLoad NameLoad orelse Assign ListStore NameStore NameStore Call NameLoad NameLoad NameLoad Call NameLoad BinOpMult NameLoad NameLoad Call NameLoad BinOpMult NameLoad NameLoad Call NameLoad BinOpMult NameLoad NameLoad Call NameLoad BinOpMult NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Num If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareEq Call NameLoad NameLoad Num body Assign NameStore NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpDiv Call NameLoad Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpDiv BinOpSub NameLoad NameLoad NameLoad If CompareGt Call NameLoad NameLoad Num body Print Call AttributeLoad Str attr BinOpDiv Num Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore ListLoad Assign NameStore ListLoad Assign NameStore ListLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign ListStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad If CompareGt SubscriptLoad AttributeLoad NameLoad attr Index Num Num body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If CompareEq SubscriptLoad NameLoad Index Num Str body Expr Call AttributeLoad NameLoad attr SubscriptLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Index Num orelse Expr Call AttributeLoad NameLoad attr SubscriptLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Index Num Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr ListLoad Assign NameStore Call AttributeLoad NameLoad attr ListLoad Assign NameStore ListLoad Assign NameStore TupleLoad Str Str Str Assign NameStore ListLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call NameLoad NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign ListStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign ListStore NameStore NameStore Call NameLoad NameLoad NameLoad Call NameLoad BinOpMult NameLoad NameLoad Call NameLoad BinOpMult NameLoad NameLoad Call NameLoad BinOpMult NameLoad NameLoad Call NameLoad BinOpMult NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareEq Call NameLoad NameLoad Num body Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr TupleLoad SubscriptLoad AttributeLoad NameLoad attr Index Num orelse Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad BinOpMult NameLoad Call AttributeLoad NameLoad attr TupleLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Assign ListStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body Assign ListStore NameStore NameStore Call NameLoad NameLoad NameLoad Call NameLoad BinOpMult NameLoad NameLoad Call NameLoad BinOpMult NameLoad NameLoad Call NameLoad BinOpMult NameLoad NameLoad Call NameLoad BinOpMult NameLoad NameLoad orelse Assign ListStore NameStore NameStore Call NameLoad NameLoad NameLoad Call NameLoad BinOpMult NameLoad NameLoad Call NameLoad BinOpMult NameLoad NameLoad Call NameLoad BinOpMult NameLoad NameLoad Call NameLoad BinOpMult NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad If NameLoad body Print BinOpAdd BinOpAdd Str NameLoad Str If NameLoad body Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str AttributeLoad NameLoad attr keyword Str If NameLoad body Print BinOpAdd BinOpAdd Str NameLoad Str If NameLoad body Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str NameLoad If NameLoad body Print BinOpAdd BinOpAdd Str NameLoad Str If NameLoad body Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str AttributeLoad NameLoad attr keyword Str If NameLoad body Print BinOpAdd BinOpAdd Str NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Assign NameStore TupleLoad BinOpAdd BinOpAdd NameLoad AttributeLoad NameLoad attr Str Assign NameStore ListLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Assign NameStore NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list
N/A N/A sys N/A time N/A os N/A glob N/A numpy N/A cPickle N/A aifc N/A math numpy NaN Inf arange isscalar array scipy.fftpack rfft scipy.fftpack fft scipy.fftpack.realtransforms dct scipy.signal fftconvolve matplotlib.mlab find N/A matplotlib.pyplot plt scipy linalg la N/A audioTrainTest aT N/A audioBasicIO N/A utilities scipy.signal lfilter hamming N/A eps 1e-08 N/A  Time-domain audio features  stZCR N/A N/A frame N/A N/A N/A Computes zero crossing rate of frame N/A count N/A len frame N/A countZ N/A N/A N/A numpy sum N/A N/A numpy abs N/A N/A numpy diff N/A N/A numpy sign frame 2 N/A N/A N/A N/A numpy float64 countZ N/A N/A numpy float64 N/A count 1.0 N/A stEnergy N/A N/A frame N/A N/A N/A Computes signal energy of frame N/A N/A N/A N/A numpy sum N/A frame 2 N/A N/A numpy float64 N/A len frame N/A stEnergyEntropy N/A N/A frame numOfShortBlocks N/A 10 N/A N/A Computes entropy of energy N/A Eol N/A N/A numpy sum N/A frame 2 N/A L N/A len frame N/A subWinLength N/A int N/A N/A numpy floor N/A L numOfShortBlocks N/A N/A L N/A subWinLength numOfShortBlocks N/A N/A frame N/A frame N/A 0 N/A subWinLength numOfShortBlocks N/A subWindows N/A N/A N/A N/A frame reshape subWinLength numOfShortBlocks order F copy N/A s N/A N/A N/A numpy sum N/A subWindows 2 axis 0 N/A Eol eps N/A Entropy N/A N/A N/A numpy sum N/A s N/A N/A numpy log2 N/A s eps N/A Entropy N/A N/A  Frequency-domain audio features  stSpectralCentroidAndSpread N/A N/A X fs N/A N/A N/A Computes spectral centroid of frame (given abs(FFT)) N/A ind N/A N/A N/A numpy arange 1 N/A N/A len X 1 N/A fs N/A 2.0 N/A len X N/A Xt N/A N/A X copy N/A Xt N/A Xt N/A N/A Xt max N/A NUM N/A N/A numpy sum N/A ind Xt N/A DEN N/A N/A N/A numpy sum Xt eps N/A C N/A NUM DEN N/A S N/A N/A numpy sqrt N/A N/A N/A numpy sum N/A N/A N/A ind C 2 Xt DEN N/A C N/A C N/A fs 2.0 N/A S N/A S N/A fs 2.0 N/A N/A C S N/A stSpectralEntropy N/A N/A X numOfShortBlocks N/A 10 N/A N/A Computes the spectral entropy N/A L N/A len X N/A Eol N/A N/A numpy sum N/A X 2 N/A subWinLength N/A int N/A N/A numpy floor N/A L numOfShortBlocks N/A N/A L N/A subWinLength numOfShortBlocks N/A N/A X N/A X N/A 0 N/A subWinLength numOfShortBlocks N/A subWindows N/A N/A N/A N/A X reshape subWinLength numOfShortBlocks order F copy N/A s N/A N/A N/A numpy sum N/A subWindows 2 axis 0 N/A Eol eps N/A En N/A N/A N/A numpy sum N/A s N/A N/A numpy log2 N/A s eps N/A En N/A stSpectralFlux N/A N/A X Xprev N/A N/A N/A 
    Computes the spectral flux feature of the current frame
    ARGUMENTS:
        X:        the abs(fft) of the current frame
        Xpre:        the abs(fft) of the previous frame
     N/A sumX N/A N/A numpy sum N/A X eps N/A sumPrevX N/A N/A numpy sum N/A Xprev eps N/A F N/A N/A numpy sum N/A N/A N/A X sumX N/A Xprev sumPrevX 2 N/A F N/A stSpectralRollOff N/A N/A X c fs N/A N/A N/A Computes spectral roll-off N/A totalEnergy N/A N/A numpy sum N/A X 2 N/A fftLength N/A len X N/A Thres N/A c totalEnergy N/A CumSum N/A N/A N/A numpy cumsum N/A X 2 eps N/A N/A a N/A N/A numpy nonzero N/A CumSum Thres N/A N/A N/A len a 0 N/A N/A mC N/A N/A N/A numpy float64 N/A a N/A 0 N/A float fftLength N/A N/A mC 0.0 N/A mC N/A stHarmonic N/A N/A frame fs N/A N/A N/A 
    Computes harmonic ratio and pitch
     N/A M N/A N/A N/A numpy round N/A 0.016 fs 1 N/A R N/A N/A numpy correlate frame frame mode full N/A g N/A R N/A N/A N/A len frame 1 N/A R N/A R N/A N/A len frame -1 N/A N/A a N/A N/A numpy nonzero N/A N/A numpy diff N/A N/A numpy sign R N/A N/A N/A len a 0 N/A N/A m0 N/A N/A len R 1 N/A N/A m0 N/A a N/A 0 N/A N/A M N/A len R N/A N/A M N/A N/A len R 1 N/A Gamma N/A N/A numpy zeros M dtype N/A numpy float64 N/A CSum N/A N/A numpy cumsum N/A frame 2 N/A N/A Gamma N/A m0 M N/A N/A R N/A m0 M N/A N/A N/A numpy sqrt N/A g N/A CSum N/A M m0 -1 eps N/A ZCR N/A stZCR Gamma N/A N/A ZCR 0.15 N/A N/A HR 0.0 N/A f0 0.0 N/A N/A N/A N/A len Gamma 0 N/A N/A HR 1.0 N/A blag 0.0 N/A Gamma N/A N/A numpy zeros M dtype N/A numpy float64 N/A N/A HR N/A N/A numpy max Gamma N/A blag N/A N/A numpy argmax Gamma N/A f0 N/A fs N/A blag eps N/A N/A f0 5000 N/A N/A f0 0.0 N/A N/A HR 0.1 N/A N/A f0 0.0 N/A N/A HR f0 N/A mfccInitFilterBanks N/A N/A fs nfft N/A N/A N/A 
    Computes the triangular filterbank for MFCC computation (used in the stFeatureExtraction function before the stMFCC function call)
    This function is taken from the scikits.talkbox library (MIT Licence):
    https://pypi.python.org/pypi/scikits.talkbox
     N/A lowfreq 133.33 N/A linsc N/A 200 3.0 N/A logsc 1.0711703 N/A numLinFiltTotal 13 N/A numLogFilt 27 N/A N/A fs 8000 N/A N/A nlogfil 5 N/A nFiltTotal N/A numLinFiltTotal numLogFilt N/A freqs N/A N/A numpy zeros N/A nFiltTotal 2 N/A N/A freqs N/A numLinFiltTotal N/A lowfreq N/A N/A N/A numpy arange numLinFiltTotal linsc N/A N/A freqs N/A numLinFiltTotal N/A N/A freqs N/A N/A numLinFiltTotal 1 N/A logsc N/A N/A numpy arange 1 N/A numLogFilt 3 N/A heights N/A 2.0 N/A N/A freqs N/A 2 N/A freqs N/A 0 -2 N/A fbank N/A N/A numpy zeros N/A nFiltTotal nfft N/A nfreqs N/A N/A N/A N/A numpy arange nfft N/A 1.0 nfft fs N/A i N/A range nFiltTotal N/A N/A lowTrFreq N/A freqs N/A i N/A cenTrFreq N/A freqs N/A N/A i 1 N/A highTrFreq N/A freqs N/A N/A i 2 N/A lid N/A N/A numpy arange N/A N/A N/A numpy floor N/A N/A lowTrFreq nfft fs 1 N/A N/A N/A numpy floor N/A N/A cenTrFreq nfft fs 1 dtype N/A numpy int N/A lslope N/A N/A heights N/A i N/A cenTrFreq lowTrFreq N/A rid N/A N/A numpy arange N/A N/A N/A numpy floor N/A N/A cenTrFreq nfft fs 1 N/A N/A N/A numpy floor N/A N/A highTrFreq nfft fs 1 dtype N/A numpy int N/A rslope N/A N/A heights N/A i N/A highTrFreq cenTrFreq N/A N/A N/A fbank N/A i N/A lid N/A lslope N/A N/A nfreqs N/A lid lowTrFreq N/A N/A N/A fbank N/A i N/A rid N/A rslope N/A highTrFreq N/A nfreqs N/A rid N/A N/A fbank freqs N/A stMFCC N/A N/A X fbank nceps N/A N/A N/A 
    Computes the MFCCs of a frame, given the fft mag

    ARGUMENTS:
        X:        fft magnitude abs(FFT)
        fbank:    filter bank (see mfccInitFilterBanks)
    RETURN
        ceps:     MFCCs (13 element vector)

    Note:    MFCC calculation is, in general, taken from the scikits.talkbox library (MIT Licence),
    #    with a small number of modifications to make it more compact and suitable for the pyAudioAnalysis Lib
     N/A mspec N/A N/A numpy log10 N/A N/A N/A numpy dot X N/A fbank T eps N/A ceps N/A N/A dct mspec type 2 norm ortho axis -1 N/A nceps N/A ceps N/A stChromaFeaturesInit N/A N/A nfft fs N/A N/A N/A 
    This function initializes the chroma matrices used in the calculation of the chroma features
     N/A freqs N/A N/A numpy array N/A N/A N/A N/A f 1 fs N/A 2 nfft N/A f N/A range nfft N/A Cp 27.5 N/A nChroma N/A N/A N/A N/A numpy round N/A 12.0 N/A N/A numpy log2 N/A freqs Cp astype int N/A nFreqsPerChroma N/A N/A numpy zeros N/A N/A N/A nChroma shape N/A 0 N/A uChroma N/A N/A numpy unique nChroma N/A u uChroma N/A N/A idx N/A N/A numpy nonzero N/A nChroma u N/A N/A nFreqsPerChroma N/A idx N/A N/A idx N/A 0 shape N/A N/A nChroma nFreqsPerChroma N/A stChromaFeatures N/A N/A X fs nChroma nFreqsPerChroma N/A N/A N/A chromaNames N/A A A# B C C# D D# E F F# G G# N/A spec N/A X 2 N/A C N/A N/A numpy zeros N/A N/A N/A nChroma shape N/A 0 N/A N/A C N/A nChroma spec N/A C N/A nFreqsPerChroma N/A nChroma N/A finalC N/A N/A numpy zeros N/A 12 1 N/A newD N/A int N/A N/A N/A numpy ceil N/A N/A N/A C shape N/A 0 12.0 12 N/A C2 N/A N/A numpy zeros N/A newD N/A N/A C2 N/A 0 N/A N/A C shape N/A 0 C N/A C2 N/A N/A C2 reshape N/A N/A N/A C2 shape N/A 0 12 12 N/A finalC N/A N/A N/A numpy matrix N/A N/A numpy sum C2 axis 0 T N/A finalC N/A N/A spec sum N/A N/A chromaNames finalC N/A stChromagram N/A N/A signal Fs Win Step PLOT N/A False N/A N/A 
    Short-term FFT mag for spectogram estimation:
    Returns:
        a numpy array (nFFT x numOfShortTermWindows)
    ARGUMENTS:
        signal:      the input signal samples
        Fs:          the sampling freq (in Hz)
        Win:         the short-term window size (in samples)
        Step:        the short-term window step (in samples)
        PLOT:        flag, 1 if results are to be ploted
    RETURNS:
     N/A Win N/A int Win N/A Step N/A int Step N/A signal N/A N/A numpy double signal N/A signal N/A signal N/A 2.0 15 N/A DC N/A N/A signal mean N/A MAX N/A N/A N/A N/A numpy abs signal max N/A signal N/A N/A signal DC N/A MAX DC N/A N N/A len signal N/A curPos 0 N/A countFrames 0 N/A nfft N/A int N/A Win 2 N/A N/A nChroma nFreqsPerChroma N/A stChromaFeaturesInit nfft Fs N/A chromaGram N/A N/A numpy array N/A dtype N/A numpy float64 N/A N/A N/A N/A curPos Win 1 N N/A N/A countFrames 1 N/A x N/A signal N/A curPos N/A curPos Win N/A curPos N/A curPos Step N/A X N/A abs N/A fft x N/A X N/A X N/A 0 nfft N/A X N/A X N/A len X N/A N/A chromaNames C N/A stChromaFeatures X Fs nChroma nFreqsPerChroma N/A C N/A C N/A N/A N/A 0 N/A N/A countFrames 1 N/A N/A chromaGram N/A C T N/A N/A chromaGram N/A N/A numpy vstack N/A chromaGram N/A C T N/A FreqAxis chromaNames N/A TimeAxis N/A N/A N/A t Step Fs N/A t N/A range N/A N/A chromaGram shape N/A 0 N/A PLOT N/A N/A N/A fig ax N/A N/A plt subplots N/A chromaGramToPlot N/A N/A N/A chromaGram transpose N/A N/A -1 N/A N/A Ratio N/A N/A N/A chromaGramToPlot shape N/A 1 N/A 3 N/A N/A chromaGramToPlot shape N/A 0 N/A chromaGramToPlot N/A N/A numpy repeat chromaGramToPlot Ratio axis 0 N/A imgplot N/A N/A plt imshow chromaGramToPlot N/A Fstep N/A int N/A nfft 5.0 N/A N/A N/A ax set_yticks N/A range N/A Ratio 2 N/A N/A len FreqAxis Ratio Ratio N/A N/A N/A ax set_yticklabels N/A FreqAxis N/A -1 N/A TStep N/A countFrames 3 N/A TimeTicks N/A range 0 countFrames TStep N/A TimeTicksLabels N/A N/A %.2f N/A N/A float N/A t Step Fs N/A t TimeTicks N/A N/A N/A ax set_xticks TimeTicks N/A N/A N/A ax set_xticklabels TimeTicksLabels N/A N/A N/A ax set_xlabel time (secs) N/A N/A N/A imgplot set_cmap jet N/A N/A N/A plt colorbar N/A N/A N/A plt show N/A N/A chromaGram TimeAxis FreqAxis N/A phormants N/A N/A x Fs N/A N/A N/A N N/A len x N/A w N/A N/A numpy hamming N N/A x1 N/A x w N/A x1 N/A lfilter N/A 1 N/A 1.0 0.63 x1 N/A ncoeff N/A 2 N/A Fs 1000 N/A N/A A e k N/A lpc x1 ncoeff N/A rts N/A N/A numpy roots A N/A rts N/A r N/A r rts N/A N/A N/A numpy imag r 0 N/A angz N/A N/A numpy arctan2 N/A N/A numpy imag rts N/A N/A numpy real rts N/A frqs N/A sorted N/A angz N/A Fs N/A 2 N/A math pi N/A frqs N/A beatExtraction N/A N/A stFeatures winSize PLOT N/A False N/A N/A 
    This function extracts an estimate of the beat rate for a musical signal.
    ARGUMENTS:
     - stFeatures:     a numpy array (numOfFeatures x numOfShortTermWindows)
     - winSize:        window size in seconds
    RETURNS:
     - BPM:            estimates of beats per minute
     - Ratio:          a confidence measure
     N/A toWatch N/A 0 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 N/A maxBeatTime N/A int N/A round N/A 2.0 winSize N/A HistAll N/A N/A numpy zeros N/A maxBeatTime N/A N/A ii i N/A enumerate toWatch N/A N/A DifThres N/A 2.0 N/A N/A N/A N/A numpy abs N/A N/A stFeatures N/A N/A i N/A 0 -1 N/A stFeatures N/A N/A i N/A 1 None mean N/A N/A pos1 _ N/A N/A utilities peakdet N/A stFeatures N/A N/A i N/A DifThres N/A posDifs N/A N/A j N/A range N/A N/A len pos1 1 N/A N/A N/A N/A posDifs append N/A N/A pos1 N/A N/A j 1 N/A pos1 N/A j N/A N/A HistTimes HistEdges N/A N/A numpy histogram posDifs N/A N/A numpy arange 0.5 N/A maxBeatTime 1.5 N/A HistCenters N/A N/A N/A HistEdges N/A 0 -1 N/A HistEdges N/A 1 None 2.0 N/A HistTimes N/A N/A N/A HistTimes astype float N/A N/A stFeatures shape N/A 1 N/A HistAll HistTimes N/A PLOT N/A N/A N/A N/A plt subplot 9 2 N/A ii 1 N/A N/A N/A plt plot N/A stFeatures N/A N/A i N/A k N/A k pos1 N/A N/A N/A N/A plt plot k N/A stFeatures N/A N/A i k k* N/A f1 N/A N/A plt gca N/A N/A N/A N/A N/A N/A f1 axes get_xaxis set_ticks N/A N/A N/A N/A N/A N/A N/A f1 axes get_yaxis set_ticks N/A N/A PLOT N/A N/A N/A N/A plt show block False N/A N/A N/A plt figure N/A I N/A N/A numpy argmax HistAll N/A BPMs N/A 60 N/A HistCenters winSize N/A BPM N/A BPMs N/A I N/A Ratio N/A N/A HistAll N/A I N/A N/A HistAll sum N/A PLOT N/A N/A HistAll N/A HistAll N/A N/A BPMs 500 N/A BPMs N/A BPMs N/A N/A BPMs 500 N/A N/A N/A plt plot BPMs HistAll k N/A N/A N/A plt xlabel Beats per minute N/A N/A N/A plt ylabel Freq Count N/A N/A N/A plt show block True N/A N/A BPM Ratio N/A stSpectogram N/A N/A signal Fs Win Step PLOT N/A False N/A N/A 
    Short-term FFT mag for spectogram estimation:
    Returns:
        a numpy array (nFFT x numOfShortTermWindows)
    ARGUMENTS:
        signal:      the input signal samples
        Fs:          the sampling freq (in Hz)
        Win:         the short-term window size (in samples)
        Step:        the short-term window step (in samples)
        PLOT:        flag, 1 if results are to be ploted
    RETURNS:
     N/A Win N/A int Win N/A Step N/A int Step N/A signal N/A N/A numpy double signal N/A signal N/A signal N/A 2.0 15 N/A DC N/A N/A signal mean N/A MAX N/A N/A N/A N/A numpy abs signal max N/A signal N/A N/A signal DC N/A MAX DC N/A N N/A len signal N/A curPos 0 N/A countFrames 0 N/A nfft N/A int N/A Win 2 N/A specgram N/A N/A numpy array N/A dtype N/A numpy float64 N/A N/A N/A N/A curPos Win 1 N N/A N/A countFrames 1 N/A x N/A signal N/A curPos N/A curPos Win N/A curPos N/A curPos Step N/A X N/A abs N/A fft x N/A X N/A X N/A 0 nfft N/A X N/A X N/A len X N/A N/A countFrames 1 N/A N/A specgram N/A X 2 N/A N/A specgram N/A N/A numpy vstack N/A specgram X N/A FreqAxis N/A N/A N/A N/A f 1 Fs N/A 2 nfft N/A f N/A range N/A N/A specgram shape N/A 1 N/A TimeAxis N/A N/A N/A t Step Fs N/A t N/A range N/A N/A specgram shape N/A 0 N/A PLOT N/A N/A N/A fig ax N/A N/A plt subplots N/A imgplot N/A N/A plt imshow N/A N/A N/A specgram transpose N/A N/A -1 N/A N/A Fstep N/A int N/A nfft 5.0 N/A FreqTicks N/A range 0 N/A N/A int nfft Fstep Fstep N/A FreqTicksLabels N/A N/A str N/A N/A Fs 2 N/A int N/A N/A f Fs N/A 2 nfft N/A f FreqTicks N/A N/A N/A ax set_yticks FreqTicks N/A N/A N/A ax set_yticklabels FreqTicksLabels N/A TStep N/A countFrames 3 N/A TimeTicks N/A range 0 countFrames TStep N/A TimeTicksLabels N/A N/A %.2f N/A N/A float N/A t Step Fs N/A t TimeTicks N/A N/A N/A ax set_xticks TimeTicks N/A N/A N/A ax set_xticklabels TimeTicksLabels N/A N/A N/A ax set_xlabel time (secs) N/A N/A N/A ax set_ylabel freq (Hz) N/A N/A N/A imgplot set_cmap jet N/A N/A N/A plt colorbar N/A N/A N/A plt show N/A N/A specgram TimeAxis FreqAxis N/A N/A  Windowing and feature extraction  stFeatureExtraction N/A N/A signal Fs Win Step N/A N/A N/A 
    This function implements the shor-term windowing process. For each short-term window a set of features is extracted.
    This results to a sequence of feature vectors, stored in a numpy matrix.

    ARGUMENTS
        signal:       the input signal samples
        Fs:           the sampling freq (in Hz)
        Win:          the short-term window size (in samples)
        Step:         the short-term window step (in samples)
    RETURNS
        stFeatures:   a numpy array (numOfFeatures x numOfShortTermWindows)
     N/A Win N/A int Win N/A Step N/A int Step N/A signal N/A N/A numpy double signal N/A signal N/A signal N/A 2.0 15 N/A DC N/A N/A signal mean N/A MAX N/A N/A N/A N/A numpy abs signal max N/A signal N/A N/A signal DC MAX N/A N N/A len signal N/A curPos 0 N/A countFrames 0 N/A nFFT N/A Win 2 N/A N/A fbank freqs N/A mfccInitFilterBanks Fs nFFT N/A N/A nChroma nFreqsPerChroma N/A stChromaFeaturesInit nFFT Fs N/A numOfTimeSpectralFeatures 8 N/A numOfHarmonicFeatures 0 N/A nceps 13 N/A numOfChromaFeatures 13 N/A totalNumOfFeatures N/A N/A N/A numOfTimeSpectralFeatures nceps numOfHarmonicFeatures numOfChromaFeatures N/A stFeatures N/A N/A numpy array N/A dtype N/A numpy float64 N/A N/A N/A N/A curPos Win 1 N N/A N/A countFrames 1 N/A x N/A signal N/A curPos N/A curPos Win N/A curPos N/A curPos Step N/A X N/A abs N/A fft x N/A X N/A X N/A 0 nFFT N/A X N/A X N/A len X N/A N/A countFrames 1 N/A N/A Xprev N/A N/A X copy N/A curFV N/A N/A numpy zeros N/A totalNumOfFeatures 1 N/A N/A curFV N/A 0 N/A stZCR x N/A N/A curFV N/A 1 N/A stEnergy x N/A N/A curFV N/A 2 N/A stEnergyEntropy x N/A N/A N/A curFV N/A 3 N/A curFV N/A 4 N/A stSpectralCentroidAndSpread X Fs N/A N/A curFV N/A 5 N/A stSpectralEntropy X N/A N/A curFV N/A 6 N/A stSpectralFlux X Xprev N/A N/A curFV N/A 7 N/A stSpectralRollOff X 0.9 Fs N/A N/A curFV N/A N/A numOfTimeSpectralFeatures N/A numOfTimeSpectralFeatures nceps N/A 0 N/A N/A N/A stMFCC X fbank nceps copy N/A N/A chromaNames chromaF N/A stChromaFeatures X Fs nChroma nFreqsPerChroma N/A N/A curFV N/A N/A numOfTimeSpectralFeatures nceps N/A N/A N/A numOfTimeSpectralFeatures nceps numOfChromaFeatures 1 chromaF N/A N/A curFV N/A N/A N/A N/A numOfTimeSpectralFeatures nceps numOfChromaFeatures 1 N/A N/A chromaF std N/A N/A countFrames 1 N/A N/A stFeatures curFV N/A N/A stFeatures N/A N/A numpy concatenate N/A stFeatures curFV 1 N/A Xprev N/A N/A X copy N/A N/A N/A numpy array stFeatures N/A mtFeatureExtraction N/A N/A signal Fs mtWin mtStep stWin stStep N/A N/A N/A 
    Mid-term feature extraction
     N/A mtWinRatio N/A int N/A round N/A mtWin stStep N/A mtStepRatio N/A int N/A round N/A mtStep stStep N/A mtFeatures N/A N/A stFeatures N/A stFeatureExtraction signal Fs stWin stStep N/A numOfFeatures N/A len stFeatures N/A numOfStatistics 2 N/A mtFeatures N/A N/A i N/A range N/A numOfStatistics numOfFeatures N/A N/A N/A N/A mtFeatures append N/A N/A i N/A range numOfFeatures N/A N/A curPos 0 N/A N N/A len N/A stFeatures N/A i N/A N/A curPos N N/A N/A N1 curPos N/A N2 N/A curPos mtWinRatio N/A N/A N2 N N/A N/A N2 N N/A curStFeatures N/A N/A stFeatures N/A i N/A N1 N2 N/A N/A N/A N/A mtFeatures N/A i append N/A N/A numpy mean curStFeatures N/A N/A N/A N/A mtFeatures N/A N/A i numOfFeatures append N/A N/A numpy std curStFeatures N/A curPos mtStepRatio N/A N/A N/A N/A numpy array mtFeatures stFeatures N/A stFeatureSpeed N/A N/A signal Fs Win Step N/A N/A N/A signal N/A N/A numpy double signal N/A signal N/A signal N/A 2.0 15 N/A DC N/A N/A signal mean N/A MAX N/A N/A N/A N/A numpy abs signal max N/A signal N/A N/A signal DC MAX N/A N N/A len signal N/A curPos 0 N/A countFrames 0 N/A lowfreq 133.33 N/A linsc N/A 200 3.0 N/A logsc 1.0711703 N/A nlinfil 13 N/A nlogfil 27 N/A nceps 13 N/A nfil N/A nlinfil nlogfil N/A nfft N/A Win 2 N/A N/A Fs 8000 N/A N/A nlogfil 5 N/A nfil N/A nlinfil nlogfil N/A nfft N/A Win 2 N/A N/A fbank freqs N/A mfccInitFilterBanks Fs nfft lowfreq linsc logsc nlinfil nlogfil N/A numOfTimeSpectralFeatures 8 N/A numOfHarmonicFeatures 1 N/A totalNumOfFeatures N/A N/A numOfTimeSpectralFeatures nceps numOfHarmonicFeatures N/A stFeatures N/A N/A N/A N/A N/A curPos Win 1 N N/A N/A countFrames 1 N/A x N/A signal N/A curPos N/A curPos Win N/A curPos N/A curPos Step N/A X N/A abs N/A fft x N/A X N/A X N/A 0 nfft N/A X N/A X N/A len X N/A Ex 0.0 N/A El 0.0 N/A N/A X N/A 0 4 0 N/A N/A N/A stFeatures append N/A stHarmonic x Fs N/A N/A N/A numpy array stFeatures N/A N/A  Feature Extraction Wrappers

 - The first two feature extraction wrappers are used to extract long-term averaged
   audio features for a list of WAV files stored in a given category.
   It is important to note that, one single feature is extracted per WAV file (not the whole sequence of feature vectors)

  dirWavFeatureExtraction N/A N/A dirName mtWin mtStep stWin stStep computeBEAT N/A False N/A N/A 
    This function extracts the mid-term features of the WAVE files of a particular folder.

    The resulting feature vector is extracted by long-term averaging the mid-term features.
    Therefore ONE FEATURE VECTOR is extracted for each WAV file.

    ARGUMENTS:
        - dirName:        the path of the WAVE directory
        - mtWin, mtStep:    mid-term window and step (in seconds)
        - stWin, stStep:    short-term window and step (in seconds)
     N/A allMtFeatures N/A N/A numpy array N/A N/A processingTimes N/A N/A types N/A *.wav *.aif *.aiff N/A wavFilesList N/A N/A files types N/A N/A N/A N/A wavFilesList extend N/A N/A glob glob N/A N/A N/A os path join dirName files N/A wavFilesList N/A sorted wavFilesList N/A wavFile wavFilesList N/A N/A N/A Fs x N/A N/A audioBasicIO readAudioFile wavFile N/A t1 N/A N/A time clock N/A x N/A N/A audioBasicIO stereo2mono x N/A computeBEAT N/A N/A N/A MidTermFeatures stFeatures N/A mtFeatureExtraction x Fs N/A round N/A mtWin Fs N/A round N/A mtStep Fs N/A round N/A Fs stWin N/A round N/A Fs stStep N/A N/A beat beatConf N/A beatExtraction stFeatures stStep N/A N/A N/A MidTermFeatures _ N/A mtFeatureExtraction x Fs N/A round N/A mtWin Fs N/A round N/A mtStep Fs N/A round N/A Fs stWin N/A round N/A Fs stStep N/A MidTermFeatures N/A N/A numpy transpose MidTermFeatures N/A MidTermFeatures N/A N/A MidTermFeatures mean axis 0 N/A computeBEAT N/A N/A MidTermFeatures N/A N/A numpy append MidTermFeatures beat N/A MidTermFeatures N/A N/A numpy append MidTermFeatures beatConf N/A N/A N/A len allMtFeatures 0 N/A N/A allMtFeatures MidTermFeatures N/A N/A allMtFeatures N/A N/A numpy vstack N/A allMtFeatures MidTermFeatures N/A t2 N/A N/A time clock N/A duration N/A N/A float N/A len x Fs N/A N/A N/A processingTimes append N/A N/A t2 t1 duration N/A N/A N/A len processingTimes 0 N/A N/A N/A N/A Feature extraction complexity ratio: {0:.1f} x realtime format N/A 1.0 N/A N/A numpy mean N/A N/A numpy array processingTimes N/A N/A allMtFeatures wavFilesList N/A dirsWavFeatureExtraction N/A N/A dirNames mtWin mtStep stWin stStep computeBEAT N/A False N/A N/A 
    Same as dirWavFeatureExtraction, but instead of a single dir it takes a list of paths as input and returns a list of feature matrices.
    EXAMPLE:
    [features, classNames] =
           a.dirsWavFeatureExtraction(['audioData/classSegmentsRec/noise','audioData/classSegmentsRec/speech',
                                       'audioData/classSegmentsRec/brush-teeth','audioData/classSegmentsRec/shower'], 1, 1, 0.02, 0.02);

    It can be used during the training process of a classification model ,
    in order to get feature matrices from various audio classes (each stored in a seperate path)
     N/A features N/A N/A classNames N/A N/A fileNames N/A N/A N/A i d N/A enumerate dirNames N/A N/A N/A f fn N/A dirWavFeatureExtraction d mtWin mtStep stWin stStep computeBEAT computeBEAT N/A N/A N/A N/A f shape N/A 0 0 N/A N/A N/A N/A features append f N/A N/A N/A fileNames append fn N/A N/A N/A d N/A -1 / N/A N/A N/A N/A classNames append N/A N/A N/A d split N/A os sep N/A -2 N/A N/A N/A N/A classNames append N/A N/A N/A d split N/A os sep N/A -1 N/A N/A features classNames fileNames N/A dirWavFeatureExtractionNoAveraging N/A N/A dirName mtWin mtStep stWin stStep N/A N/A N/A 
    This function extracts the mid-term features of the WAVE files of a particular folder without averaging each file.

    ARGUMENTS:
        - dirName:          the path of the WAVE directory
        - mtWin, mtStep:    mid-term window and step (in seconds)
        - stWin, stStep:    short-term window and step (in seconds)
    RETURNS:
        - X:                A feature matrix
        - Y:                A matrix of file labels
        - filenames:
     N/A allMtFeatures N/A N/A numpy array N/A N/A signalIndices N/A N/A numpy array N/A N/A processingTimes N/A N/A types N/A *.wav *.aif *.aiff N/A wavFilesList N/A N/A files types N/A N/A N/A N/A wavFilesList extend N/A N/A glob glob N/A N/A N/A os path join dirName files N/A wavFilesList N/A sorted wavFilesList N/A N/A i wavFile N/A enumerate wavFilesList N/A N/A N/A Fs x N/A N/A audioBasicIO readAudioFile wavFile N/A x N/A N/A audioBasicIO stereo2mono x N/A N/A MidTermFeatures _ N/A mtFeatureExtraction x Fs N/A round N/A mtWin Fs N/A round N/A mtStep Fs N/A round N/A Fs stWin N/A round N/A Fs stStep N/A MidTermFeatures N/A N/A numpy transpose MidTermFeatures N/A N/A N/A len allMtFeatures 0 N/A N/A allMtFeatures MidTermFeatures N/A signalIndices N/A N/A numpy zeros N/A N/A N/A MidTermFeatures shape N/A 0 N/A N/A allMtFeatures N/A N/A numpy vstack N/A allMtFeatures MidTermFeatures N/A signalIndices N/A N/A numpy append signalIndices N/A i N/A N/A numpy ones N/A N/A N/A MidTermFeatures shape N/A 0 N/A N/A allMtFeatures signalIndices wavFilesList N/A mtFeatureExtractionToFile N/A N/A fileName midTermSize midTermStep shortTermSize shortTermStep outPutFile storeStFeatures storeToCSV PLOT N/A False False False N/A N/A 
    This function is used as a wrapper to:
    a) read the content of a WAV file
    b) perform mid-term feature extraction on that signal
    c) write the mid-term feature sequences to a numpy file
     N/A N/A Fs x N/A N/A audioBasicIO readAudioFile fileName N/A x N/A N/A audioBasicIO stereo2mono x N/A storeStFeatures N/A N/A N/A mtF stF N/A mtFeatureExtraction x Fs N/A round N/A Fs midTermSize N/A round N/A Fs midTermStep N/A round N/A Fs shortTermSize N/A round N/A Fs shortTermStep N/A N/A N/A mtF _ N/A mtFeatureExtraction x Fs N/A round N/A Fs midTermSize N/A round N/A Fs midTermStep N/A round N/A Fs shortTermSize N/A round N/A Fs shortTermStep N/A N/A N/A numpy save outPutFile mtF N/A PLOT N/A N/A N/A N/A Mid-term numpy file:  outPutFile .npy saved N/A storeToCSV N/A N/A N/A N/A numpy savetxt N/A outPutFile .csv N/A mtF T delimiter , N/A PLOT N/A N/A N/A N/A Mid-term CSV file:  outPutFile .csv saved N/A storeStFeatures N/A N/A N/A N/A numpy save N/A outPutFile _st stF N/A PLOT N/A N/A N/A N/A Short-term numpy file:  outPutFile _st.npy saved N/A storeToCSV N/A N/A N/A N/A numpy savetxt N/A outPutFile _st.csv N/A stF T delimiter , N/A PLOT N/A N/A N/A N/A Short-term CSV file:  outPutFile _st.csv saved N/A mtFeatureExtractionToFileDir N/A N/A dirName midTermSize midTermStep shortTermSize shortTermStep storeStFeatures storeToCSV PLOT N/A False False False N/A N/A types N/A N/A N/A dirName N/A os sep *.wav N/A filesToProcess N/A N/A files types N/A N/A N/A N/A filesToProcess extend N/A N/A glob glob files N/A f filesToProcess N/A N/A outPath f N/A N/A mtFeatureExtractionToFile f midTermSize midTermStep shortTermSize shortTermStep outPath storeStFeatures storeToCSV PLOT N/A