Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MultiSpeakerBRIR::GetDataIR returning zeros #8

Open
andresperezEUT opened this issue May 31, 2017 · 3 comments
Open

MultiSpeakerBRIR::GetDataIR returning zeros #8

andresperezEUT opened this issue May 31, 2017 · 3 comments

Comments

@andresperezEUT
Copy link

Hi,
I'm just testing the new MultiSpeakerBRIR class, by using BRIR files provided by the TuBuRo database (http://sofacoustics.org/data/database/tuburo/).

I'm having an issue by getting the filter data. When using the MultiSpeakerBRIR::GetDataIR(std::vector< double > &values) const
method, the numbers seem to make sense. However, when using the
bool MultiSpeakerBRIR::GetDataIR(double *values, const unsigned long dim1, const unsigned long dim2, const unsigned long dim3, const unsigned long dim4) const
method, it looks like all retrieved numbers are zero.

Looking inside the implementation, this latter method is based on NetCDFFile::GetValues, in opposition to all other similar methods for retrieving data (which are based on sofa::File methods). But I don't know if that would be related to the issue.

@tcarpent
Copy link
Contributor

Hi,
Is the issue related to a specific file ?
I just tried with "BRIR_AllAbsorbers_OffCentre_Emitters1to64.sofa" (from the same database),
and both methods provide the exact same results.
Are you sure you passed the proper values for dim1, dim2, dim3, dim4 ?
(this should be :
dim1 = file.GetNumMeasurements();
dim2 = file.GetNumReceivers();
dim3 = file.GetNumEmitters();
dim4 = file.GetNumDataSamples();
)

@andresperezEUT
Copy link
Author

Hi Thibaut,
you are right, I just checked and both methods are retrieving the same values as expected.
It was my confusion, since I was for some reason wrongly assuming that the method taking dimensions as arguments allowed for specific values to be retrieved (for instance, measurement X from emitter Y, etc).
I just would like to ask you if such feature is planned, since IMHO it would be convenient when working with long IRs (as it is the case for BRIRs).
Thanks!

@tcarpent
Copy link
Contributor

Hi,
There is no plan to add such feature, but it's not impossible.
At first, the API was intended to be rather "low level", leaving this kind of "higher level" operations to the developer side. However, things can evolve... I'll think about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants