# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.7
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.





from sys import version_info
if version_info >= (2, 6, 0):
    def swig_import_helper():
        from os.path import dirname
        import imp
        fp = None
        try:
            fp, pathname, description = imp.find_module('_tools', [dirname(__file__)])
        except ImportError:
            import _tools
            return _tools
        if fp is not None:
            try:
                _mod = imp.load_module('_tools', fp, pathname, description)
            finally:
                fp.close()
            return _mod
    _tools = swig_import_helper()
    del swig_import_helper
else:
    import _tools
del version_info
try:
    _swig_property = property
except NameError:
    pass  # Python < 2.2 doesn't have 'property'.


def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
    if (name == "thisown"):
        return self.this.own(value)
    if (name == "this"):
        if type(value).__name__ == 'SwigPyObject':
            self.__dict__[name] = value
            return
    method = class_type.__swig_setmethods__.get(name, None)
    if method:
        return method(self, value)
    if (not static):
        if _newclass:
            object.__setattr__(self, name, value)
        else:
            self.__dict__[name] = value
    else:
        raise AttributeError("You cannot add attributes to %s" % self)


def _swig_setattr(self, class_type, name, value):
    return _swig_setattr_nondynamic(self, class_type, name, value, 0)


def _swig_getattr_nondynamic(self, class_type, name, static=1):
    if (name == "thisown"):
        return self.this.own()
    method = class_type.__swig_getmethods__.get(name, None)
    if method:
        return method(self)
    if (not static):
        return object.__getattr__(self, name)
    else:
        raise AttributeError(name)

def _swig_getattr(self, class_type, name):
    return _swig_getattr_nondynamic(self, class_type, name, 0)


def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)

try:
    _object = object
    _newclass = 1
except AttributeError:
    class _object:
        pass
    _newclass = 0


class SwigPyIterator(_object):
    """Proxy of C++ swig::SwigPyIterator class"""
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, SwigPyIterator, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, SwigPyIterator, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_destroy__ = _tools.delete_SwigPyIterator
    __del__ = lambda self: None

    def value(self):
        """value(SwigPyIterator self) -> PyObject *"""
        return _tools.SwigPyIterator_value(self)


    def incr(self, n=1):
        """
        incr(SwigPyIterator self, size_t n=1) -> SwigPyIterator
        incr(SwigPyIterator self) -> SwigPyIterator
        """
        return _tools.SwigPyIterator_incr(self, n)


    def decr(self, n=1):
        """
        decr(SwigPyIterator self, size_t n=1) -> SwigPyIterator
        decr(SwigPyIterator self) -> SwigPyIterator
        """
        return _tools.SwigPyIterator_decr(self, n)


    def distance(self, x):
        """distance(SwigPyIterator self, SwigPyIterator x) -> ptrdiff_t"""
        return _tools.SwigPyIterator_distance(self, x)


    def equal(self, x):
        """equal(SwigPyIterator self, SwigPyIterator x) -> bool"""
        return _tools.SwigPyIterator_equal(self, x)


    def copy(self):
        """copy(SwigPyIterator self) -> SwigPyIterator"""
        return _tools.SwigPyIterator_copy(self)


    def next(self):
        """next(SwigPyIterator self) -> PyObject *"""
        return _tools.SwigPyIterator_next(self)


    def __next__(self):
        """__next__(SwigPyIterator self) -> PyObject *"""
        return _tools.SwigPyIterator___next__(self)


    def previous(self):
        """previous(SwigPyIterator self) -> PyObject *"""
        return _tools.SwigPyIterator_previous(self)


    def advance(self, n):
        """advance(SwigPyIterator self, ptrdiff_t n) -> SwigPyIterator"""
        return _tools.SwigPyIterator_advance(self, n)


    def __eq__(self, x):
        """__eq__(SwigPyIterator self, SwigPyIterator x) -> bool"""
        return _tools.SwigPyIterator___eq__(self, x)


    def __ne__(self, x):
        """__ne__(SwigPyIterator self, SwigPyIterator x) -> bool"""
        return _tools.SwigPyIterator___ne__(self, x)


    def __iadd__(self, n):
        """__iadd__(SwigPyIterator self, ptrdiff_t n) -> SwigPyIterator"""
        return _tools.SwigPyIterator___iadd__(self, n)


    def __isub__(self, n):
        """__isub__(SwigPyIterator self, ptrdiff_t n) -> SwigPyIterator"""
        return _tools.SwigPyIterator___isub__(self, n)


    def __add__(self, n):
        """__add__(SwigPyIterator self, ptrdiff_t n) -> SwigPyIterator"""
        return _tools.SwigPyIterator___add__(self, n)


    def __sub__(self, *args):
        """
        __sub__(SwigPyIterator self, ptrdiff_t n) -> SwigPyIterator
        __sub__(SwigPyIterator self, SwigPyIterator x) -> ptrdiff_t
        """
        return _tools.SwigPyIterator___sub__(self, *args)

    def __iter__(self):
        return self
SwigPyIterator_swigregister = _tools.SwigPyIterator_swigregister
SwigPyIterator_swigregister(SwigPyIterator)

class vector_int(_object):
    """Proxy of C++ std::vector<(int)> class"""
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, vector_int, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, vector_int, name)
    __repr__ = _swig_repr

    def iterator(self):
        """iterator(vector_int self) -> SwigPyIterator"""
        return _tools.vector_int_iterator(self)

    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        """__nonzero__(vector_int self) -> bool"""
        return _tools.vector_int___nonzero__(self)


    def __bool__(self):
        """__bool__(vector_int self) -> bool"""
        return _tools.vector_int___bool__(self)


    def __len__(self):
        """__len__(vector_int self) -> std::vector< int >::size_type"""
        return _tools.vector_int___len__(self)


    def pop(self):
        """pop(vector_int self) -> std::vector< int >::value_type"""
        return _tools.vector_int_pop(self)


    def __getslice__(self, i, j):
        """__getslice__(vector_int self, std::vector< int >::difference_type i, std::vector< int >::difference_type j) -> vector_int"""
        return _tools.vector_int___getslice__(self, i, j)


    def __setslice__(self, *args):
        """
        __setslice__(vector_int self, std::vector< int >::difference_type i, std::vector< int >::difference_type j, vector_int v)
        __setslice__(vector_int self, std::vector< int >::difference_type i, std::vector< int >::difference_type j)
        """
        return _tools.vector_int___setslice__(self, *args)


    def __delslice__(self, i, j):
        """__delslice__(vector_int self, std::vector< int >::difference_type i, std::vector< int >::difference_type j)"""
        return _tools.vector_int___delslice__(self, i, j)


    def __delitem__(self, *args):
        """
        __delitem__(vector_int self, std::vector< int >::difference_type i)
        __delitem__(vector_int self, PySliceObject * slice)
        """
        return _tools.vector_int___delitem__(self, *args)


    def __getitem__(self, *args):
        """
        __getitem__(vector_int self, PySliceObject * slice) -> vector_int
        __getitem__(vector_int self, std::vector< int >::difference_type i) -> std::vector< int >::value_type const &
        """
        return _tools.vector_int___getitem__(self, *args)


    def __setitem__(self, *args):
        """
        __setitem__(vector_int self, PySliceObject * slice, vector_int v)
        __setitem__(vector_int self, PySliceObject * slice)
        __setitem__(vector_int self, std::vector< int >::difference_type i, std::vector< int >::value_type const & x)
        """
        return _tools.vector_int___setitem__(self, *args)


    def append(self, x):
        """append(vector_int self, std::vector< int >::value_type const & x)"""
        return _tools.vector_int_append(self, x)


    def empty(self):
        """empty(vector_int self) -> bool"""
        return _tools.vector_int_empty(self)


    def size(self):
        """size(vector_int self) -> std::vector< int >::size_type"""
        return _tools.vector_int_size(self)


    def clear(self):
        """clear(vector_int self)"""
        return _tools.vector_int_clear(self)


    def swap(self, v):
        """swap(vector_int self, vector_int v)"""
        return _tools.vector_int_swap(self, v)


    def get_allocator(self):
        """get_allocator(vector_int self) -> std::vector< int >::allocator_type"""
        return _tools.vector_int_get_allocator(self)


    def begin(self):
        """begin(vector_int self) -> std::vector< int >::iterator"""
        return _tools.vector_int_begin(self)


    def end(self):
        """end(vector_int self) -> std::vector< int >::iterator"""
        return _tools.vector_int_end(self)


    def rbegin(self):
        """rbegin(vector_int self) -> std::vector< int >::reverse_iterator"""
        return _tools.vector_int_rbegin(self)


    def rend(self):
        """rend(vector_int self) -> std::vector< int >::reverse_iterator"""
        return _tools.vector_int_rend(self)


    def pop_back(self):
        """pop_back(vector_int self)"""
        return _tools.vector_int_pop_back(self)


    def erase(self, *args):
        """
        erase(vector_int self, std::vector< int >::iterator pos) -> std::vector< int >::iterator
        erase(vector_int self, std::vector< int >::iterator first, std::vector< int >::iterator last) -> std::vector< int >::iterator
        """
        return _tools.vector_int_erase(self, *args)


    def __init__(self, *args):
        """
        __init__(std::vector<(int)> self) -> vector_int
        __init__(std::vector<(int)> self, vector_int arg2) -> vector_int
        __init__(std::vector<(int)> self, std::vector< int >::size_type size) -> vector_int
        __init__(std::vector<(int)> self, std::vector< int >::size_type size, std::vector< int >::value_type const & value) -> vector_int
        """
        this = _tools.new_vector_int(*args)
        try:
            self.this.append(this)
        except:
            self.this = this

    def push_back(self, x):
        """push_back(vector_int self, std::vector< int >::value_type const & x)"""
        return _tools.vector_int_push_back(self, x)


    def front(self):
        """front(vector_int self) -> std::vector< int >::value_type const &"""
        return _tools.vector_int_front(self)


    def back(self):
        """back(vector_int self) -> std::vector< int >::value_type const &"""
        return _tools.vector_int_back(self)


    def assign(self, n, x):
        """assign(vector_int self, std::vector< int >::size_type n, std::vector< int >::value_type const & x)"""
        return _tools.vector_int_assign(self, n, x)


    def resize(self, *args):
        """
        resize(vector_int self, std::vector< int >::size_type new_size)
        resize(vector_int self, std::vector< int >::size_type new_size, std::vector< int >::value_type const & x)
        """
        return _tools.vector_int_resize(self, *args)


    def insert(self, *args):
        """
        insert(vector_int self, std::vector< int >::iterator pos, std::vector< int >::value_type const & x) -> std::vector< int >::iterator
        insert(vector_int self, std::vector< int >::iterator pos, std::vector< int >::size_type n, std::vector< int >::value_type const & x)
        """
        return _tools.vector_int_insert(self, *args)


    def reserve(self, n):
        """reserve(vector_int self, std::vector< int >::size_type n)"""
        return _tools.vector_int_reserve(self, n)


    def capacity(self):
        """capacity(vector_int self) -> std::vector< int >::size_type"""
        return _tools.vector_int_capacity(self)

    __swig_destroy__ = _tools.delete_vector_int
    __del__ = lambda self: None
