AllenInstitute / bmtk

Brain Modeling Toolkit
https://alleninstitute.github.io/bmtk/
BSD 3-Clause "New" or "Revised" License
275 stars 89 forks source link

Use inspect.signature in add_movie for GratingMovie #352

Closed HDictus closed 8 months ago

HDictus commented 8 months ago

I had been trying to run LGN simulations with static gratings at various phases, however it seems that varying phase with add_movie does not work, so I fixed it.

Previously, if 'phase' was added as a parameter to add_movie it would not be passed to GratingMovie.create_movie and would be ignored. By using the inspect module, we can ensure that any arguments to GratingMovie.init and GratingMovie.create_movie are automatically supported by FilterSimulator.add_movie.

We also created a test case, the setup of which can be reused to test a variety of functionality of FilterSimulator.