# Path: retina/screen/map/pointmap.py
# class PointMap(object):
#     """ Interface of mapping a point from one surface to another
#         (hence the 2 parameters)
#     """
#     __metaclass__ = ABCMeta
# 
#     @abstractmethod
#     def map(self, p1, p2):
#         """ map of point (p1, p2) from one surface to another """
#         return
# 
#     @abstractmethod
#     def invmap(self, p1, p2):
#         """ inverse map of point (p1, p2) from one surface to another """
#         return
# 
# class EyeToImagePointMap(PointMap):
#     """ Encapsulates 2 PointMap transformations to map a point
#         from the fly's eye to a screen and then to an image
#     """
#     __metaclass__ = ABCMeta
# 
#     @abstractmethod
#     def map_screen_to_image(self, p1, p2):
#         mapscreen = self._map_screen
# 
#         r1, r2 = mapscreen.map(p1, p2)
#         return (r1, r2)
# 
#     @abstractmethod
#     def invmap_screen_to_image(self, p1, p2):
#         mapscreen = self._map_screen
# 
#         r1, r2 = mapscreen.invmap(p1, p2)
#         return (r1, r2)
# 
#     @abstractmethod
#     def map_eye_to_screen(self, p1, p2):
#         mapeye = self._map_eye
# 
#         r1, r2 = mapeye.map(p1, p2)
#         return (r1, r2)
# 
#     @abstractmethod
#     def invmap_eye_to_screen(self, p1, p2):
#         mapeye = self._map_eye
# 
#         r1, r2 = mapeye.invmap(p1, p2)
#         return (r1, r2)
# 
#     # implementation of superclass abstract classes
#     def map(self, p1, p2):
#         mapeye = self._map_eye
#         mapscreen = self._map_screen
# 
#         t1, t2 = mapeye.map(p1, p2)
#         r1, r2 = mapscreen.map(t1, t2)
#         return (r1, r2)
# 
#     def invmap(self, p1, p2):
#         mapeye = self._map_eye
#         mapscreen = self._map_screen
# 
#         t1, t2 = mapscreen.invmap(p1, p2)
#         r1, r2 = mapeye.invmap(t1, t2)
#         return (r1, r2)


import numpy as np
from .pointmap import PointMap, EyeToImagePointMap
    def map(self, eyeelev, eyeazim):
        return super(EyeToSphereToImageMap, self).map(eyeelev, eyeazim)

    def invmap(self, x, y):
        return super(EyeToSphereToImageMap, self).invmap(x, y)

    def map_eye_to_screen(self, eyeelev, eyeazim):
        return super(EyeToSphereToImageMap, self) \
            .map_eye_to_screen(eyeelev, eyeazim)

    def invmap_eye_to_screen(self, screenelev, screenazim):
        return super(EyeToSphereToImageMap, self) \
            .invmap_eye_to_screen(screenelev, screenazim)

    def map_screen_to_image(self, screenelev, screenazim):
        return super(EyeToSphereToImageMap, self) \
            .map_screen_to_image(screenelev, screenazim)

    def invmap_screen_to_image(self, x, y):
        return super(EyeToSphereToImageMap, self).invmap_screen_to_image(x, y)

    # depends only on how images are mapped on screen which is an attribute of
    # the class
    @classmethod
    def get_intensities(cls, image, config, photorelev, photorazim,
                        nrings, nommatidia):
        return super(EyeToSphereToImageMap, cls).get_intensities(
            image, config, photorelev, photorazim, nrings, nommatidia)



# Path: retina/screen/map/pointmap.py
# class PointMap(object):
#     """ Interface of mapping a point from one surface to another
#         (hence the 2 parameters)
#     """
#     __metaclass__ = ABCMeta
# 
#     @abstractmethod
#     def map(self, p1, p2):
#         """ map of point (p1, p2) from one surface to another """
#         return
# 
#     @abstractmethod
#     def invmap(self, p1, p2):
#         """ inverse map of point (p1, p2) from one surface to another """
#         return
# 
# class EyeToImagePointMap(PointMap):
#     """ Encapsulates 2 PointMap transformations to map a point
#         from the fly's eye to a screen and then to an image
#     """
#     __metaclass__ = ABCMeta
# 
#     @abstractmethod
#     def map_screen_to_image(self, p1, p2):
#         mapscreen = self._map_screen
# 
#         r1, r2 = mapscreen.map(p1, p2)
#         return (r1, r2)
# 
#     @abstractmethod
#     def invmap_screen_to_image(self, p1, p2):
#         mapscreen = self._map_screen
# 
#         r1, r2 = mapscreen.invmap(p1, p2)
#         return (r1, r2)
# 
#     @abstractmethod
#     def map_eye_to_screen(self, p1, p2):
#         mapeye = self._map_eye
# 
#         r1, r2 = mapeye.map(p1, p2)
#         return (r1, r2)
# 
#     @abstractmethod
#     def invmap_eye_to_screen(self, p1, p2):
#         mapeye = self._map_eye
# 
#         r1, r2 = mapeye.invmap(p1, p2)
#         return (r1, r2)
# 
#     # implementation of superclass abstract classes
#     def map(self, p1, p2):
#         mapeye = self._map_eye
#         mapscreen = self._map_screen
# 
#         t1, t2 = mapeye.map(p1, p2)
#         r1, r2 = mapscreen.map(t1, t2)
#         return (r1, r2)
# 
#     def invmap(self, p1, p2):
#         mapeye = self._map_eye
#         mapscreen = self._map_screen
# 
#         t1, t2 = mapscreen.invmap(p1, p2)
#         r1, r2 = mapeye.invmap(t1, t2)
#         return (r1, r2)


# Path: retina/screen/map/mapimpl.py
import numpy as np
from .pointmap import PointMap, EyeToImagePointMap

    def map(self, eyeelev, eyeazim):
        return super(EyeToSphereToImageMap, self).map(eyeelev, eyeazim)

    def invmap(self, x, y):
        return super(EyeToSphereToImageMap, self).invmap(x, y)

    def map_eye_to_screen(self, eyeelev, eyeazim):
        return super(EyeToSphereToImageMap, self) \
            .map_eye_to_screen(eyeelev, eyeazim)

    def invmap_eye_to_screen(self, screenelev, screenazim):
        return super(EyeToSphereToImageMap, self) \
            .invmap_eye_to_screen(screenelev, screenazim)

    def map_screen_to_image(self, screenelev, screenazim):
        return super(EyeToSphereToImageMap, self) \
            .map_screen_to_image(screenelev, screenazim)

    def invmap_screen_to_image(self, x, y):
        return super(EyeToSphereToImageMap, self).invmap_screen_to_image(x, y)

    # depends only on how images are mapped on screen which is an attribute of
    # the class
    @classmethod
    def get_intensities(cls, image, config, photorelev, photorazim,
                        nrings, nommatidia):
        return super(EyeToSphereToImageMap, cls).get_intensities(
            image, config, photorelev, photorazim, nrings, nommatidia)



class EyeToCylinderToImageMap(EyeToImagePointMap):