vector_int_swigregister = _tools.vector_int_swigregister
vector_int_swigregister(vector_int)

class vector_double(_object):
    """Proxy of C++ std::vector<(double)> class"""
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, vector_double, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, vector_double, name)
    __repr__ = _swig_repr

    def iterator(self):
        """iterator(vector_double self) -> SwigPyIterator"""
        return _tools.vector_double_iterator(self)

    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        """__nonzero__(vector_double self) -> bool"""
        return _tools.vector_double___nonzero__(self)


    def __bool__(self):
        """__bool__(vector_double self) -> bool"""
        return _tools.vector_double___bool__(self)


    def __len__(self):
        """__len__(vector_double self) -> std::vector< double >::size_type"""
        return _tools.vector_double___len__(self)


    def pop(self):
        """pop(vector_double self) -> std::vector< double >::value_type"""
        return _tools.vector_double_pop(self)


    def __getslice__(self, i, j):
        """__getslice__(vector_double self, std::vector< double >::difference_type i, std::vector< double >::difference_type j) -> vector_double"""
        return _tools.vector_double___getslice__(self, i, j)


    def __setslice__(self, *args):
        """
        __setslice__(vector_double self, std::vector< double >::difference_type i, std::vector< double >::difference_type j, vector_double v)
        __setslice__(vector_double self, std::vector< double >::difference_type i, std::vector< double >::difference_type j)
        """
        return _tools.vector_double___setslice__(self, *args)


    def __delslice__(self, i, j):
        """__delslice__(vector_double self, std::vector< double >::difference_type i, std::vector< double >::difference_type j)"""
        return _tools.vector_double___delslice__(self, i, j)


    def __delitem__(self, *args):
        """
        __delitem__(vector_double self, std::vector< double >::difference_type i)
        __delitem__(vector_double self, PySliceObject * slice)
        """
        return _tools.vector_double___delitem__(self, *args)


    def __getitem__(self, *args):
        """
        __getitem__(vector_double self, PySliceObject * slice) -> vector_double
        __getitem__(vector_double self, std::vector< double >::difference_type i) -> std::vector< double >::value_type const &
        """
        return _tools.vector_double___getitem__(self, *args)


    def __setitem__(self, *args):
        """
        __setitem__(vector_double self, PySliceObject * slice, vector_double v)
        __setitem__(vector_double self, PySliceObject * slice)
        __setitem__(vector_double self, std::vector< double >::difference_type i, std::vector< double >::value_type const & x)
        """
        return _tools.vector_double___setitem__(self, *args)


    def append(self, x):
        """append(vector_double self, std::vector< double >::value_type const & x)"""
        return _tools.vector_double_append(self, x)


    def empty(self):
        """empty(vector_double self) -> bool"""
        return _tools.vector_double_empty(self)


    def size(self):
        """size(vector_double self) -> std::vector< double >::size_type"""
        return _tools.vector_double_size(self)


    def clear(self):
        """clear(vector_double self)"""
        return _tools.vector_double_clear(self)


    def swap(self, v):
        """swap(vector_double self, vector_double v)"""
        return _tools.vector_double_swap(self, v)


    def get_allocator(self):
        """get_allocator(vector_double self) -> std::vector< double >::allocator_type"""
        return _tools.vector_double_get_allocator(self)


    def begin(self):
        """begin(vector_double self) -> std::vector< double >::iterator"""
        return _tools.vector_double_begin(self)


    def end(self):
        """end(vector_double self) -> std::vector< double >::iterator"""
        return _tools.vector_double_end(self)


    def rbegin(self):
        """rbegin(vector_double self) -> std::vector< double >::reverse_iterator"""
        return _tools.vector_double_rbegin(self)


    def rend(self):
        """rend(vector_double self) -> std::vector< double >::reverse_iterator"""
        return _tools.vector_double_rend(self)


    def pop_back(self):
        """pop_back(vector_double self)"""
        return _tools.vector_double_pop_back(self)


    def erase(self, *args):
        """
        erase(vector_double self, std::vector< double >::iterator pos) -> std::vector< double >::iterator
        erase(vector_double self, std::vector< double >::iterator first, std::vector< double >::iterator last) -> std::vector< double >::iterator
        """
        return _tools.vector_double_erase(self, *args)


    def __init__(self, *args):
        """
        __init__(std::vector<(double)> self) -> vector_double
        __init__(std::vector<(double)> self, vector_double arg2) -> vector_double
        __init__(std::vector<(double)> self, std::vector< double >::size_type size) -> vector_double
        __init__(std::vector<(double)> self, std::vector< double >::size_type size, std::vector< double >::value_type const & value) -> vector_double
        """
        this = _tools.new_vector_double(*args)
        try:
            self.this.append(this)
        except:
            self.this = this

    def push_back(self, x):
        """push_back(vector_double self, std::vector< double >::value_type const & x)"""
        return _tools.vector_double_push_back(self, x)


    def front(self):
        """front(vector_double self) -> std::vector< double >::value_type const &"""
        return _tools.vector_double_front(self)


    def back(self):
        """back(vector_double self) -> std::vector< double >::value_type const &"""
        return _tools.vector_double_back(self)


    def assign(self, n, x):
        """assign(vector_double self, std::vector< double >::size_type n, std::vector< double >::value_type const & x)"""
        return _tools.vector_double_assign(self, n, x)


    def resize(self, *args):
        """
        resize(vector_double self, std::vector< double >::size_type new_size)
        resize(vector_double self, std::vector< double >::size_type new_size, std::vector< double >::value_type const & x)
        """
        return _tools.vector_double_resize(self, *args)


    def insert(self, *args):
        """
        insert(vector_double self, std::vector< double >::iterator pos, std::vector< double >::value_type const & x) -> std::vector< double >::iterator
        insert(vector_double self, std::vector< double >::iterator pos, std::vector< double >::size_type n, std::vector< double >::value_type const & x)
        """
        return _tools.vector_double_insert(self, *args)


    def reserve(self, n):
        """reserve(vector_double self, std::vector< double >::size_type n)"""
        return _tools.vector_double_reserve(self, n)


    def capacity(self):
        """capacity(vector_double self) -> std::vector< double >::size_type"""
        return _tools.vector_double_capacity(self)

    __swig_destroy__ = _tools.delete_vector_double
    __del__ = lambda self: None
vector_double_swigregister = _tools.vector_double_swigregister
vector_double_swigregister(vector_double)

