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

Interface module for FFT methods #28

Open
pulkkins opened this issue Dec 13, 2018 · 3 comments
Open

Interface module for FFT methods #28

pulkkins opened this issue Dec 13, 2018 · 3 comments
Assignees

Comments

@pulkkins
Copy link
Member

The user cannot currently choose the FFT method. The available methods are searched in fixed order, and the same sequence of try-except clauses is repeated in several modules (cascade.decomposition, noise.fftgenerators, noise.utils and motion.darts). A more sensible way, that would also allow the user to choose the FFT method, would be implementing an interface module for different methods.

@pulkkins pulkkins self-assigned this Dec 13, 2018
@pulkkins pulkkins added the enhancement New feature or request label Dec 13, 2018
@aperezhortal
Copy link
Member

@pulkkins , since the fft method is used in several modules, another alternative to the interface is implementing something similar the matplotliob.use function used to set the plot backends.

The default fft method can be defined in the rcparams by default, and changed by the the user.
Then, fft method can be changed in runtime by calling a function pysteps.set_fft("fft_method").

To force all the modules to use the selected fft, the pysteps modules can make use of a pysteps.fft function that is updated by the set_fft method changing its reference to the corresponding method. When the user select a library that is not installed, an exception is raised.

In this way, the sources that use the fft only need to import it as **from pysteps import fft".

@pulkkins pulkkins added medium priority and removed enhancement New feature or request labels Dec 14, 2018
@dnerini
Copy link
Member

dnerini commented Dec 17, 2018

I agree with @aperezhortal, we could actually use the rcparms for many of the parameters in pysteps, thus avoiding having every time to pass a long list of arguments when calling a nowcasting method.

@pulkkins
Copy link
Member Author

pulkkins commented Dec 21, 2018

The FFT interface module has been implemented. I'll leave this issue open because using rcparams for choosing the FFT method still needs to be implemented.

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

No branches or pull requests

3 participants