# Path: nansat/utils.py
# def add_logger(logName='', logLevel=None):
#     """ Creates and returns logger with default formatting for Nansat
# 
#     Parameters
#     -----------
#     logName : string, optional
#         Name of the logger
# 
#     Returns
#     --------
#     logging.logger
# 
#     See also
#     --------
#     `<http://docs.python.org/howto/logging.html>`_
# 
#     """
#     if logLevel is not None:
#         os.environ['LOG_LEVEL'] = str(logLevel)
#     # create (or take already existing) logger
#     # with default logging level WARNING
#     logger = logging.getLogger(logName)
#     logger.setLevel(int(os.environ['LOG_LEVEL']))
# 
#     # if logger already exits, default stream handler has been already added
#     # otherwise create and add a new handler
#     if len(logger.handlers) == 0:
#         # create console handler and set level to debug
#         ch = logging.StreamHandler()
#         # create formatter
#         formatter = logging.Formatter('%(asctime)s|%(levelno)s|%(module)s|'
#                                       '%(funcName)s|%(message)s',
#                                       datefmt='%I:%M:%S')
#         # add formatter to ch
#         ch.setFormatter(formatter)
#         # add ch to logger
#         logger.addHandler(ch)
# 
#     logger.handlers[0].setLevel(int(os.environ['LOG_LEVEL']))
# 
#     return logger


import os
import numpy as np
        import matplotlib; matplotlib.use('Agg')
    import Image
    import ImageDraw
    import ImageFont
from math import floor, log10
    from matplotlib import cm
    from PIL import Image, ImageDraw, ImageFont
from nansat.utils import add_logger
    palette = None
    pilImg = None
    pilImgLegend = None

    extensionList = ['png', 'PNG', 'tif', 'TIF', 'bmp',
                     'BMP', 'jpg', 'JPG', 'jpeg', 'JPEG']

    _cmapName = 'jet'

    # instance attributes
    array = None
    def __init__(self, nparray, **kwargs):
        """ Set attributes

        See class Figure(object) for information about:

        Modifies
        --------

        Parameters
        ----------

        Advanced parameters
        --------------------

        """
        # make a copy of nparray (otherwise a new reference to the same data is
        # created and the original input data is destroyed at process())
        array = np.array(nparray)


# Path: nansat/utils.py
# def add_logger(logName='', logLevel=None):
#     """ Creates and returns logger with default formatting for Nansat
# 
#     Parameters
#     -----------
#     logName : string, optional
#         Name of the logger
# 
#     Returns
#     --------
#     logging.logger
# 
#     See also
#     --------
#     `<http://docs.python.org/howto/logging.html>`_
# 
#     """
#     if logLevel is not None:
#         os.environ['LOG_LEVEL'] = str(logLevel)
#     # create (or take already existing) logger
#     # with default logging level WARNING
#     logger = logging.getLogger(logName)
#     logger.setLevel(int(os.environ['LOG_LEVEL']))
# 
#     # if logger already exits, default stream handler has been already added
#     # otherwise create and add a new handler
#     if len(logger.handlers) == 0:
#         # create console handler and set level to debug
#         ch = logging.StreamHandler()
#         # create formatter
#         formatter = logging.Formatter('%(asctime)s|%(levelno)s|%(module)s|'
#                                       '%(funcName)s|%(message)s',
#                                       datefmt='%I:%M:%S')
#         # add formatter to ch
#         ch.setFormatter(formatter)
#         # add ch to logger
#         logger.addHandler(ch)
# 
#     logger.handlers[0].setLevel(int(os.environ['LOG_LEVEL']))
# 
#     return logger


# Path: nansat/figure.py
import os
import numpy as np
        import matplotlib; matplotlib.use('Agg')
    import Image
    import ImageDraw
    import ImageFont
from math import floor, log10
    from matplotlib import cm
    from PIL import Image, ImageDraw, ImageFont
from nansat.utils import add_logger

    palette = None
    pilImg = None
    pilImgLegend = None

    extensionList = ['png', 'PNG', 'tif', 'TIF', 'bmp',
                     'BMP', 'jpg', 'JPG', 'jpeg', 'JPEG']

    _cmapName = 'jet'

    # instance attributes
    array = None
    def __init__(self, nparray, **kwargs):
        """ Set attributes

        See class Figure(object) for information about:

        Modifies
        --------

        Parameters
        ----------

        Advanced parameters
        --------------------

        """
        # make a copy of nparray (otherwise a new reference to the same data is
        # created and the original input data is destroyed at process())
        array = np.array(nparray)


        self.logger = add_logger('Nansat')