class vector_bool(_object):
    """Proxy of C++ std::vector<(bool)> class"""
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, vector_bool, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, vector_bool, name)
    __repr__ = _swig_repr

    def iterator(self):
        """iterator(vector_bool self) -> SwigPyIterator"""
        return _tools.vector_bool_iterator(self)

    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        """__nonzero__(vector_bool self) -> bool"""
        return _tools.vector_bool___nonzero__(self)


    def __bool__(self):
        """__bool__(vector_bool self) -> bool"""
        return _tools.vector_bool___bool__(self)


    def __len__(self):
        """__len__(vector_bool self) -> std::vector< bool >::size_type"""
        return _tools.vector_bool___len__(self)


    def pop(self):
        """pop(vector_bool self) -> std::vector< bool >::value_type"""
        return _tools.vector_bool_pop(self)


    def __getslice__(self, i, j):
        """__getslice__(vector_bool self, std::vector< bool >::difference_type i, std::vector< bool >::difference_type j) -> vector_bool"""
        return _tools.vector_bool___getslice__(self, i, j)


    def __setslice__(self, *args):
        """
        __setslice__(vector_bool self, std::vector< bool >::difference_type i, std::vector< bool >::difference_type j, vector_bool v)
        __setslice__(vector_bool self, std::vector< bool >::difference_type i, std::vector< bool >::difference_type j)
        """
        return _tools.vector_bool___setslice__(self, *args)


    def __delslice__(self, i, j):
        """__delslice__(vector_bool self, std::vector< bool >::difference_type i, std::vector< bool >::difference_type j)"""
        return _tools.vector_bool___delslice__(self, i, j)


    def __delitem__(self, *args):
        """
        __delitem__(vector_bool self, std::vector< bool >::difference_type i)
        __delitem__(vector_bool self, PySliceObject * slice)
        """
        return _tools.vector_bool___delitem__(self, *args)


    def __getitem__(self, *args):
        """
        __getitem__(vector_bool self, PySliceObject * slice) -> vector_bool
        __getitem__(vector_bool self, std::vector< bool >::difference_type i) -> std::vector< bool >::value_type
        """
        return _tools.vector_bool___getitem__(self, *args)


    def __setitem__(self, *args):
        """
        __setitem__(vector_bool self, PySliceObject * slice, vector_bool v)
        __setitem__(vector_bool self, PySliceObject * slice)
        __setitem__(vector_bool self, std::vector< bool >::difference_type i, std::vector< bool >::value_type x)
        """
        return _tools.vector_bool___setitem__(self, *args)


    def append(self, x):
        """append(vector_bool self, std::vector< bool >::value_type x)"""
        return _tools.vector_bool_append(self, x)


    def empty(self):
        """empty(vector_bool self) -> bool"""
        return _tools.vector_bool_empty(self)


    def size(self):
        """size(vector_bool self) -> std::vector< bool >::size_type"""
        return _tools.vector_bool_size(self)


    def clear(self):
        """clear(vector_bool self)"""
        return _tools.vector_bool_clear(self)


    def swap(self, v):
        """swap(vector_bool self, vector_bool v)"""
        return _tools.vector_bool_swap(self, v)


    def get_allocator(self):
        """get_allocator(vector_bool self) -> std::vector< bool >::allocator_type"""
        return _tools.vector_bool_get_allocator(self)


    def begin(self):
        """begin(vector_bool self) -> std::vector< bool >::iterator"""
        return _tools.vector_bool_begin(self)


    def end(self):
        """end(vector_bool self) -> std::vector< bool >::iterator"""
        return _tools.vector_bool_end(self)


    def rbegin(self):
        """rbegin(vector_bool self) -> std::vector< bool >::reverse_iterator"""
        return _tools.vector_bool_rbegin(self)


    def rend(self):
        """rend(vector_bool self) -> std::vector< bool >::reverse_iterator"""
        return _tools.vector_bool_rend(self)


    def pop_back(self):
        """pop_back(vector_bool self)"""
        return _tools.vector_bool_pop_back(self)


    def erase(self, *args):
        """
        erase(vector_bool self, std::vector< bool >::iterator pos) -> std::vector< bool >::iterator
        erase(vector_bool self, std::vector< bool >::iterator first, std::vector< bool >::iterator last) -> std::vector< bool >::iterator
        """
        return _tools.vector_bool_erase(self, *args)


    def __init__(self, *args):
        """
        __init__(std::vector<(bool)> self) -> vector_bool
        __init__(std::vector<(bool)> self, vector_bool arg2) -> vector_bool
        __init__(std::vector<(bool)> self, std::vector< bool >::size_type size) -> vector_bool
        __init__(std::vector<(bool)> self, std::vector< bool >::size_type size, std::vector< bool >::value_type value) -> vector_bool
        """
        this = _tools.new_vector_bool(*args)
        try:
            self.this.append(this)
        except:
            self.this = this

    def push_back(self, x):
        """push_back(vector_bool self, std::vector< bool >::value_type x)"""
        return _tools.vector_bool_push_back(self, x)


    def front(self):
        """front(vector_bool self) -> std::vector< bool >::value_type"""
        return _tools.vector_bool_front(self)


    def back(self):
        """back(vector_bool self) -> std::vector< bool >::value_type"""
        return _tools.vector_bool_back(self)


    def assign(self, n, x):
        """assign(vector_bool self, std::vector< bool >::size_type n, std::vector< bool >::value_type x)"""
        return _tools.vector_bool_assign(self, n, x)


    def resize(self, *args):
        """
        resize(vector_bool self, std::vector< bool >::size_type new_size)
        resize(vector_bool self, std::vector< bool >::size_type new_size, std::vector< bool >::value_type x)
        """
        return _tools.vector_bool_resize(self, *args)


    def insert(self, *args):
        """
        insert(vector_bool self, std::vector< bool >::iterator pos, std::vector< bool >::value_type x) -> std::vector< bool >::iterator
        insert(vector_bool self, std::vector< bool >::iterator pos, std::vector< bool >::size_type n, std::vector< bool >::value_type x)
        """
        return _tools.vector_bool_insert(self, *args)


    def reserve(self, n):
        """reserve(vector_bool self, std::vector< bool >::size_type n)"""
        return _tools.vector_bool_reserve(self, n)


    def capacity(self):
        """capacity(vector_bool self) -> std::vector< bool >::size_type"""
        return _tools.vector_bool_capacity(self)

    __swig_destroy__ = _tools.delete_vector_bool
    __del__ = lambda self: None
vector_bool_swigregister = _tools.vector_bool_swigregister
vector_bool_swigregister(vector_bool)

class vector_sring(_object):
    """Proxy of C++ std::vector<(std::string)> class"""
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, vector_sring, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, vector_sring, name)
    __repr__ = _swig_repr

    def iterator(self):
        """iterator(vector_sring self) -> SwigPyIterator"""
        return _tools.vector_sring_iterator(self)

    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        """__nonzero__(vector_sring self) -> bool"""
        return _tools.vector_sring___nonzero__(self)


    def __bool__(self):
        """__bool__(vector_sring self) -> bool"""
        return _tools.vector_sring___bool__(self)


    def __len__(self):
        """__len__(vector_sring self) -> std::vector< std::string >::size_type"""
        return _tools.vector_sring___len__(self)


    def pop(self):
        """pop(vector_sring self) -> std::vector< std::string >::value_type"""
        return _tools.vector_sring_pop(self)


    def __getslice__(self, i, j):
        """__getslice__(vector_sring self, std::vector< std::string >::difference_type i, std::vector< std::string >::difference_type j) -> vector_sring"""
        return _tools.vector_sring___getslice__(self, i, j)


    def __setslice__(self, *args):
        """
        __setslice__(vector_sring self, std::vector< std::string >::difference_type i, std::vector< std::string >::difference_type j, vector_sring v)
        __setslice__(vector_sring self, std::vector< std::string >::difference_type i, std::vector< std::string >::difference_type j)
        """
        return _tools.vector_sring___setslice__(self, *args)


    def __delslice__(self, i, j):
        """__delslice__(vector_sring self, std::vector< std::string >::difference_type i, std::vector< std::string >::difference_type j)"""
        return _tools.vector_sring___delslice__(self, i, j)


    def __delitem__(self, *args):
        """
        __delitem__(vector_sring self, std::vector< std::string >::difference_type i)
        __delitem__(vector_sring self, PySliceObject * slice)
        """
        return _tools.vector_sring___delitem__(self, *args)


    def __getitem__(self, *args):
        """
        __getitem__(vector_sring self, PySliceObject * slice) -> vector_sring
        __getitem__(vector_sring self, std::vector< std::string >::difference_type i) -> std::vector< std::string >::value_type const &
        """
        return _tools.vector_sring___getitem__(self, *args)


    def __setitem__(self, *args):
        """
        __setitem__(vector_sring self, PySliceObject * slice, vector_sring v)
        __setitem__(vector_sring self, PySliceObject * slice)
        __setitem__(vector_sring self, std::vector< std::string >::difference_type i, std::vector< std::string >::value_type const & x)
        """
        return _tools.vector_sring___setitem__(self, *args)


    def append(self, x):
        """append(vector_sring self, std::vector< std::string >::value_type const & x)"""
        return _tools.vector_sring_append(self, x)


    def empty(self):
        """empty(vector_sring self) -> bool"""
        return _tools.vector_sring_empty(self)


    def size(self):
        """size(vector_sring self) -> std::vector< std::string >::size_type"""
        return _tools.vector_sring_size(self)


    def clear(self):
        """clear(vector_sring self)"""
        return _tools.vector_sring_clear(self)


    def swap(self, v):
        """swap(vector_sring self, vector_sring v)"""
        return _tools.vector_sring_swap(self, v)


    def get_allocator(self):
        """get_allocator(vector_sring self) -> std::vector< std::string >::allocator_type"""
        return _tools.vector_sring_get_allocator(self)


    def begin(self):
        """begin(vector_sring self) -> std::vector< std::string >::iterator"""
        return _tools.vector_sring_begin(self)


    def end(self):
        """end(vector_sring self) -> std::vector< std::string >::iterator"""
        return _tools.vector_sring_end(self)


    def rbegin(self):
        """rbegin(vector_sring self) -> std::vector< std::string >::reverse_iterator"""
        return _tools.vector_sring_rbegin(self)


    def rend(self):
        """rend(vector_sring self) -> std::vector< std::string >::reverse_iterator"""
        return _tools.vector_sring_rend(self)


    def pop_back(self):
        """pop_back(vector_sring self)"""
        return _tools.vector_sring_pop_back(self)


    def erase(self, *args):
        """
        erase(vector_sring self, std::vector< std::string >::iterator pos) -> std::vector< std::string >::iterator
        erase(vector_sring self, std::vector< std::string >::iterator first, std::vector< std::string >::iterator last) -> std::vector< std::string >::iterator
        """
        return _tools.vector_sring_erase(self, *args)


    def __init__(self, *args):
        """
        __init__(std::vector<(std::string)> self) -> vector_sring
        __init__(std::vector<(std::string)> self, vector_sring arg2) -> vector_sring
        __init__(std::vector<(std::string)> self, std::vector< std::string >::size_type size) -> vector_sring
        __init__(std::vector<(std::string)> self, std::vector< std::string >::size_type size, std::vector< std::string >::value_type const & value) -> vector_sring
        """
        this = _tools.new_vector_sring(*args)
        try:
            self.this.append(this)
        except:
            self.this = this

    def push_back(self, x):
        """push_back(vector_sring self, std::vector< std::string >::value_type const & x)"""
        return _tools.vector_sring_push_back(self, x)


    def front(self):
        """front(vector_sring self) -> std::vector< std::string >::value_type const &"""
        return _tools.vector_sring_front(self)


    def back(self):
        """back(vector_sring self) -> std::vector< std::string >::value_type const &"""
        return _tools.vector_sring_back(self)


    def assign(self, n, x):
        """assign(vector_sring self, std::vector< std::string >::size_type n, std::vector< std::string >::value_type const & x)"""
        return _tools.vector_sring_assign(self, n, x)


    def resize(self, *args):
        """
        resize(vector_sring self, std::vector< std::string >::size_type new_size)
        resize(vector_sring self, std::vector< std::string >::size_type new_size, std::vector< std::string >::value_type const & x)
        """
        return _tools.vector_sring_resize(self, *args)


    def insert(self, *args):
        """
        insert(vector_sring self, std::vector< std::string >::iterator pos, std::vector< std::string >::value_type const & x) -> std::vector< std::string >::iterator
        insert(vector_sring self, std::vector< std::string >::iterator pos, std::vector< std::string >::size_type n, std::vector< std::string >::value_type const & x)
        """
        return _tools.vector_sring_insert(self, *args)


    def reserve(self, n):
        """reserve(vector_sring self, std::vector< std::string >::size_type n)"""
        return _tools.vector_sring_reserve(self, n)


    def capacity(self):
        """capacity(vector_sring self) -> std::vector< std::string >::size_type"""
        return _tools.vector_sring_capacity(self)

    __swig_destroy__ = _tools.delete_vector_sring
    __del__ = lambda self: None
