# simple test to verify js b-to-a matricies


from muse import *



# parameters
b_format = array([0.13, -0.17, 0.29, -0.37]) # Trond's DC

orientations = ['flu', 'fld', 'flr', 'fud', 'fbd', 'fbu', 'flru', 'flrd'];
weights = ['dec', 'can', 'uns', 'car'];

for orientation in orientations:
    print '--', orientation
    for weight in weights:
        a_format = b_to_a(b_format, orientation, weight)
        print '----', weight, a_format
        
        

# ----------------------------------------------------------
# outputs:  
               
#-- flu
#---- dec [-0.07192772  0.00807228  0.46807228 -0.19192772]
#---- can [-0.06  0.02  0.48 -0.18]
#---- uns [-0.03307612  0.04692388  0.50692388 -0.15307612]
#---- car [ 0.03421683  0.11421683  0.57421683 -0.08578317]
#-- fld
#---- dec [ 0.29807228 -0.36192772  0.09807228  0.17807228]
#---- can [ 0.31 -0.35  0.11  0.19]
#---- uns [ 0.33692388 -0.32307612  0.13692388  0.21692388]
#---- car [ 0.40421683 -0.25578317  0.20421683  0.28421683]
#-- flr
#---- dec [ 0.17313324 -0.23698869 -0.12355723  0.39970179]
#---- can [ 0.18506097 -0.22506097 -0.11162951  0.41162951]
#---- uns [ 0.21198485 -0.19813708 -0.08470563  0.43855339]
#---- car [ 0.2792778  -0.13084413 -0.01741268  0.50584634]
#-- fud
#---- dec [-0.29355723  0.22970179  0.34313324 -0.06698869]
#---- can [-0.28162951  0.24162951  0.35506097 -0.05506097]
#---- uns [-0.25470563  0.26855339  0.38198485 -0.02813708]
#---- car [-0.18741268  0.33584634  0.4492778   0.03915587]
#-- fbd
#---- dec [-0.09415204  0.40425079  0.15615615 -0.25396578]
#---- can [-0.08222432  0.41617851  0.16808387 -0.24203806]
#---- uns [-0.05530044  0.44310239  0.19500775 -0.21511418]
#---- car [ 0.01199251  0.51039534  0.26230071 -0.14782123]
#-- fbu
#---- dec [-0.09415204 -0.19995668  0.45825988  0.04813795]
#---- can [-0.08222432 -0.18802896  0.47018761  0.06006567]
#---- uns [-0.05530044 -0.16110508  0.49711149  0.08698956]
#---- car [ 0.01199251 -0.09381213  0.56440444  0.15428251]
#-- flru
#---- dec [ 0.0580066  -0.35211533  0.30610124  0.2002966 ]
#---- can [ 0.06993433 -0.34018761  0.31802896  0.21222432]
#---- uns [ 0.09685821 -0.31326373  0.34495284  0.2391482 ]
#---- car [ 0.16415116 -0.24597077  0.4122458   0.30644115]
#-- flrd
#---- dec [ 0.36011034 -0.05001159 -0.29810623  0.2002966 ]
#---- can [ 0.37203806 -0.03808387 -0.28617851  0.21222432]
#---- uns [ 0.39896194 -0.01115999 -0.25925463  0.2391482 ]
#---- car [ 0.46625489  0.05613296 -0.19196167  0.30644115]