pulse2percept.models.scoreboard

Classes

ScoreboardModel(**kwargs) Scoreboard model
class pulse2percept.models.scoreboard.ScoreboardModel(**kwargs)[source]

Scoreboard model

build(**build_params)[source]

Build the model

Every model must have a `build method, which is meant to perform all expensive one-time calculations. You must call build before calling predict_percept.

You can override build in your own model (for a good example, see the AxonMapModel). You will want to make sure that:

  • all build_params take effect,
  • the flag _is_built is set,
  • the method returns self.

One way to do this is to call the BaseModel’s build method from within your own model:

class MyModel(BaseModel):

def build(self, **build_params):
super(MyModel, self).build(self, **build_params) # Add your own code here…
Parameters:**build_params (Additional build parameters) – Additional build parameters passed as keyword arguments (e.g., model.build(engine='joblib')). Note that these must be listed in get_params; i.e., you can’t add any new parameters outside the constructor.
get_params()[source]

Get a dictionary of all model parameters (don’t override!)

get_tissue_coords(xdva, ydva)[source]

Converts dva to retinal coords

Parameters:ydva (xdva,) – x,y coordinates in dva
Returns:xret, yret (double or array-like) – Corresponding x,y coordinates in microns
predict_percept(implant, t=None)[source]

Predict a percept

Parameters:
  • implant (ProsthesisSystem) – Stimulus can be passed via stim.
  • fps (int, double) – Frames per second at which the percept should be rendered.
  • n_frames (int) – If None, will simulate for the duration of the stimulus plus one frame (rounding up).