vector_sring_swigregister = _tools.vector_sring_swigregister
vector_sring_swigregister(vector_sring)

import gammalib.support
import gammalib.base
import gammalib.app
class ctool(gammalib.app.GApplication):
    """Proxy of C++ ctool class"""
    __swig_setmethods__ = {}
    for _s in [gammalib.app.GApplication]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ctool, name, value)
    __swig_getmethods__ = {}
    for _s in [gammalib.app.GApplication]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ctool, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_destroy__ = _tools.delete_ctool
    __del__ = lambda self: None

    def run(self):
        """run(ctool self)"""
        return _tools.ctool_run(self)


    def save(self):
        """save(ctool self)"""
        return _tools.ctool_save(self)


    def execute(self):
        """execute(ctool self)"""
        return _tools.ctool_execute(self)


    def _setup_observations(self, obs, response=True, list=True, cube=True):
        """
        _setup_observations(ctool self, GObservations & obs, bool const & response=True, bool const & list=True, bool const & cube=True)
        _setup_observations(ctool self, GObservations & obs, bool const & response=True, bool const & list=True)
        _setup_observations(ctool self, GObservations & obs, bool const & response=True)
        _setup_observations(ctool self, GObservations & obs)
        """
        return _tools.ctool__setup_observations(self, obs, response, list, cube)


    def _setup_models(self, *args):
        """
        _setup_models(ctool self, GObservations & obs, std::string const & name)
        _setup_models(ctool self, GObservations & obs)
        """
        return _tools.ctool__setup_models(self, *args)


    def _create_ebounds(self):
        """_create_ebounds(ctool self) -> GEbounds"""
        return _tools.ctool__create_ebounds(self)


    def _create_energies(self):
        """_create_energies(ctool self) -> GEnergies"""
        return _tools.ctool__create_energies(self)


    def _create_map(self, obs):
        """_create_map(ctool self, GObservations const & obs) -> GSkyMap"""
        return _tools.ctool__create_map(self, obs)


    def _create_cube(self, obs):
        """_create_cube(ctool self, GObservations const & obs) -> GCTAEventCube"""
        return _tools.ctool__create_cube(self, obs)


    def _create_cta_obs(self):
        """_create_cta_obs(ctool self) -> GCTAObservation"""
        return _tools.ctool__create_cta_obs(self)


    def _require_inobs(self, method):
        """_require_inobs(ctool self, std::string const & method)"""
        return _tools.ctool__require_inobs(self, method)


    def _require_inobs_nocube(self, method):
        """_require_inobs_nocube(ctool self, std::string const & method)"""
        return _tools.ctool__require_inobs_nocube(self, method)


    def _get_roi(self, *args):
        """
        _get_roi(ctool self, GCTAPointing const & pnt) -> GCTARoi
        _get_roi(ctool self) -> GCTARoi
        """
        return _tools.ctool__get_roi(self, *args)


    def _get_ebounds(self):
        """_get_ebounds(ctool self) -> GEbounds"""
        return _tools.ctool__get_ebounds(self)


    def _get_gti(self, ref):
        """_get_gti(ctool self, GTimeReference const & ref) -> GGti"""
        return _tools.ctool__get_gti(self, ref)


    def _get_pointing(self):
        """_get_pointing(ctool self) -> GCTAPointing"""
        return _tools.ctool__get_pointing(self)


    def _get_skydir(self):
        """_get_skydir(ctool self) -> GSkyDir"""
        return _tools.ctool__get_skydir(self)


    def _set_outfile_name(self, filename):
        """_set_outfile_name(ctool self, std::string const & filename) -> std::string"""
        return _tools.ctool__set_outfile_name(self, filename)


    def _is_stacked(self):
        """_is_stacked(ctool self) -> bool"""
        return _tools.ctool__is_stacked(self)


    def _is_onoff(self):
        """_is_onoff(ctool self) -> bool"""
        return _tools.ctool__is_onoff(self)


    def _set_response(self, obs):
        """_set_response(ctool self, GObservations & obs)"""
        return _tools.ctool__set_response(self, obs)


    def _set_edisp(self, obs, edisp):
        """_set_edisp(ctool self, GObservations & obs, bool const & edisp) -> vector_bool"""
        return _tools.ctool__set_edisp(self, obs, edisp)


    def _restore_edisp(self, obs, edisp):
        """_restore_edisp(ctool self, GObservations & obs, vector_bool edisp)"""
        return _tools.ctool__restore_edisp(self, obs, edisp)


    def _set_obs_response(self, obs):
        """_set_obs_response(ctool self, GCTAObservation * obs)"""
        return _tools.ctool__set_obs_response(self, obs)


    def _get_observations(self, get_response=True):
        """
        _get_observations(ctool self, bool const & get_response=True) -> GObservations
        _get_observations(ctool self) -> GObservations
        """
        return _tools.ctool__get_observations(self, get_response)


    def _get_mean_pointing(self, obs):
        """_get_mean_pointing(ctool self, GObservations const & obs) -> GSkyDir"""
        return _tools.ctool__get_mean_pointing(self, obs)


    def _get_current_rss(self):
        """_get_current_rss(ctool self) -> size_t"""
        return _tools.ctool__get_current_rss(self)


    def _get_obs_header(self, obs):
        """_get_obs_header(ctool self, GObservation const * obs) -> std::string"""
        return _tools.ctool__get_obs_header(self, obs)


    def _insert_energy_boundaries(self, energies, obs):
        """_insert_energy_boundaries(ctool self, GEnergies const & energies, GCTAObservation const & obs) -> GEnergies"""
        return _tools.ctool__insert_energy_boundaries(self, energies, obs)


    def _cube_layer_usage(self, cube_ebounds, list_ebounds):
        """_cube_layer_usage(ctool self, GEbounds const & cube_ebounds, GEbounds const & list_ebounds) -> vector_bool"""
        return _tools.ctool__cube_layer_usage(self, cube_ebounds, list_ebounds)


    def _get_gtiname(self, filename, evtname):
        """_get_gtiname(ctool self, std::string const & filename, std::string const & evtname) -> std::string"""
        return _tools.ctool__get_gtiname(self, filename, evtname)


    def _save_event_list(self, obs, infile, evtname, gtiname, outfile):
        """_save_event_list(ctool self, GCTAObservation const * obs, std::string const & infile, std::string const & evtname, std::string const & gtiname, std::string const & outfile)"""
        return _tools.ctool__save_event_list(self, obs, infile, evtname, gtiname, outfile)


    def _warn_too_few_energies(self, energies):
        """_warn_too_few_energies(ctool self, GEnergies const & energies) -> std::string"""
        return _tools.ctool__warn_too_few_energies(self, energies)


    def _warn_xml_suffix(self, filename):
        """_warn_xml_suffix(ctool self, GFilename const & filename) -> std::string"""
        return _tools.ctool__warn_xml_suffix(self, filename)


    def _log_parameters(self, chatter):
        """_log_parameters(ctool self, int const & chatter)"""
        return _tools.ctool__log_parameters(self, chatter)


    def _log_observations(self, *args):
        """
        _log_observations(ctool self, int const & chatter, GObservations const & obs, std::string const & what)
        _log_observations(ctool self, int const & chatter, GObservations const & obs)
        """
        return _tools.ctool__log_observations(self, *args)


    def _log_models(self, *args):
        """
        _log_models(ctool self, int const & chatter, GModels const & models, std::string const & what)
        _log_models(ctool self, int const & chatter, GModels const & models)
        """
        return _tools.ctool__log_models(self, *args)


    def _read_ahead(self, *args):
        """
        _read_ahead(ctool self) -> bool const
        _read_ahead(ctool self, bool const & flag)
        """
        return _tools.ctool__read_ahead(self, *args)


    def __getstate__(self):
        state = (gammalib.GApplication.__getstate__(self),)
        return state
    def __setstate__(self, state):
        gammalib.GApplication.__setstate__(self, state[0])

