begin itemAdjustedCosine() in filter.py