python-sofa icon indicating copy to clipboard operation
python-sofa copied to clipboard

Initialisation of "View" as the only varying Coordinate not possible

Open fietew opened this issue 4 years ago • 0 comments

In version 0.2.0, there seems to be a problem with initialising "View" as the only varying Coordinate:

Reproducing code example:

import sofa

HRIR = sofa.Database.create(
    'test.sofa',
    "MultiSpeakerBRIR", 
    dimensions={"M": 10, 
                "N": 1024, 
                "S": 128,
                "E": 3,
                "R": 2,
               }
)

HRIR.Listener.initialize(fixed=["Position", "Up"], variances=["View"])   # error
HRIR.Listener.initialize(fixed=["Position"], variances=["View", "Up"])  # works

Output:

Exception: failed to get Units of ListenerView, variable not initialized

I'm not sure, if this is intended, as there are cases where BRIR dataset only have the ListenerView as the varying variable. If yes, the error message could be explaining the user, that one cannot initialise View as the only varying coordinate.

fietew avatar Mar 13 '20 10:03 fietew