Skip to content

Commit

Permalink
add message in plot_fundus when loc_od_x has wrong sign
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Beyeler committed May 9, 2019
1 parent eee23ed commit a6ffdbc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pulse2percept/viz.py
@@ -1,6 +1,7 @@
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import patches
import logging
from . import implants
from . import utils
from . import retina
Expand Down Expand Up @@ -54,6 +55,11 @@ def plot_fundus(implant, stim=None, ax=None, loc_od=(15.5, 1.5), n_bundles=100,
# Make sure x-coord of optic disc has the correct sign for LE/RE:
if (implant.eye == 'RE' and loc_od[0] <= 0
or implant.eye == 'LE' and loc_od[0] > 0):
logstr = ("For eye==%s, expected opposite sign of x-coordinate of "
"the optic disc; changing %.3f to %.3f" % (implant.eye,
loc_od[0],
-loc_od[0]))
logging.getLogger(__name__).info(logstr)
loc_od = (-loc_od[0], loc_od[1])
if ax is None:
# No axes object given: create
Expand Down

0 comments on commit a6ffdbc

Please sign in to comment.