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

article-fdesign notebooks not working for empymod v2 #191

Closed
question0825 opened this issue Jul 2, 2023 · 4 comments
Closed

article-fdesign notebooks not working for empymod v2 #191

question0825 opened this issue Jul 2, 2023 · 4 comments
Labels
question User questions

Comments

@question0825
Copy link

question0825 commented Jul 2, 2023

the error following below:

Traceback (most recent call last):
  File "/home/hgrjang/empymod/notebooks/gpr.py", line 33, in <module>
    gprDLF = epm.gpr(ht='fht', htarg=epm.fdesign.load_filter('wer2001'), **inp)
  File "/home/hgrjang/miniconda3/lib/python3.10/site-packages/empymod/model.py", line 1508, in gpr
    time, freq, ft, ftarg = check_time(freqtime, 0, ft, ftarg, verb)
  File "/home/hgrjang/miniconda3/lib/python3.10/site-packages/empymod/utils.py", line 1154, in check_time
    args.pop('dfreq', 0.002), float, 0, 'fft: dfreq', ())
TypeError: pop expected at most 1 argument, got 2

How can I fix the errors?

@prisae
Copy link
Member

prisae commented Jul 3, 2023

I suspect you use a newer version of empymod (>=v2.0) and an old example.

  • What version of empymod are you using?
  • Which example is this? (where do you have it from)?

@question0825
Copy link
Author

I suspect you use a newer version of empymod (>=v2.0) and an old example.

  • What version of empymod are you using?
  • Which example is this? (where do you have it from)?

using empymod v2.2.1
the examples was in https://github.com/emsig/article-fdesign

@prisae
Copy link
Member

prisae commented Jul 4, 2023

Yes, as expected. You probably talk about this example, right? https://github.com/emsig/article-fdesign/blob/master/notebooks/A-GPR-create-data.ipynb

At the end of each notebook, there is a table that shows with which version was used to run the notebook. In this case, empymod v1.8.1 was used:
Screenshot from 2023-07-04 10-44-47

The quick and dirty solution is installing empymod v1.8.1.

There were significant, non-backward compatible changes for empymod v2+. These changes are listed here: https://empymod.emsig.xyz/en/stable/manual/changelog.html#v2-0-0-numba

I quickly went through this example and put an updated version in the dev-branch, you can find it here: https://github.com/emsig/article-fdesign/blob/dev/notebooks/A-GPR-create-data.ipynb -- with this you should be able to run it.

Currently I lack the time to do more, but I hope this helps.

I also created an issue here to track it: emsig/article-fdesign#1

@prisae prisae added the question User questions label Jul 4, 2023
@prisae prisae changed the title not working with simul GPR Examples not working for empymod v2+ Jul 4, 2023
@prisae prisae changed the title Examples not working for empymod v2+ article-fdesign notebooks not working for empymod v2 Jul 4, 2023
@prisae
Copy link
Member

prisae commented Jul 4, 2023

I am closing this here, as it is tracked over in emsig/article-fdesign#1

@prisae prisae closed this as completed Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question User questions
Projects
None yet
Development

No branches or pull requests

2 participants