ctool_swigregister = _tools.ctool_swigregister
ctool_swigregister(ctool)

class cscript(ctool):
    """Proxy of C++ cscript class"""
    __swig_setmethods__ = {}
    for _s in [ctool]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, cscript, name, value)
    __swig_getmethods__ = {}
    for _s in [ctool]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, cscript, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        """
        __init__(cscript self, std::string const & name, std::string const & version) -> cscript
        __init__(cscript self, std::string const & name, std::string const & version, GApplicationPars const & pars) -> cscript
        __init__(cscript self, std::string const & name, std::string const & version, int ARGC) -> cscript
        __init__(cscript self, ctool app) -> cscript
        """
        this = _tools.new_cscript(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _tools.delete_cscript
    __del__ = lambda self: None

    def run(self):
        """run(cscript self)"""
        return _tools.cscript_run(self)


    def save(self):
        """save(cscript self)"""
        return _tools.cscript_save(self)


    def __getstate__(self):
        state = (gammalib.GApplication.__getstate__(self),)
        return state
    def __setstate__(self, state):
        gammalib.GApplication.__setstate__(self, state[0])

cscript_swigregister = _tools.cscript_swigregister
cscript_swigregister(cscript)



# Initialise observation container from constructor arguments. In case that
# an observation container is provided as argument, this container will be
# used to initialise the class. The function returns a tuple containing the
# observation container and the eventually reduced argument list.
def _set_input_obs(self, argv):
    if len(argv) > 0 and isinstance(argv[0],gammalib.GObservations):
        obs  = argv[0]
        argv = argv[1:]
    else:
        obs = gammalib.GObservations()
    return (obs, argv)
cscript._set_input_obs = _set_input_obs 

# Initialise application by calling the appropriate class constructor
def _init_cscript(self, name, version, argv):
    if len(argv) > 0:
        if len(argv) == 3 and argv[0] == name and argv[1] == version:
            cscript.__init__(self, name, version, argv[2])
        else:
            cscript.__init__(self, name, version, *argv)
    else:
        cscript.__init__(self, name, version)
# Set logger properties
    self._log.date(True)
cscript._init_cscript = _init_cscript

# This function either returns or assigns user parameters in form of a
# dictionary. The assignment function takes a dictionary as argument and
# the function then loops over all keys in that dictionary and assigns
# the value to the parameter. For example
#
# >>> tool.pardict({'ra': 83.63, 'dec': 22.01})
#
# is equivalent to
#
# >>> tool['ra'] = 83.63
# >>> tool['dec'] = 22.01
#
# and assigns the 'ra' and 'dec' parameters of the tool. The return function
# takes no argument and returns a dictionary with the parameter names as
# keys and the current values as values. No parameter querying is performed.
# For example
#
# >>> d = tool.pardict()
#
# puts all parameters in the dictionary d.
def _pardict(self, *args):
    if len(args) == 0:
        d = {}
        for par in self._pars():
            if par.type() == 'b':
                v     = gammalib.tolower(par.current_value())
                value = (v == "yes" or v == "y" or v == "true" or v == "t")
                d[par.name()] = value
            elif par.type() == 'i':
                d[par.name()] = int(par.current_value())
            elif par.type() == 'r':
                d[par.name()] = float(par.current_value())
            else:
                d[par.name()] = str(par.current_value())
        return d
    elif len(args) == 1:
        for key in args[0]:
            self[key] = args[0][key]
    else:
        raise TypeError('pardict() takes 0 or 1 arguments (%d given)' % len(args))
ctool.pardict   = _pardict
cscript.pardict = _pardict

# Execute the script
def _execute(self):
    self._read_ahead(True)
    self.run()
    self.save()
cscript.execute = _execute

class ctobservation(ctool):
    """Proxy of C++ ctobservation class"""
    __swig_setmethods__ = {}
    for _s in [ctool]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ctobservation, name, value)
    __swig_getmethods__ = {}
    for _s in [ctool]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ctobservation, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_destroy__ = _tools.delete_ctobservation
    __del__ = lambda self: None

    def run(self):
        """run(ctobservation self)"""
        return _tools.ctobservation_run(self)


    def save(self):
        """save(ctobservation self)"""
        return _tools.ctobservation_save(self)


    def obs(self, *args):
        """
        obs(ctobservation self, GObservations const & obs)
        obs(ctobservation self) -> GObservations const &
        """
        return _tools.ctobservation_obs(self, *args)


    def _first_unbinned_observation(self):
        """_first_unbinned_observation(ctobservation self) -> GCTAObservation *"""
        return _tools.ctobservation__first_unbinned_observation(self)


    def _next_unbinned_observation(self):
        """_next_unbinned_observation(ctobservation self) -> GCTAObservation *"""
        return _tools.ctobservation__next_unbinned_observation(self)


    def _read_ogip_keywords(self, hdu):
        """_read_ogip_keywords(ctobservation self, GFitsHDU * hdu)"""
        return _tools.ctobservation__read_ogip_keywords(self, hdu)


    def _write_ogip_keywords(self, hdu):
        """_write_ogip_keywords(ctobservation self, GFitsHDU * hdu)"""
        return _tools.ctobservation__write_ogip_keywords(self, hdu)


    def _set_obs_statistic(self, statistic):
        """_set_obs_statistic(ctobservation self, std::string const & statistic)"""
        return _tools.ctobservation__set_obs_statistic(self, statistic)


    def _set_obs_bounds(self):
        """_set_obs_bounds(ctobservation self)"""
        return _tools.ctobservation__set_obs_bounds(self)


    def _save_events_fits(self):
        """_save_events_fits(ctobservation self)"""
        return _tools.ctobservation__save_events_fits(self)


    def _save_events_xml(self):
        """_save_events_xml(ctobservation self)"""
        return _tools.ctobservation__save_events_xml(self)

ctobservation_swigregister = _tools.ctobservation_swigregister
ctobservation_swigregister(ctobservation)

class csobservation(ctobservation):
    """Proxy of C++ csobservation class"""
    __swig_setmethods__ = {}
    for _s in [ctobservation]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, csobservation, name, value)
    __swig_getmethods__ = {}
    for _s in [ctobservation]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, csobservation, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        """
        __init__(csobservation self, std::string const & name, std::string const & version) -> csobservation
        __init__(csobservation self, std::string const & name, std::string const & version, GApplicationPars const & pars) -> csobservation
        __init__(csobservation self, std::string const & name, std::string const & version, int ARGC) -> csobservation
        __init__(csobservation self, std::string const & name, std::string const & version, GObservations const & obs) -> csobservation
        __init__(csobservation self, csobservation app) -> csobservation
        """
        this = _tools.new_csobservation(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _tools.delete_csobservation
    __del__ = lambda self: None

    def run(self):
        """run(csobservation self)"""
        return _tools.csobservation_run(self)


    def save(self):
        """save(csobservation self)"""
        return _tools.csobservation_save(self)


    def __getstate__(self):
        state = (ctool.__getstate__(self), self.obs())
        return state
    def __setstate__(self, state):
        ctool.__setstate__(self, state[0])
        self.obs(state[1])

csobservation_swigregister = _tools.csobservation_swigregister
csobservation_swigregister(csobservation)



# Initialise application by calling the appropriate base class constructor.
# The function supports either an observation container, or an argument
# list or no argument as "argv" parameter. The function also writes the
# header in the log file and switches the date on for logging.
def _init_csobservation(self, name, version, argv):
    if len(argv) > 0 and isinstance(argv[0],gammalib.GObservations):
        csobservation.__init__(self, name, version, argv[0])
    elif len(argv) > 0:
        if len(argv) == 3 and argv[0] == name and argv[1] == version:
            csobservation.__init__(self, name, version, argv[2])
        else:
            csobservation.__init__(self, name, version, *argv)
    else:
        csobservation.__init__(self, name, version)
# Set logger properties
    self._log.date(True)
csobservation._init_csobservation = _init_csobservation

# Define an iterator over all unbinned observations
def _unbinned_observations(self):
    obs = self._first_unbinned_observation()
    while obs != None:
        yield obs
        obs = self._next_unbinned_observation()
ctool._unbinned_observations   = _unbinned_observations
cscript._unbinned_observations = _unbinned_observations

# Execute the script
def _execute(self):
    self._read_ahead(True)
    self.run()
    self.save()
csobservation.execute = _execute

class ctlikelihood(ctobservation):
    """Proxy of C++ ctlikelihood class"""
    __swig_setmethods__ = {}
    for _s in [ctobservation]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ctlikelihood, name, value)
    __swig_getmethods__ = {}
    for _s in [ctobservation]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ctlikelihood, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_destroy__ = _tools.delete_ctlikelihood
    __del__ = lambda self: None

    def run(self):
        """run(ctlikelihood self)"""
        return _tools.ctlikelihood_run(self)


    def save(self):
        """save(ctlikelihood self)"""
        return _tools.ctlikelihood_save(self)


    def opt(self):
        """opt(ctlikelihood self) -> GOptimizer const *"""
        return _tools.ctlikelihood_opt(self)


    def _evaluate(self, par, value):
        """_evaluate(ctlikelihood self, GModelPar & par, double const & value) -> double"""
        return _tools.ctlikelihood__evaluate(self, par, value)

