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

Return values of nifgen_GetFIRFilterCoefficients seem to be incorrect #596

Closed
bhaswath opened this issue Nov 14, 2017 · 2 comments · Fixed by #891
Closed

Return values of nifgen_GetFIRFilterCoefficients seem to be incorrect #596

bhaswath opened this issue Nov 14, 2017 · 2 comments · Fixed by #891

Comments

@bhaswath
Copy link
Contributor

While writing the test given below, no matter what value was given to coeff_array, the value returned by session.get_fir_filter_coefficients() is always ([], 95). This is different from the behavior on LabVIEW and seems incorrect.

def test_fir_filter_coefficients():
with nifgen.Session('', False, 'Simulate=1, DriverSetup=Model:5441;BoardType:PXI') as session:
coeff_array = [1, 0, -1]
session.configure_custom_fir_filter_coefficients(coeff_array)
session.commit()
array, size = session.get_fir_filter_coefficients()
assert size == len(coeff_array)

@marcoskirsch
Copy link
Member

I'm surprised you aren't getting a driver error. On 5441 FIR filter coefficients must be 95 elements and symmetrical. I vaguely remember that the OSP-related attributes aren't looked at unless you enable OSP. Try that.

@bhaswath
Copy link
Contributor Author

Even after enabling OSP, I do not get any error when the FIR Filter coefficients aren't 95 elements and symmetrical. (On LabVIEW as well)

Sorry for not updating this earlier.

@Fladolcetta Fladolcetta modified the milestones: nimi-python 0.5 release (NI-SCOPE), nimi-python 0.6 release (numpy support) Nov 17, 2017
@Fladolcetta Fladolcetta modified the milestones: nimi-python 0.6 release (numpy support), nimi-python 0.7 release (Fit & Finish) Nov 29, 2017
@Fladolcetta Fladolcetta modified the milestones: nimi-python 0.7 release (Fit & Finish), Post 0.9 Release Nov 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants