python-sofa
python-sofa copied to clipboard
Initialisation of "View" as the only varying Coordinate not possible
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.