ctlikelihood_swigregister = _tools.ctlikelihood_swigregister
ctlikelihood_swigregister(ctlikelihood)

class cslikelihood(ctlikelihood):
    """Proxy of C++ cslikelihood class"""
    __swig_setmethods__ = {}
    for _s in [ctlikelihood]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, cslikelihood, name, value)
    __swig_getmethods__ = {}
    for _s in [ctlikelihood]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, cslikelihood, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        """
        __init__(cslikelihood self, std::string const & name, std::string const & version) -> cslikelihood
        __init__(cslikelihood self, std::string const & name, std::string const & version, GApplicationPars const & pars) -> cslikelihood
        __init__(cslikelihood self, std::string const & name, std::string const & version, int ARGC) -> cslikelihood
        __init__(cslikelihood self, std::string const & name, std::string const & version, GObservations const & obs) -> cslikelihood
        __init__(cslikelihood self, cslikelihood app) -> cslikelihood
        """
        this = _tools.new_cslikelihood(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _tools.delete_cslikelihood
    __del__ = lambda self: None

    def run(self):
        """run(cslikelihood self)"""
        return _tools.cslikelihood_run(self)


    def save(self):
        """save(cslikelihood self)"""
        return _tools.cslikelihood_save(self)


    def __getstate__(self):
        state = (ctool.__getstate__(self), self.obs())
        return state
    def __setstate__(self, state):
        ctool.__setstate__(self, state[0])
        self.obs(state[1])

cslikelihood_swigregister = _tools.cslikelihood_swigregister
cslikelihood_swigregister(cslikelihood)



# Initialise application by calling the appropriate base class constructor.
# The function supports either an observation container, or an argument
# list or no argument as "argv" parameter. The function also writes the
# header in the log file and switches the date on for logging.
def _init_cslikelihood(self, name, version, argv):
    if len(argv) > 0 and isinstance(argv[0],gammalib.GObservations):
        cslikelihood.__init__(self, name, version, argv[0])
    elif len(argv) > 0:
        if len(argv) == 3 and argv[0] == name and argv[1] == version:
            cslikelihood.__init__(self, name, version, argv[2])
        else:
            cslikelihood.__init__(self, name, version, *argv)
    else:
        cslikelihood.__init__(self, name, version)
# Set logger properties
    self._log.date(True)
cslikelihood._init_cslikelihood = _init_cslikelihood

# Execute the script
def _execute(self):
    self._read_ahead(True)
    self.run()
    self.save()
cslikelihood.execute = _execute

class ctfindvar(ctobservation):
    """Proxy of C++ ctfindvar class"""
    __swig_setmethods__ = {}
    for _s in [ctobservation]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ctfindvar, name, value)
    __swig_getmethods__ = {}
    for _s in [ctobservation]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ctfindvar, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        """
        __init__(ctfindvar self) -> ctfindvar
        __init__(ctfindvar self, GObservations const & obs) -> ctfindvar
        __init__(ctfindvar self, int argc, char *[] argv) -> ctfindvar
        __init__(ctfindvar self, ctfindvar app) -> ctfindvar
        """
        this = _tools.new_ctfindvar(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _tools.delete_ctfindvar
    __del__ = lambda self: None

    def run(self):
        """run(ctfindvar self)"""
        return _tools.ctfindvar_run(self)


    def save(self):
        """save(ctfindvar self)"""
        return _tools.ctfindvar_save(self)


    def copy(self):
        """copy(ctfindvar self) -> ctfindvar"""
        return _tools.ctfindvar_copy(self)

ctfindvar_swigregister = _tools.ctfindvar_swigregister
ctfindvar_swigregister(ctfindvar)

class ctbin(ctobservation):
    """Proxy of C++ ctbin class"""
    __swig_setmethods__ = {}
    for _s in [ctobservation]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ctbin, name, value)
    __swig_getmethods__ = {}
    for _s in [ctobservation]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ctbin, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        """
        __init__(ctbin self) -> ctbin
        __init__(ctbin self, GObservations const & obs) -> ctbin
        __init__(ctbin self, int argc, char *[] argv) -> ctbin
        __init__(ctbin self, ctbin app) -> ctbin
        """
        this = _tools.new_ctbin(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _tools.delete_ctbin
    __del__ = lambda self: None

    def run(self):
        """run(ctbin self)"""
        return _tools.ctbin_run(self)


    def cubes(self):
        """cubes(ctbin self) -> int"""
        return _tools.ctbin_cubes(self)


    def cube(self, index=0):
        """
        cube(ctbin self, int const & index=0) -> GCTAEventCube const
        cube(ctbin self) -> GCTAEventCube const &
        """
        return _tools.ctbin_cube(self, index)


    def save(self):
        """save(ctbin self)"""
        return _tools.ctbin_save(self)


    def publish(self, *args):
        """
        publish(ctbin self, std::string const & name)
        publish(ctbin self)
        """
        return _tools.ctbin_publish(self, *args)


    def copy(self):
        """copy(ctbin self) -> ctbin"""
        return _tools.ctbin_copy(self)

ctbin_swigregister = _tools.ctbin_swigregister
ctbin_swigregister(ctbin)

class ctobssim(ctobservation):
    """Proxy of C++ ctobssim class"""
    __swig_setmethods__ = {}
    for _s in [ctobservation]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ctobssim, name, value)
    __swig_getmethods__ = {}
    for _s in [ctobservation]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ctobssim, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        """
        __init__(ctobssim self) -> ctobssim
        __init__(ctobssim self, GObservations const & obs) -> ctobssim
        __init__(ctobssim self, int argc, char *[] argv) -> ctobssim
        __init__(ctobssim self, ctobssim app) -> ctobssim
        """
        this = _tools.new_ctobssim(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _tools.delete_ctobssim
    __del__ = lambda self: None

    def run(self):
        """run(ctobssim self)"""
        return _tools.ctobssim_run(self)


    def save(self):
        """save(ctobssim self)"""
        return _tools.ctobssim_save(self)


    def publish(self, *args):
        """
        publish(ctobssim self, std::string const & name)
        publish(ctobssim self)
        """
        return _tools.ctobssim_publish(self, *args)


    def max_rate(self, *args):
        """
        max_rate(ctobssim self) -> double const
        max_rate(ctobssim self, double const & max_rate)
        """
        return _tools.ctobssim_max_rate(self, *args)


    def copy(self):
        """copy(ctobssim self) -> ctobssim"""
        return _tools.ctobssim_copy(self)

ctobssim_swigregister = _tools.ctobssim_swigregister
ctobssim_swigregister(ctobssim)

class ctlike(ctlikelihood):
    """Proxy of C++ ctlike class"""
    __swig_setmethods__ = {}
    for _s in [ctlikelihood]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ctlike, name, value)
    __swig_getmethods__ = {}
    for _s in [ctlikelihood]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ctlike, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        """
        __init__(ctlike self) -> ctlike
        __init__(ctlike self, GObservations const & obs) -> ctlike
        __init__(ctlike self, int argc, char *[] argv) -> ctlike
        __init__(ctlike self, ctlike app) -> ctlike
        """
        this = _tools.new_ctlike(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _tools.delete_ctlike
    __del__ = lambda self: None

    def run(self):
        """run(ctlike self)"""
        return _tools.ctlike_run(self)


    def save(self):
        """save(ctlike self)"""
        return _tools.ctlike_save(self)


    def copy(self):
        """copy(ctlike self) -> ctlike"""
        return _tools.ctlike_copy(self)

ctlike_swigregister = _tools.ctlike_swigregister
ctlike_swigregister(ctlike)

class ctmodel(ctobservation):
    """Proxy of C++ ctmodel class"""
    __swig_setmethods__ = {}
    for _s in [ctobservation]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ctmodel, name, value)
    __swig_getmethods__ = {}
    for _s in [ctobservation]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ctmodel, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        """
        __init__(ctmodel self) -> ctmodel
        __init__(ctmodel self, GObservations const & obs) -> ctmodel
        __init__(ctmodel self, int argc, char *[] argv) -> ctmodel
        __init__(ctmodel self, ctmodel app) -> ctmodel
        """
        this = _tools.new_ctmodel(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _tools.delete_ctmodel
    __del__ = lambda self: None

    def run(self):
        """run(ctmodel self)"""
        return _tools.ctmodel_run(self)


    def save(self):
        """save(ctmodel self)"""
        return _tools.ctmodel_save(self)


    def publish(self, *args):
        """
        publish(ctmodel self, std::string const & name)
        publish(ctmodel self)
        """
        return _tools.ctmodel_publish(self, *args)


    def cube(self, *args):
        """
        cube(ctmodel self) -> GCTAEventCube const
        cube(ctmodel self, GCTAEventCube const & cube)
        """
        return _tools.ctmodel_cube(self, *args)


    def models(self, models):
        """models(ctmodel self, GModels const & models)"""
        return _tools.ctmodel_models(self, models)


    def copy(self):
        """copy(ctmodel self) -> ctmodel"""
        return _tools.ctmodel_copy(self)

ctmodel_swigregister = _tools.ctmodel_swigregister
ctmodel_swigregister(ctmodel)

class ctselect(ctobservation):
    """Proxy of C++ ctselect class"""
    __swig_setmethods__ = {}
    for _s in [ctobservation]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ctselect, name, value)
    __swig_getmethods__ = {}
    for _s in [ctobservation]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ctselect, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        """
        __init__(ctselect self) -> ctselect
        __init__(ctselect self, GObservations const & obs) -> ctselect
        __init__(ctselect self, int argc, char *[] argv) -> ctselect
        __init__(ctselect self, ctselect app) -> ctselect
        """
        this = _tools.new_ctselect(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _tools.delete_ctselect
    __del__ = lambda self: None

    def run(self):
        """run(ctselect self)"""
        return _tools.ctselect_run(self)


    def save(self):
        """save(ctselect self)"""
        return _tools.ctselect_save(self)


    def publish(self, *args):
        """
        publish(ctselect self, std::string const & name)
        publish(ctselect self)
        """
        return _tools.ctselect_publish(self, *args)


    def copy(self):
        """copy(ctselect self) -> ctselect"""
        return _tools.ctselect_copy(self)

ctselect_swigregister = _tools.ctselect_swigregister
ctselect_swigregister(ctselect)

class ctphase(ctobservation):
    """Proxy of C++ ctphase class"""
    __swig_setmethods__ = {}
    for _s in [ctobservation]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ctphase, name, value)
    __swig_getmethods__ = {}
    for _s in [ctobservation]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ctphase, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        """
        __init__(ctphase self) -> ctphase
        __init__(ctphase self, GObservations const & obs) -> ctphase
        __init__(ctphase self, int argc, char *[] argv) -> ctphase
        __init__(ctphase self, ctphase app) -> ctphase
        """
        this = _tools.new_ctphase(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _tools.delete_ctphase
    __del__ = lambda self: None

    def run(self):
        """run(ctphase self)"""
        return _tools.ctphase_run(self)


    def save(self):
        """save(ctphase self)"""
        return _tools.ctphase_save(self)


    def publish(self, *args):
        """
        publish(ctphase self, std::string const & name)
        publish(ctphase self)
        """
        return _tools.ctphase_publish(self, *args)


    def copy(self):
        """copy(ctphase self) -> ctphase"""
        return _tools.ctphase_copy(self)

ctphase_swigregister = _tools.ctphase_swigregister
ctphase_swigregister(ctphase)

class ctskymap(ctobservation):
    """Proxy of C++ ctskymap class"""
    __swig_setmethods__ = {}
    for _s in [ctobservation]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ctskymap, name, value)
    __swig_getmethods__ = {}
    for _s in [ctobservation]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ctskymap, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        """
        __init__(ctskymap self) -> ctskymap
        __init__(ctskymap self, GObservations const & obs) -> ctskymap
        __init__(ctskymap self, int argc, char *[] argv) -> ctskymap
        __init__(ctskymap self, ctskymap app) -> ctskymap
        """
        this = _tools.new_ctskymap(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _tools.delete_ctskymap
    __del__ = lambda self: None

    def run(self):
        """run(ctskymap self)"""
        return _tools.ctskymap_run(self)


    def save(self):
        """save(ctskymap self)"""
        return _tools.ctskymap_save(self)


    def publish(self, *args):
        """
        publish(ctskymap self, std::string const & name)
        publish(ctskymap self)
        """
        return _tools.ctskymap_publish(self, *args)


    def skymap(self):
        """skymap(ctskymap self) -> GSkyMap const &"""
        return _tools.ctskymap_skymap(self)


    def fits(self):
        """fits(ctskymap self) -> GFits const &"""
        return _tools.ctskymap_fits(self)


    def exclusion_map(self, *args):
        """
        exclusion_map(ctskymap self, GSkyRegionMap const & exclusion_map)
        exclusion_map(ctskymap self) -> GSkyRegionMap
        """
        return _tools.ctskymap_exclusion_map(self, *args)


    def copy(self):
        """copy(ctskymap self) -> ctskymap"""
        return _tools.ctskymap_copy(self)

ctskymap_swigregister = _tools.ctskymap_swigregister
ctskymap_swigregister(ctskymap)

class ctexpcube(ctobservation):
    """Proxy of C++ ctexpcube class"""
    __swig_setmethods__ = {}
    for _s in [ctobservation]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ctexpcube, name, value)
    __swig_getmethods__ = {}
    for _s in [ctobservation]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ctexpcube, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        """
        __init__(ctexpcube self) -> ctexpcube
        __init__(ctexpcube self, GObservations const & obs) -> ctexpcube
        __init__(ctexpcube self, int argc, char *[] argv) -> ctexpcube
        __init__(ctexpcube self, ctexpcube app) -> ctexpcube
        """
        this = _tools.new_ctexpcube(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _tools.delete_ctexpcube
    __del__ = lambda self: None

    def run(self):
        """run(ctexpcube self)"""
        return _tools.ctexpcube_run(self)


    def save(self):
        """save(ctexpcube self)"""
        return _tools.ctexpcube_save(self)


    def publish(self, *args):
        """
        publish(ctexpcube self, std::string const & name)
        publish(ctexpcube self)
        """
        return _tools.ctexpcube_publish(self, *args)


    def expcube(self):
        """expcube(ctexpcube self) -> GCTACubeExposure const &"""
        return _tools.ctexpcube_expcube(self)


    def copy(self):
        """copy(ctexpcube self) -> ctexpcube"""
        return _tools.ctexpcube_copy(self)

ctexpcube_swigregister = _tools.ctexpcube_swigregister
ctexpcube_swigregister(ctexpcube)

class ctpsfcube(ctobservation):
    """Proxy of C++ ctpsfcube class"""
    __swig_setmethods__ = {}
    for _s in [ctobservation]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ctpsfcube, name, value)
    __swig_getmethods__ = {}
    for _s in [ctobservation]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ctpsfcube, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        """
        __init__(ctpsfcube self) -> ctpsfcube
        __init__(ctpsfcube self, GObservations const & obs) -> ctpsfcube
        __init__(ctpsfcube self, int argc, char *[] argv) -> ctpsfcube
        __init__(ctpsfcube self, ctpsfcube app) -> ctpsfcube
        """
        this = _tools.new_ctpsfcube(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _tools.delete_ctpsfcube
    __del__ = lambda self: None

    def run(self):
        """run(ctpsfcube self)"""
        return _tools.ctpsfcube_run(self)


    def save(self):
        """save(ctpsfcube self)"""
        return _tools.ctpsfcube_save(self)


    def psfcube(self):
        """psfcube(ctpsfcube self) -> GCTACubePsf const &"""
        return _tools.ctpsfcube_psfcube(self)


    def copy(self):
        """copy(ctpsfcube self) -> ctpsfcube"""
        return _tools.ctpsfcube_copy(self)

ctpsfcube_swigregister = _tools.ctpsfcube_swigregister
ctpsfcube_swigregister(ctpsfcube)

class ctedispcube(ctobservation):
    """Proxy of C++ ctedispcube class"""
    __swig_setmethods__ = {}
    for _s in [ctobservation]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ctedispcube, name, value)
    __swig_getmethods__ = {}
    for _s in [ctobservation]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ctedispcube, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        """
        __init__(ctedispcube self) -> ctedispcube
        __init__(ctedispcube self, GObservations const & obs) -> ctedispcube
        __init__(ctedispcube self, int argc, char *[] argv) -> ctedispcube
        __init__(ctedispcube self, ctedispcube app) -> ctedispcube
        """
        this = _tools.new_ctedispcube(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _tools.delete_ctedispcube
    __del__ = lambda self: None

    def run(self):
        """run(ctedispcube self)"""
        return _tools.ctedispcube_run(self)


    def save(self):
        """save(ctedispcube self)"""
        return _tools.ctedispcube_save(self)


    def edispcube(self):
        """edispcube(ctedispcube self) -> GCTACubeEdisp const &"""
        return _tools.ctedispcube_edispcube(self)


    def copy(self):
        """copy(ctedispcube self) -> ctedispcube"""
        return _tools.ctedispcube_copy(self)

ctedispcube_swigregister = _tools.ctedispcube_swigregister
ctedispcube_swigregister(ctedispcube)

class ctbkgcube(ctobservation):
    """Proxy of C++ ctbkgcube class"""
    __swig_setmethods__ = {}
    for _s in [ctobservation]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ctbkgcube, name, value)
    __swig_getmethods__ = {}
    for _s in [ctobservation]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ctbkgcube, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        """
        __init__(ctbkgcube self) -> ctbkgcube
        __init__(ctbkgcube self, GObservations const & obs) -> ctbkgcube
        __init__(ctbkgcube self, int argc, char *[] argv) -> ctbkgcube
        __init__(ctbkgcube self, ctbkgcube app) -> ctbkgcube
        """
        this = _tools.new_ctbkgcube(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _tools.delete_ctbkgcube
    __del__ = lambda self: None

    def run(self):
        """run(ctbkgcube self)"""
        return _tools.ctbkgcube_run(self)


    def save(self):
        """save(ctbkgcube self)"""
        return _tools.ctbkgcube_save(self)


    def publish(self, *args):
        """
        publish(ctbkgcube self, std::string const & name)
        publish(ctbkgcube self)
        """
        return _tools.ctbkgcube_publish(self, *args)


    def cntcube(self, cntcube):
        """cntcube(ctbkgcube self, GCTAEventCube const & cntcube)"""
        return _tools.ctbkgcube_cntcube(self, cntcube)


    def bkgcube(self):
        """bkgcube(ctbkgcube self) -> GCTACubeBackground const &"""
        return _tools.ctbkgcube_bkgcube(self)


    def models(self):
        """models(ctbkgcube self) -> GModels const &"""
        return _tools.ctbkgcube_models(self)


    def copy(self):
        """copy(ctbkgcube self) -> ctbkgcube"""
        return _tools.ctbkgcube_copy(self)

ctbkgcube_swigregister = _tools.ctbkgcube_swigregister
ctbkgcube_swigregister(ctbkgcube)

class ctmapcube(ctool):
    """Proxy of C++ ctmapcube class"""
    __swig_setmethods__ = {}
    for _s in [ctool]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ctmapcube, name, value)
    __swig_getmethods__ = {}
    for _s in [ctool]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ctmapcube, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        """
        __init__(ctmapcube self) -> ctmapcube
        __init__(ctmapcube self, int argc, char *[] argv) -> ctmapcube
        __init__(ctmapcube self, ctmapcube app) -> ctmapcube
        """
        this = _tools.new_ctmapcube(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _tools.delete_ctmapcube
    __del__ = lambda self: None

    def run(self):
        """run(ctmapcube self)"""
        return _tools.ctmapcube_run(self)


    def save(self):
        """save(ctmapcube self)"""
        return _tools.ctmapcube_save(self)


    def publish(self, *args):
        """
        publish(ctmapcube self, std::string const & name)
        publish(ctmapcube self)
        """
        return _tools.ctmapcube_publish(self, *args)


    def mapcube(self):
        """mapcube(ctmapcube self) -> GModelSpatialDiffuseCube const &"""
        return _tools.ctmapcube_mapcube(self)


    def models(self, models):
        """models(ctmapcube self, GModels const & models)"""
        return _tools.ctmapcube_models(self, models)


    def copy(self):
        """copy(ctmapcube self) -> ctmapcube"""
        return _tools.ctmapcube_copy(self)

ctmapcube_swigregister = _tools.ctmapcube_swigregister
ctmapcube_swigregister(ctmapcube)

class ctcubemask(ctobservation):
    """Proxy of C++ ctcubemask class"""
    __swig_setmethods__ = {}
    for _s in [ctobservation]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ctcubemask, name, value)
    __swig_getmethods__ = {}
    for _s in [ctobservation]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ctcubemask, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        """
        __init__(ctcubemask self) -> ctcubemask
        __init__(ctcubemask self, GObservations const & obs) -> ctcubemask
        __init__(ctcubemask self, int argc, char *[] argv) -> ctcubemask
        __init__(ctcubemask self, ctcubemask app) -> ctcubemask
        """
        this = _tools.new_ctcubemask(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _tools.delete_ctcubemask
    __del__ = lambda self: None

    def run(self):
        """run(ctcubemask self)"""
        return _tools.ctcubemask_run(self)


    def save(self):
        """save(ctcubemask self)"""
        return _tools.ctcubemask_save(self)


    def publish(self, *args):
        """
        publish(ctcubemask self, std::string const & name)
        publish(ctcubemask self)
        """
        return _tools.ctcubemask_publish(self, *args)


    def copy(self):
        """copy(ctcubemask self) -> ctcubemask"""
        return _tools.ctcubemask_copy(self)

ctcubemask_swigregister = _tools.ctcubemask_swigregister
ctcubemask_swigregister(ctcubemask)

class cttsmap(ctlikelihood):
    """Proxy of C++ cttsmap class"""
    __swig_setmethods__ = {}
    for _s in [ctlikelihood]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, cttsmap, name, value)
    __swig_getmethods__ = {}
    for _s in [ctlikelihood]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, cttsmap, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        """
        __init__(cttsmap self) -> cttsmap
        __init__(cttsmap self, GObservations const & obs) -> cttsmap
        __init__(cttsmap self, int argc, char *[] argv) -> cttsmap
        __init__(cttsmap self, cttsmap app) -> cttsmap
        """
        this = _tools.new_cttsmap(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _tools.delete_cttsmap
    __del__ = lambda self: None

    def run(self):
        """run(cttsmap self)"""
        return _tools.cttsmap_run(self)


    def save(self):
        """save(cttsmap self)"""
        return _tools.cttsmap_save(self)


    def publish(self, *args):
        """
        publish(cttsmap self, std::string const & name)
        publish(cttsmap self)
        """
        return _tools.cttsmap_publish(self, *args)


    def tsmap(self):
        """tsmap(cttsmap self) -> GSkyMap const &"""
        return _tools.cttsmap_tsmap(self)


    def copy(self):
        """copy(cttsmap self) -> cttsmap"""
        return _tools.cttsmap_copy(self)

cttsmap_swigregister = _tools.cttsmap_swigregister
cttsmap_swigregister(cttsmap)

class ctbutterfly(ctlikelihood):
    """Proxy of C++ ctbutterfly class"""
    __swig_setmethods__ = {}
    for _s in [ctlikelihood]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ctbutterfly, name, value)
    __swig_getmethods__ = {}
    for _s in [ctlikelihood]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ctbutterfly, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        """
        __init__(ctbutterfly self) -> ctbutterfly
        __init__(ctbutterfly self, GObservations const & obs) -> ctbutterfly
        __init__(ctbutterfly self, int argc, char *[] argv) -> ctbutterfly
        __init__(ctbutterfly self, ctbutterfly app) -> ctbutterfly
        """
        this = _tools.new_ctbutterfly(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _tools.delete_ctbutterfly
    __del__ = lambda self: None

    def run(self):
        """run(ctbutterfly self)"""
        return _tools.ctbutterfly_run(self)


    def save(self):
        """save(ctbutterfly self)"""
        return _tools.ctbutterfly_save(self)


    def butterfly(self):
        """butterfly(ctbutterfly self) -> GCsv const &"""
        return _tools.ctbutterfly_butterfly(self)


    def copy(self):
        """copy(ctbutterfly self) -> ctbutterfly"""
        return _tools.ctbutterfly_copy(self)

ctbutterfly_swigregister = _tools.ctbutterfly_swigregister
ctbutterfly_swigregister(ctbutterfly)

class ctulimit(ctlikelihood):
    """Proxy of C++ ctulimit class"""
    __swig_setmethods__ = {}
    for _s in [ctlikelihood]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ctulimit, name, value)
    __swig_getmethods__ = {}
    for _s in [ctlikelihood]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ctulimit, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        """
        __init__(ctulimit self) -> ctulimit
        __init__(ctulimit self, GObservations const & obs) -> ctulimit
        __init__(ctulimit self, int argc, char *[] argv) -> ctulimit
        __init__(ctulimit self, ctulimit app) -> ctulimit
        """
        this = _tools.new_ctulimit(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _tools.delete_ctulimit
    __del__ = lambda self: None

    def run(self):
        """run(ctulimit self)"""
        return _tools.ctulimit_run(self)


    def save(self):
        """save(ctulimit self)"""
        return _tools.ctulimit_save(self)


    def diff_ulimit(self):
        """diff_ulimit(ctulimit self) -> double const &"""
        return _tools.ctulimit_diff_ulimit(self)


    def flux_ulimit(self):
        """flux_ulimit(ctulimit self) -> double const &"""
        return _tools.ctulimit_flux_ulimit(self)


    def eflux_ulimit(self):
        """eflux_ulimit(ctulimit self) -> double const &"""
        return _tools.ctulimit_eflux_ulimit(self)


    def copy(self):
        """copy(ctulimit self) -> ctulimit"""
        return _tools.ctulimit_copy(self)

ctulimit_swigregister = _tools.ctulimit_swigregister
ctulimit_swigregister(ctulimit)

class cterror(ctlikelihood):
    """Proxy of C++ cterror class"""
    __swig_setmethods__ = {}
    for _s in [ctlikelihood]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, cterror, name, value)
    __swig_getmethods__ = {}
    for _s in [ctlikelihood]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, cterror, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        """
        __init__(cterror self) -> cterror
        __init__(cterror self, GObservations const & obs) -> cterror
        __init__(cterror self, int argc, char *[] argv) -> cterror
        __init__(cterror self, cterror app) -> cterror
        """
        this = _tools.new_cterror(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _tools.delete_cterror
    __del__ = lambda self: None

    def run(self):
        """run(cterror self)"""
        return _tools.cterror_run(self)


    def save(self):
        """save(cterror self)"""
        return _tools.cterror_save(self)


    def copy(self):
        """copy(cterror self) -> cterror"""
        return _tools.cterror_copy(self)

cterror_swigregister = _tools.cterror_swigregister
cterror_swigregister(cterror)

class ctprob(ctobservation):
    """Proxy of C++ ctprob class"""
    __swig_setmethods__ = {}
    for _s in [ctobservation]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ctprob, name, value)
    __swig_getmethods__ = {}
    for _s in [ctobservation]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ctprob, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        """
        __init__(ctprob self) -> ctprob
        __init__(ctprob self, GObservations const & obs) -> ctprob
        __init__(ctprob self, int argc, char *[] argv) -> ctprob
        __init__(ctprob self, ctprob app) -> ctprob
        """
        this = _tools.new_ctprob(*args)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _tools.delete_ctprob
    __del__ = lambda self: None

    def run(self):
        """run(ctprob self)"""
        return _tools.ctprob_run(self)


    def save(self):
        """save(ctprob self)"""
        return _tools.ctprob_save(self)


    def publish(self, *args):
        """
        publish(ctprob self, std::string const & name)
        publish(ctprob self)
        """
        return _tools.ctprob_publish(self, *args)


    def copy(self):
        """copy(ctprob self) -> ctprob"""
        return _tools.ctprob_copy(self)

ctprob_swigregister = _tools.ctprob_swigregister
ctprob_swigregister(ctprob)


def test():
    from ctools.tests import test_python_ctools
    test_python_ctools.test(installed=True)

# This file is compatible with both classic and new-style classes.


