Move sofar-related pyfar functionality to sofar
Open
@f-brinkmann is already working on this.
Since Aug 21, 2026.
feature
- Dominant language
- Python
- Stars
- 34
- Forks
- 4
- Avg merge
- 11m
- Merged PRs (30d)
- 2
Description
In https://github.com/pyfar/pyfar/issues/958, we decided to
- move the functionality
pyfar.io.read_sofaandconvert_sofato sofar - implement possibly identical behavior to the classes
SofaandSofaStream - improve flexibility to return arbitrary coordinates
I would suggest to add methods as_audio_object and as_coordinates.
as_audio_object()
- will return values in
Sofa.Dataas a pyfarSignalorFrequencyDatadepnding on the data type of the Sofa object - In case of
SofaStreamit could have an addition parametersliceto determine which data is returned
as_coordinates(attribute)
- works as the above, with
attributedetermining which data of the Sofa object is returned as coordinates - also has the additional
sliceparameter forSofaStream
The only difference between Sofa and SofaStream methods is how the actual data is obtained. Everything else can be moved into shared private functions to avoid redundant code.
If we consider this to be some kind of I/O functionality, it might be more consistent to implement this as sofar.as_audio_object otherwise it could be Sofa.as_audio_object and SofaStream.as_audio_object.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.