# This file was automatically generated by SWIG (https://www.swig.org).
# Version 4.2.1
#
# 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 as _swig_python_version_info
# Import the low-level C/C++ module
if __package__ or "." in __name__:
    from . import _plotstuff_c
else:
    import _plotstuff_c

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

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


def _swig_setattr_nondynamic_instance_variable(set):
    def set_instance_attr(self, name, value):
        if name == "this":
            set(self, name, value)
        elif name == "thisown":
            self.this.own(value)
        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add instance attributes to %s" % self)
    return set_instance_attr


def _swig_setattr_nondynamic_class_variable(set):
    def set_class_attr(cls, name, value):
        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
            set(cls, name, value)
        else:
            raise AttributeError("You cannot add class attributes to %s" % cls)
    return set_class_attr


def _swig_add_metaclass(metaclass):
    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
    def wrapper(cls):
        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
    return wrapper


class _SwigNonDynamicMeta(type):
    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)


import astrometry.util.util
PLOTSTUFF_FORMAT_JPG = _plotstuff_c.PLOTSTUFF_FORMAT_JPG
PLOTSTUFF_FORMAT_PNG = _plotstuff_c.PLOTSTUFF_FORMAT_PNG
PLOTSTUFF_FORMAT_PPM = _plotstuff_c.PLOTSTUFF_FORMAT_PPM
PLOTSTUFF_FORMAT_PDF = _plotstuff_c.PLOTSTUFF_FORMAT_PDF
PLOTSTUFF_FORMAT_MEMIMG = _plotstuff_c.PLOTSTUFF_FORMAT_MEMIMG
PLOTSTUFF_FORMAT_FITS = _plotstuff_c.PLOTSTUFF_FORMAT_FITS
class plot_args(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    plotters = property(_plotstuff_c.plot_args_plotters_get, _plotstuff_c.plot_args_plotters_set)
    NP = property(_plotstuff_c.plot_args_NP_get, _plotstuff_c.plot_args_NP_set)
    outfn = property(_plotstuff_c.plot_args_outfn_get, _plotstuff_c.plot_args_outfn_set)
    fout = property(_plotstuff_c.plot_args_fout_get, _plotstuff_c.plot_args_fout_set)
    outformat = property(_plotstuff_c.plot_args_outformat_get, _plotstuff_c.plot_args_outformat_set)
    outimage = property(_plotstuff_c.plot_args_outimage_get, _plotstuff_c.plot_args_outimage_set)
    cairo = property(_plotstuff_c.plot_args_cairo_get, _plotstuff_c.plot_args_cairo_set)
    target = property(_plotstuff_c.plot_args_target_get, _plotstuff_c.plot_args_target_set)
    op = property(_plotstuff_c.plot_args_op_get, _plotstuff_c.plot_args_op_set)
    move_to = property(_plotstuff_c.plot_args_move_to_get, _plotstuff_c.plot_args_move_to_set)
    move_to_baton = property(_plotstuff_c.plot_args_move_to_baton_get, _plotstuff_c.plot_args_move_to_baton_set)
    line_to = property(_plotstuff_c.plot_args_line_to_get, _plotstuff_c.plot_args_line_to_set)
    line_to_baton = property(_plotstuff_c.plot_args_line_to_baton_get, _plotstuff_c.plot_args_line_to_baton_set)
    wcs = property(_plotstuff_c.plot_args_wcs_get, _plotstuff_c.plot_args_wcs_set)
    W = property(_plotstuff_c.plot_args_W_get, _plotstuff_c.plot_args_W_set)
    H = property(_plotstuff_c.plot_args_H_get, _plotstuff_c.plot_args_H_set)
    rgba = property(_plotstuff_c.plot_args_rgba_get, _plotstuff_c.plot_args_rgba_set)
    lw = property(_plotstuff_c.plot_args_lw_get, _plotstuff_c.plot_args_lw_set)
    marker = property(_plotstuff_c.plot_args_marker_get, _plotstuff_c.plot_args_marker_set)
    markersize = property(_plotstuff_c.plot_args_markersize_get, _plotstuff_c.plot_args_markersize_set)
    bg_rgba = property(_plotstuff_c.plot_args_bg_rgba_get, _plotstuff_c.plot_args_bg_rgba_set)
    bg_lw = property(_plotstuff_c.plot_args_bg_lw_get, _plotstuff_c.plot_args_bg_lw_set)
    bg_box = property(_plotstuff_c.plot_args_bg_box_get, _plotstuff_c.plot_args_bg_box_set)
    fontsize = property(_plotstuff_c.plot_args_fontsize_get, _plotstuff_c.plot_args_fontsize_set)
    halign = property(_plotstuff_c.plot_args_halign_get, _plotstuff_c.plot_args_halign_set)
    valign = property(_plotstuff_c.plot_args_valign_get, _plotstuff_c.plot_args_valign_set)
    label_offset_x = property(_plotstuff_c.plot_args_label_offset_x_get, _plotstuff_c.plot_args_label_offset_x_set)
    label_offset_y = property(_plotstuff_c.plot_args_label_offset_y_get, _plotstuff_c.plot_args_label_offset_y_set)
    text_bg_layer = property(_plotstuff_c.plot_args_text_bg_layer_get, _plotstuff_c.plot_args_text_bg_layer_set)
    text_fg_layer = property(_plotstuff_c.plot_args_text_fg_layer_get, _plotstuff_c.plot_args_text_fg_layer_set)
    marker_fg_layer = property(_plotstuff_c.plot_args_marker_fg_layer_get, _plotstuff_c.plot_args_marker_fg_layer_set)
    cairocmds = property(_plotstuff_c.plot_args_cairocmds_get, _plotstuff_c.plot_args_cairocmds_set)
    linestep = property(_plotstuff_c.plot_args_linestep_get, _plotstuff_c.plot_args_linestep_set)

    def view_image_as_numpy(self):
        return _plotstuff_c.plot_args_view_image_as_numpy(self)

    def get_image_as_numpy(self, flip, out):
        return _plotstuff_c.plot_args_get_image_as_numpy(self, flip, out)

    def get_image_as_numpy_view(self):
        return _plotstuff_c.plot_args_get_image_as_numpy_view(self)

    def set_image_from_numpy(self, py_img, flip):
        return _plotstuff_c.plot_args_set_image_from_numpy(self, py_img, flip)

    def set_wcs_file(self, fn, ext):
        return _plotstuff_c.plot_args_set_wcs_file(self, fn, ext)

    def set_size_from_wcs(self):
        return _plotstuff_c.plot_args_set_size_from_wcs(self)

    def count_ra_labels(self):
        return _plotstuff_c.plot_args_count_ra_labels(self)

    def count_dec_labels(self):
        return _plotstuff_c.plot_args_count_dec_labels(self)

    def loginit(self, level):
        return _plotstuff_c.plot_args_loginit(self, level)

    def __init__(self):
        _plotstuff_c.plot_args_swiginit(self, _plotstuff_c.new_plot_args())
    __swig_destroy__ = _plotstuff_c.delete_plot_args

# Register plot_args in _plotstuff_c:
_plotstuff_c.plot_args_swigregister(plot_args)
class plotter(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    name = property(_plotstuff_c.plotter_name_get, _plotstuff_c.plotter_name_set)
    init = property(_plotstuff_c.plotter_init_get, _plotstuff_c.plotter_init_set)
    init2 = property(_plotstuff_c.plotter_init2_get, _plotstuff_c.plotter_init2_set)
    command = property(_plotstuff_c.plotter_command_get, _plotstuff_c.plotter_command_set)
    doplot = property(_plotstuff_c.plotter_doplot_get, _plotstuff_c.plotter_doplot_set)
    free = property(_plotstuff_c.plotter_free_get, _plotstuff_c.plotter_free_set)
    baton = property(_plotstuff_c.plotter_baton_get, _plotstuff_c.plotter_baton_set)

    def __init__(self):
        _plotstuff_c.plotter_swiginit(self, _plotstuff_c.new_plotter())
    __swig_destroy__ = _plotstuff_c.delete_plotter

# Register plotter in _plotstuff_c:
_plotstuff_c.plotter_swigregister(plotter)

def parse_image_format(fmt):
    return _plotstuff_c.parse_image_format(fmt)

def guess_image_format_from_filename(fn):
    return _plotstuff_c.guess_image_format_from_filename(fn)

def image_format_name_from_code(code):
    return _plotstuff_c.image_format_name_from_code(code)

def parse_color(color, r, g, b, a):
    return _plotstuff_c.parse_color(color, r, g, b, a)

def parse_color_rgba(color, rgba):
    return _plotstuff_c.parse_color_rgba(color, rgba)

def cairo_set_color(cairo, color):
    return _plotstuff_c.cairo_set_color(cairo, color)

def cairo_set_rgba(cairo, rgba):
    return _plotstuff_c.cairo_set_rgba(cairo, rgba)

def plotstuff_new():
    return _plotstuff_c.plotstuff_new()

def plotstuff_init(plotargs):
    return _plotstuff_c.plotstuff_init(plotargs)

def plotstuff_read_and_run_command(pargs, f):
    return _plotstuff_c.plotstuff_read_and_run_command(pargs, f)

def plotstuff_run_command(pargs, cmd):
    return _plotstuff_c.plotstuff_run_command(pargs, cmd)

def plotstuff_set_text_bg_alpha(pargs, alpha):
    return _plotstuff_c.plotstuff_set_text_bg_alpha(pargs, alpha)

def plotstuff_plot_layer(pargs, layer):
    return _plotstuff_c.plotstuff_plot_layer(pargs, layer)

def plotstuff_get_config(pargs, name):
    return _plotstuff_c.plotstuff_get_config(pargs, name)

def plotstuff_set_color(pargs, name):
    return _plotstuff_c.plotstuff_set_color(pargs, name)

def plotstuff_set_bgcolor(pargs, name):
    return _plotstuff_c.plotstuff_set_bgcolor(pargs, name)

def plotstuff_get_alpha(pargs):
    return _plotstuff_c.plotstuff_get_alpha(pargs)

def plotstuff_set_alpha(pargs, alpha):
    return _plotstuff_c.plotstuff_set_alpha(pargs, alpha)

def plotstuff_set_rgba(pargs, rgba):
    return _plotstuff_c.plotstuff_set_rgba(pargs, rgba)

def plotstuff_set_rgba2(pargs, r, g, b, a):
    return _plotstuff_c.plotstuff_set_rgba2(pargs, r, g, b, a)

def plotstuff_set_bgrgba2(pargs, r, g, b, a):
    return _plotstuff_c.plotstuff_set_bgrgba2(pargs, r, g, b, a)

def plotstuff_set_marker(pargs, name):
    return _plotstuff_c.plotstuff_set_marker(pargs, name)

def plotstuff_set_markersize(pargs, ms):
    return _plotstuff_c.plotstuff_set_markersize(pargs, ms)

def plotstuff_set_size(pargs, W, H):
    return _plotstuff_c.plotstuff_set_size(pargs, W, H)

def plotstuff_set_size_wcs(pargs):
    return _plotstuff_c.plotstuff_set_size_wcs(pargs)

def plotstuff_scale_wcs(pargs, scale):
    return _plotstuff_c.plotstuff_scale_wcs(pargs, scale)

def plotstuff_rotate_wcs(pargs, angle):
    return _plotstuff_c.plotstuff_rotate_wcs(pargs, angle)

def plotstuff_set_wcs_box(pargs, ra, dec, width):
    return _plotstuff_c.plotstuff_set_wcs_box(pargs, ra, dec, width)

def plotstuff_set_wcs_file(pargs, fn, ext):
    return _plotstuff_c.plotstuff_set_wcs_file(pargs, fn, ext)

def plotstuff_set_wcs(pargs, wcs):
    return _plotstuff_c.plotstuff_set_wcs(pargs, wcs)

def plotstuff_set_wcs_tan(pargs, wcs):
    return _plotstuff_c.plotstuff_set_wcs_tan(pargs, wcs)

def plotstuff_set_wcs_sip(pargs, wcs):
    return _plotstuff_c.plotstuff_set_wcs_sip(pargs, wcs)

def plotstuff_builtin_apply(cairo, args):
    return _plotstuff_c.plotstuff_builtin_apply(cairo, args)

def plotstuff_marker_in_bounds(pargs, x, y):
    return _plotstuff_c.plotstuff_marker_in_bounds(pargs, x, y)

def plotstuff_run_commandf(*args):
    return _plotstuff_c.plotstuff_run_commandf(*args)

def plotstuff_output(pargs):
    return _plotstuff_c.plotstuff_output(pargs)

def plotstuff_free(pargs):
    return _plotstuff_c.plotstuff_free(pargs)

def plotstuff_clear(pargs):
    return _plotstuff_c.plotstuff_clear(pargs)

def plotstuff_stack_marker(pargs, x, y):
    return _plotstuff_c.plotstuff_stack_marker(pargs, x, y)

def plotstuff_stack_arrow(pargs, x, y, x2, y2):
    return _plotstuff_c.plotstuff_stack_arrow(pargs, x, y, x2, y2)

def plotstuff_stack_text(pargs, cairo, txt, px, py):
    return _plotstuff_c.plotstuff_stack_text(pargs, cairo, txt, px, py)

def plotstuff_plot_stack(pargs, cairo):
    return _plotstuff_c.plotstuff_plot_stack(pargs, cairo)

def plotstuff_get_maximum_rgba(pargs):
    return _plotstuff_c.plotstuff_get_maximum_rgba(pargs)

def plotstuff_pixel_scale(pargs):
    return _plotstuff_c.plotstuff_pixel_scale(pargs)

def plotstuff_radec2xy(pargs, ra, dec):
    return _plotstuff_c.plotstuff_radec2xy(pargs, ra, dec)

def plotstuff_xy2radec(pargs, x, y, pre):
    return _plotstuff_c.plotstuff_xy2radec(pargs, x, y, pre)

def plotstuff_get_radec_center_and_radius(pargs):
    return _plotstuff_c.plotstuff_get_radec_center_and_radius(pargs)

def plotstuff_get_radec_bounds(pargs, stepsize):
    return _plotstuff_c.plotstuff_get_radec_bounds(pargs, stepsize)

def plotstuff_radec_is_inside_image(pargs, ra, dec):
    return _plotstuff_c.plotstuff_radec_is_inside_image(pargs, ra, dec)

def plotstuff_line_constant_ra(pargs, ra, dec1, dec2, startwithmove):
    return _plotstuff_c.plotstuff_line_constant_ra(pargs, ra, dec1, dec2, startwithmove)

def plotstuff_line_constant_dec(pargs, dec, ra1, ra2):
    return _plotstuff_c.plotstuff_line_constant_dec(pargs, dec, ra1, ra2)

def plotstuff_line_constant_dec2(pargs, dec, ra1, ra2, stepra):
    return _plotstuff_c.plotstuff_line_constant_dec2(pargs, dec, ra1, ra2, stepra)

def plotstuff_text_xy(pargs, ra, dec, label):
    return _plotstuff_c.plotstuff_text_xy(pargs, ra, dec, label)

def plotstuff_text_radec(pargs, ra, dec, label):
    return _plotstuff_c.plotstuff_text_radec(pargs, ra, dec, label)

def plotstuff_move_to_radec(pargs, ra, dec):
    return _plotstuff_c.plotstuff_move_to_radec(pargs, ra, dec)

def plotstuff_line_to_radec(pargs, ra, dec):
    return _plotstuff_c.plotstuff_line_to_radec(pargs, ra, dec)

def plotstuff_close_path(pargs):
    return _plotstuff_c.plotstuff_close_path(pargs)

def plotstuff_stroke(pargs):
    return _plotstuff_c.plotstuff_stroke(pargs)

def plotstuff_fill(pargs):
    return _plotstuff_c.plotstuff_fill(pargs)

def plotstuff_stroke_preserve(pargs):
    return _plotstuff_c.plotstuff_stroke_preserve(pargs)

def plotstuff_fill_preserve(pargs):
    return _plotstuff_c.plotstuff_fill_preserve(pargs)

def plotstuff_move_to(pargs, x, y):
    return _plotstuff_c.plotstuff_move_to(pargs, x, y)

def plotstuff_line_to(pargs, x, y):
    return _plotstuff_c.plotstuff_line_to(pargs, x, y)

def plotstuff_marker(pargs, x, y):
    return _plotstuff_c.plotstuff_marker(pargs, x, y)

def plotstuff_marker_radec(pargs, ra, dec):
    return _plotstuff_c.plotstuff_marker_radec(pargs, ra, dec)

def plotstuff_append_doubles(str, lst):
    return _plotstuff_c.plotstuff_append_doubles(str, lst)

def plotstuff_set_dashed(pargs, dashlen):
    return _plotstuff_c.plotstuff_set_dashed(pargs, dashlen)

def plotstuff_set_solid(pargs):
    return _plotstuff_c.plotstuff_set_solid(pargs)
PTYPE_FLOAT = _plotstuff_c.PTYPE_FLOAT
PTYPE_INT = _plotstuff_c.PTYPE_INT
PTYPE_DOUBLE = _plotstuff_c.PTYPE_DOUBLE
PTYPE_UINT8 = _plotstuff_c.PTYPE_UINT8
PTYPE_INT16 = _plotstuff_c.PTYPE_INT16
BPP_8_UNSIGNED = _plotstuff_c.BPP_8_UNSIGNED
BPP_16_SIGNED = _plotstuff_c.BPP_16_SIGNED
BPP_32_SIGNED = _plotstuff_c.BPP_32_SIGNED
BPP_IEEE_FLOAT = _plotstuff_c.BPP_IEEE_FLOAT
BPP_IEEE_DOUBLE = _plotstuff_c.BPP_IEEE_DOUBLE
BPP_DEFAULT = _plotstuff_c.BPP_DEFAULT
class qfitsdumper(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    filename = property(_plotstuff_c.qfitsdumper_filename_get, _plotstuff_c.qfitsdumper_filename_set)
    npix = property(_plotstuff_c.qfitsdumper_npix_get, _plotstuff_c.qfitsdumper_npix_set)
    ptype = property(_plotstuff_c.qfitsdumper_ptype_get, _plotstuff_c.qfitsdumper_ptype_set)
    ibuf = property(_plotstuff_c.qfitsdumper_ibuf_get, _plotstuff_c.qfitsdumper_ibuf_set)
    fbuf = property(_plotstuff_c.qfitsdumper_fbuf_get, _plotstuff_c.qfitsdumper_fbuf_set)
    dbuf = property(_plotstuff_c.qfitsdumper_dbuf_get, _plotstuff_c.qfitsdumper_dbuf_set)
    vbuf = property(_plotstuff_c.qfitsdumper_vbuf_get, _plotstuff_c.qfitsdumper_vbuf_set)
    out_ptype = property(_plotstuff_c.qfitsdumper_out_ptype_get, _plotstuff_c.qfitsdumper_out_ptype_set)

    def __init__(self):
        _plotstuff_c.qfitsdumper_swiginit(self, _plotstuff_c.new_qfitsdumper())
    __swig_destroy__ = _plotstuff_c.delete_qfitsdumper

# Register qfitsdumper in _plotstuff_c:
_plotstuff_c.qfitsdumper_swigregister(qfitsdumper)

def qfits_pixdump(arg1):
    return _plotstuff_c.qfits_pixdump(arg1)

def convolve_get_gaussian_kernel_f(sigma, nsigma, k0, NK):
    return _plotstuff_c.convolve_get_gaussian_kernel_f(sigma, nsigma, k0, NK)

def convolve_separable_f(img, W, H, kernel, k0, NK, outimg, tempimg):
    return _plotstuff_c.convolve_separable_f(img, W, H, kernel, k0, NK, outimg, tempimg)

def convolve_separable_weighted_f(img, W, H, weight, kernel, k0, NK, outimg, tempimg):
    return _plotstuff_c.convolve_separable_weighted_f(img, W, H, weight, kernel, k0, NK, outimg, tempimg)
class brightstar(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    name = property(_plotstuff_c.brightstar_name_get, _plotstuff_c.brightstar_name_set)
    common_name = property(_plotstuff_c.brightstar_common_name_get, _plotstuff_c.brightstar_common_name_set)
    ra = property(_plotstuff_c.brightstar_ra_get, _plotstuff_c.brightstar_ra_set)
    dec = property(_plotstuff_c.brightstar_dec_get, _plotstuff_c.brightstar_dec_set)
    Vmag = property(_plotstuff_c.brightstar_Vmag_get, _plotstuff_c.brightstar_Vmag_set)

    def __init__(self):
        _plotstuff_c.brightstar_swiginit(self, _plotstuff_c.new_brightstar())
    __swig_destroy__ = _plotstuff_c.delete_brightstar

# Register brightstar in _plotstuff_c:
_plotstuff_c.brightstar_swigregister(brightstar)

def bright_stars_n():
    return _plotstuff_c.bright_stars_n()

def bright_stars_get(starindex):
    return _plotstuff_c.bright_stars_get(starindex)

def c_image_numpy_view(data, nx, ny):
    return _plotstuff_c.c_image_numpy_view(data, nx, ny)

def qfits_load_image(fn, ext=1, plane=0, map=1, ptype=PTYPE_FLOAT):
    ld = qfitsloader()
    ld.filename = fn
    ld.xtnum = ext
    ld.pnum = plane
    ld.map = map
    ld.ptype = ptype
    if qfitsloader_init(ld):
        raise RuntimeError('qfitsloader_init(file "%s", ext %i) failed' % (fn, ext))
    if qfits_loadpix(ld):
        raise RuntimeError('qfits_loadpix(file "%s", ext %i) failed' % (fn, ext))

    class qfits_image(object):
        def __init__(self, pix, nx, ny, ld):
            self.pix = pix
            self.nx = nx
            self.ny = ny
            self.ld = ld
        def __del__(self):
            qfitsloader_free_buffer(self.ld)

    return qfits_image(ld.fbuf, ld.lx, ld.ly, ld)


def free(ptr):
    return _plotstuff_c.free(ptr)
LARGE_VAL = _plotstuff_c.LARGE_VAL
LARGE_VALF = _plotstuff_c.LARGE_VALF

def point_in_polygon(x, y, polygon):
    return _plotstuff_c.point_in_polygon(x, y, polygon)

def tan_vectors(pt, vec1, vec2):
    return _plotstuff_c.tan_vectors(pt, vec1, vec2)

def invert_2by2(A, Ainv):
    return _plotstuff_c.invert_2by2(A, Ainv)

def invert_2by2_arr(A, Ainv):
    return _plotstuff_c.invert_2by2_arr(A, Ainv)

def is_power_of_two(x):
    return _plotstuff_c.is_power_of_two(x)

def matrix_matrix_3(m1, m2, result):
    return _plotstuff_c.matrix_matrix_3(m1, m2, result)

def matrix_vector_3(m, v, result):
    return _plotstuff_c.matrix_vector_3(m, v, result)

def dot_product_3(v1, v2):
    return _plotstuff_c.dot_product_3(v1, v2)

def vector_length_3(v):
    return _plotstuff_c.vector_length_3(v)

def vector_length_squared_3(v):
    return _plotstuff_c.vector_length_squared_3(v)

def inverse_3by3(matrix):
    return _plotstuff_c.inverse_3by3(matrix)

def image_to_xyz(uu, vv, s, transform):
    return _plotstuff_c.image_to_xyz(uu, vv, s, transform)

def fit_transform(star, field, N, trans):
    return _plotstuff_c.fit_transform(star, field, N, trans)

def uniform_sample(low, high):
    return _plotstuff_c.uniform_sample(low, high)

def gaussian_sample(mean, stddev):
    return _plotstuff_c.gaussian_sample(mean, stddev)
EDGE_TRUNCATE = _plotstuff_c.EDGE_TRUNCATE
EDGE_AVERAGE = _plotstuff_c.EDGE_AVERAGE

def get_output_image_size(W, H, blocksize, edgehandling, outw, outh):
    return _plotstuff_c.get_output_image_size(W, H, blocksize, edgehandling, outw, outh)

def average_image_f(image, W, H, blocksize, edgehandling, output):
    return _plotstuff_c.average_image_f(image, W, H, blocksize, edgehandling, output)

def average_weighted_image_f(image, weight, W, H, blocksize, edgehandling, output, nilval):
    return _plotstuff_c.average_weighted_image_f(image, weight, W, H, blocksize, edgehandling, output, nilval)

def imax(a, b):
    return _plotstuff_c.imax(a, b)

def imin(a, b):
    return _plotstuff_c.imin(a, b)

def distsq_exceeds(d1, d2, D, limit):
    return _plotstuff_c.distsq_exceeds(d1, d2, D, limit)

def square(d):
    return _plotstuff_c.square(d)

def inrange(ra, ralow, rahigh):
    return _plotstuff_c.inrange(ra, ralow, rahigh)

def distsq(d1, d2, D):
    return _plotstuff_c.distsq(d1, d2, D)

def cross_product(v1, v2, cross):
    return _plotstuff_c.cross_product(v1, v2, cross)

def normalize(x, y, z):
    return _plotstuff_c.normalize(x, y, z)

def normalize_3(xyz):
    return _plotstuff_c.normalize_3(xyz)
class plotimage_args(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    fn = property(_plotstuff_c.plotimage_args_fn_get, _plotstuff_c.plotimage_args_fn_set)
    format = property(_plotstuff_c.plotimage_args_format_get, _plotstuff_c.plotimage_args_format_set)
    resample = property(_plotstuff_c.plotimage_args_resample_get, _plotstuff_c.plotimage_args_resample_set)
    downsample = property(_plotstuff_c.plotimage_args_downsample_get, _plotstuff_c.plotimage_args_downsample_set)
    arcsinh = property(_plotstuff_c.plotimage_args_arcsinh_get, _plotstuff_c.plotimage_args_arcsinh_set)
    rgbscale = property(_plotstuff_c.plotimage_args_rgbscale_get, _plotstuff_c.plotimage_args_rgbscale_set)
    alpha = property(_plotstuff_c.plotimage_args_alpha_get, _plotstuff_c.plotimage_args_alpha_set)
    wcs = property(_plotstuff_c.plotimage_args_wcs_get, _plotstuff_c.plotimage_args_wcs_set)
    gridsize = property(_plotstuff_c.plotimage_args_gridsize_get, _plotstuff_c.plotimage_args_gridsize_set)
    image_low = property(_plotstuff_c.plotimage_args_image_low_get, _plotstuff_c.plotimage_args_image_low_set)
    image_high = property(_plotstuff_c.plotimage_args_image_high_get, _plotstuff_c.plotimage_args_image_high_set)
    image_null = property(_plotstuff_c.plotimage_args_image_null_get, _plotstuff_c.plotimage_args_image_null_set)
    image_valid_low = property(_plotstuff_c.plotimage_args_image_valid_low_get, _plotstuff_c.plotimage_args_image_valid_low_set)
    image_valid_high = property(_plotstuff_c.plotimage_args_image_valid_high_get, _plotstuff_c.plotimage_args_image_valid_high_set)
    n_invalid_low = property(_plotstuff_c.plotimage_args_n_invalid_low_get, _plotstuff_c.plotimage_args_n_invalid_low_set)
    n_invalid_high = property(_plotstuff_c.plotimage_args_n_invalid_high_get, _plotstuff_c.plotimage_args_n_invalid_high_set)
    n_invalid_null = property(_plotstuff_c.plotimage_args_n_invalid_null_get, _plotstuff_c.plotimage_args_n_invalid_null_set)
    fitsext = property(_plotstuff_c.plotimage_args_fitsext_get, _plotstuff_c.plotimage_args_fitsext_set)
    fitsplane = property(_plotstuff_c.plotimage_args_fitsplane_get, _plotstuff_c.plotimage_args_fitsplane_set)
    auto_scale = property(_plotstuff_c.plotimage_args_auto_scale_get, _plotstuff_c.plotimage_args_auto_scale_set)
    img = property(_plotstuff_c.plotimage_args_img_get, _plotstuff_c.plotimage_args_img_set)
    W = property(_plotstuff_c.plotimage_args_W_get, _plotstuff_c.plotimage_args_W_set)
    H = property(_plotstuff_c.plotimage_args_H_get, _plotstuff_c.plotimage_args_H_set)

    def _set_image_from_numpy(self, arr):
        return _plotstuff_c.plotimage_args__set_image_from_numpy(self, arr)

    def set_wcs_file(self, fn, ext):
        return _plotstuff_c.plotimage_args_set_wcs_file(self, fn, ext)

    def set_file(self, fn):
        return _plotstuff_c.plotimage_args_set_file(self, fn)

    def set_rgbscale(self, r, g, b):
        return _plotstuff_c.plotimage_args_set_rgbscale(self, r, g, b)

    def get_image_width(self):
        return _plotstuff_c.plotimage_args_get_image_width(self)

    def get_image_height(self):
        return _plotstuff_c.plotimage_args_get_image_height(self)

    def __init__(self):
        _plotstuff_c.plotimage_args_swiginit(self, _plotstuff_c.new_plotimage_args())
    __swig_destroy__ = _plotstuff_c.delete_plotimage_args

# Register plotimage_args in _plotstuff_c:
_plotstuff_c.plotimage_args_swigregister(plotimage_args)

def plot_image_get(pargs):
    return _plotstuff_c.plot_image_get(pargs)

def plot_image_set_wcs(args, filename, ext):
    return _plotstuff_c.plot_image_set_wcs(args, filename, ext)

def plot_image_init(args):
    return _plotstuff_c.plot_image_init(args)

def plot_image_command(command, cmdargs, args, baton):
    return _plotstuff_c.plot_image_command(command, cmdargs, args, baton)

def plot_image_plot(command, cr, args, baton):
    return _plotstuff_c.plot_image_plot(command, cr, args, baton)

def plot_image_free(args, baton):
    return _plotstuff_c.plot_image_free(args, baton)

def plot_image_getsize(args, W, H):
    return _plotstuff_c.plot_image_getsize(args, W, H)

def plot_image_set_filename(args, fn):
    return _plotstuff_c.plot_image_set_filename(args, fn)

def plot_image_setsize(pargs, args):
    return _plotstuff_c.plot_image_setsize(pargs, args)

def plot_image_get_percentile(pargs, args, percentile):
    return _plotstuff_c.plot_image_get_percentile(pargs, args, percentile)

def plot_image_add_to_pixels(args, rgb):
    return _plotstuff_c.plot_image_add_to_pixels(args, rgb)

def plot_image_scale_float(args, fimg):
    return _plotstuff_c.plot_image_scale_float(args, fimg)

def plot_image_rgba_data(cairo, args):
    return _plotstuff_c.plot_image_rgba_data(cairo, args)

def plot_image_read(pargs, args):
    return _plotstuff_c.plot_image_read(pargs, args)

def plot_image_make_color_transparent(args, r, g, b):
    return _plotstuff_c.plot_image_make_color_transparent(args, r, g, b)

def plot_image_describe(p):
    return _plotstuff_c.plot_image_describe(p)
class plotoutline_args(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    wcs = property(_plotstuff_c.plotoutline_args_wcs_get, _plotstuff_c.plotoutline_args_wcs_set)
    stepsize = property(_plotstuff_c.plotoutline_args_stepsize_get, _plotstuff_c.plotoutline_args_stepsize_set)
    fill = property(_plotstuff_c.plotoutline_args_fill_get, _plotstuff_c.plotoutline_args_fill_set)

    def set_wcs_file(self, fn, ext):
        return _plotstuff_c.plotoutline_args_set_wcs_file(self, fn, ext)

    def set_wcs_size(self, W, H):
        return _plotstuff_c.plotoutline_args_set_wcs_size(self, W, H)

    def set_wcs(self, wcs):
        return _plotstuff_c.plotoutline_args_set_wcs(self, wcs)

    def __init__(self):
        _plotstuff_c.plotoutline_args_swiginit(self, _plotstuff_c.new_plotoutline_args())
    __swig_destroy__ = _plotstuff_c.delete_plotoutline_args

# Register plotoutline_args in _plotstuff_c:
_plotstuff_c.plotoutline_args_swigregister(plotoutline_args)

def plot_outline_get(pargs):
    return _plotstuff_c.plot_outline_get(pargs)

def plot_outline_init(args):
    return _plotstuff_c.plot_outline_init(args)

def plot_outline_command(command, cmdargs, args, baton):
    return _plotstuff_c.plot_outline_command(command, cmdargs, args, baton)

def plot_outline_plot(command, cr, args, baton):
    return _plotstuff_c.plot_outline_plot(command, cr, args, baton)

def plot_outline_free(args, baton):
    return _plotstuff_c.plot_outline_free(args, baton)

def plot_outline_set_wcs_file(args, filename, ext):
    return _plotstuff_c.plot_outline_set_wcs_file(args, filename, ext)

def plot_outline_set_wcs_size(args, W, H):
    return _plotstuff_c.plot_outline_set_wcs_size(args, W, H)

def plot_outline_set_wcs(args, wcs):
    return _plotstuff_c.plot_outline_set_wcs(args, wcs)

def plot_outline_set_tan_wcs(args, wcs):
    return _plotstuff_c.plot_outline_set_tan_wcs(args, wcs)

def plot_outline_set_fill(args, fill):
    return _plotstuff_c.plot_outline_set_fill(args, fill)

def plot_outline_describe(p):
    return _plotstuff_c.plot_outline_describe(p)
class plotgrid_args(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    dolabel = property(_plotstuff_c.plotgrid_args_dolabel_get, _plotstuff_c.plotgrid_args_dolabel_set)
    rastep = property(_plotstuff_c.plotgrid_args_rastep_get, _plotstuff_c.plotgrid_args_rastep_set)
    decstep = property(_plotstuff_c.plotgrid_args_decstep_get, _plotstuff_c.plotgrid_args_decstep_set)
    ralabelstep = property(_plotstuff_c.plotgrid_args_ralabelstep_get, _plotstuff_c.plotgrid_args_ralabelstep_set)
    declabelstep = property(_plotstuff_c.plotgrid_args_declabelstep_get, _plotstuff_c.plotgrid_args_declabelstep_set)
    ralabeldir = property(_plotstuff_c.plotgrid_args_ralabeldir_get, _plotstuff_c.plotgrid_args_ralabeldir_set)
    declabeldir = property(_plotstuff_c.plotgrid_args_declabeldir_get, _plotstuff_c.plotgrid_args_declabeldir_set)
    ralo = property(_plotstuff_c.plotgrid_args_ralo_get, _plotstuff_c.plotgrid_args_ralo_set)
    rahi = property(_plotstuff_c.plotgrid_args_rahi_get, _plotstuff_c.plotgrid_args_rahi_set)
    declo = property(_plotstuff_c.plotgrid_args_declo_get, _plotstuff_c.plotgrid_args_declo_set)
    dechi = property(_plotstuff_c.plotgrid_args_dechi_get, _plotstuff_c.plotgrid_args_dechi_set)
    raformat = property(_plotstuff_c.plotgrid_args_raformat_get, _plotstuff_c.plotgrid_args_raformat_set)
    decformat = property(_plotstuff_c.plotgrid_args_decformat_get, _plotstuff_c.plotgrid_args_decformat_set)

    def set_formats(self, raformat, decformat):
        return _plotstuff_c.plotgrid_args_set_formats(self, raformat, decformat)

    def __init__(self):
        _plotstuff_c.plotgrid_args_swiginit(self, _plotstuff_c.new_plotgrid_args())
    __swig_destroy__ = _plotstuff_c.delete_plotgrid_args

# Register plotgrid_args in _plotstuff_c:
_plotstuff_c.plotgrid_args_swigregister(plotgrid_args)

def plot_grid_get(pargs):
    return _plotstuff_c.plot_grid_get(pargs)

def plot_grid_init(args):
    return _plotstuff_c.plot_grid_init(args)

def plot_grid_set_formats(grid, raformat, decformat):
    return _plotstuff_c.plot_grid_set_formats(grid, raformat, decformat)

def plot_grid_command(command, cmdargs, args, baton):
    return _plotstuff_c.plot_grid_command(command, cmdargs, args, baton)

def plot_grid_plot(command, cr, args, baton):
    return _plotstuff_c.plot_grid_plot(command, cr, args, baton)

def plot_grid_free(args, baton):
    return _plotstuff_c.plot_grid_free(args, baton)
DIRECTION_DEFAULT = _plotstuff_c.DIRECTION_DEFAULT
DIRECTION_POS = _plotstuff_c.DIRECTION_POS
DIRECTION_NEG = _plotstuff_c.DIRECTION_NEG
DIRECTION_POSNEG = _plotstuff_c.DIRECTION_POSNEG
DIRECTION_NEGPOS = _plotstuff_c.DIRECTION_NEGPOS

def plot_grid_add_label(pargs, ra, dec, lval, format):
    return _plotstuff_c.plot_grid_add_label(pargs, ra, dec, lval, format)

def plot_grid_find_ra_label_location(pargs, ra, cdec, decmin, decmax, dirn):
    return _plotstuff_c.plot_grid_find_ra_label_location(pargs, ra, cdec, decmin, decmax, dirn)

def plot_grid_find_dec_label_location(pargs, dec, cra, ramin, ramax, dirn):
    return _plotstuff_c.plot_grid_find_dec_label_location(pargs, dec, cra, ramin, ramax, dirn)

def plot_grid_count_ra_labels(pargs):
    return _plotstuff_c.plot_grid_count_ra_labels(pargs)

def plot_grid_count_dec_labels(pargs):
    return _plotstuff_c.plot_grid_count_dec_labels(pargs)

def plot_grid_describe(p):
    return _plotstuff_c.plot_grid_describe(p)
class plotindex_args(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    indexes = property(_plotstuff_c.plotindex_args_indexes_get, _plotstuff_c.plotindex_args_indexes_set)
    qidxes = property(_plotstuff_c.plotindex_args_qidxes_get, _plotstuff_c.plotindex_args_qidxes_set)
    stars = property(_plotstuff_c.plotindex_args_stars_get, _plotstuff_c.plotindex_args_stars_set)
    quads = property(_plotstuff_c.plotindex_args_quads_get, _plotstuff_c.plotindex_args_quads_set)
    fill = property(_plotstuff_c.plotindex_args_fill_get, _plotstuff_c.plotindex_args_fill_set)

    def add_file(self, fn):
        return _plotstuff_c.plotindex_args_add_file(self, fn)

    def __init__(self):
        _plotstuff_c.plotindex_args_swiginit(self, _plotstuff_c.new_plotindex_args())
    __swig_destroy__ = _plotstuff_c.delete_plotindex_args

# Register plotindex_args in _plotstuff_c:
_plotstuff_c.plotindex_args_swigregister(plotindex_args)

def plot_quad_xy(cairo, quadxy, dimquads):
    return _plotstuff_c.plot_quad_xy(cairo, quadxy, dimquads)

def plot_index_plotquad(cairo, pargs, args, index, quadnum, DQ):
    return _plotstuff_c.plot_index_plotquad(cairo, pargs, args, index, quadnum, DQ)

def plot_index_get(pargs):
    return _plotstuff_c.plot_index_get(pargs)

def plot_index_add_file(args, fn):
    return _plotstuff_c.plot_index_add_file(args, fn)

def plot_index_add_qidx_file(args, fn):
    return _plotstuff_c.plot_index_add_qidx_file(args, fn)

def plot_index_init(args):
    return _plotstuff_c.plot_index_init(args)

def plot_index_command(command, cmdargs, args, baton):
    return _plotstuff_c.plot_index_command(command, cmdargs, args, baton)

def plot_index_plot(command, cr, args, baton):
    return _plotstuff_c.plot_index_plot(command, cr, args, baton)

def plot_index_free(args, baton):
    return _plotstuff_c.plot_index_free(args, baton)

def plot_index_describe(p):
    return _plotstuff_c.plot_index_describe(p)
class plotxy_args(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    fn = property(_plotstuff_c.plotxy_args_fn_get, _plotstuff_c.plotxy_args_fn_set)
    ext = property(_plotstuff_c.plotxy_args_ext_get, _plotstuff_c.plotxy_args_ext_set)
    xcol = property(_plotstuff_c.plotxy_args_xcol_get, _plotstuff_c.plotxy_args_xcol_set)
    ycol = property(_plotstuff_c.plotxy_args_ycol_get, _plotstuff_c.plotxy_args_ycol_set)
    xoff = property(_plotstuff_c.plotxy_args_xoff_get, _plotstuff_c.plotxy_args_xoff_set)
    yoff = property(_plotstuff_c.plotxy_args_yoff_get, _plotstuff_c.plotxy_args_yoff_set)
    firstobj = property(_plotstuff_c.plotxy_args_firstobj_get, _plotstuff_c.plotxy_args_firstobj_set)
    nobjs = property(_plotstuff_c.plotxy_args_nobjs_get, _plotstuff_c.plotxy_args_nobjs_set)
    scale = property(_plotstuff_c.plotxy_args_scale_get, _plotstuff_c.plotxy_args_scale_set)
    xyvals = property(_plotstuff_c.plotxy_args_xyvals_get, _plotstuff_c.plotxy_args_xyvals_set)
    wcs = property(_plotstuff_c.plotxy_args_wcs_get, _plotstuff_c.plotxy_args_wcs_set)

    def set_filename(self, fn):
        return _plotstuff_c.plotxy_args_set_filename(self, fn)

    def __init__(self):
        _plotstuff_c.plotxy_args_swiginit(self, _plotstuff_c.new_plotxy_args())
    __swig_destroy__ = _plotstuff_c.delete_plotxy_args

# Register plotxy_args in _plotstuff_c:
_plotstuff_c.plotxy_args_swigregister(plotxy_args)

def plot_xy_get(pargs):
    return _plotstuff_c.plot_xy_get(pargs)

def plot_xy_init(args):
    return _plotstuff_c.plot_xy_init(args)

def plot_xy_setsize(args, xyargs):
    return _plotstuff_c.plot_xy_setsize(args, xyargs)

def plot_xy_clear_list(args):
    return _plotstuff_c.plot_xy_clear_list(args)

def plot_xy_set_xcol(args, col):
    return _plotstuff_c.plot_xy_set_xcol(args, col)

def plot_xy_set_ycol(args, col):
    return _plotstuff_c.plot_xy_set_ycol(args, col)

def plot_xy_set_filename(args, fn):
    return _plotstuff_c.plot_xy_set_filename(args, fn)

def plot_xy_set_wcs_filename(args, fn, ext):
    return _plotstuff_c.plot_xy_set_wcs_filename(args, fn, ext)

def plot_xy_set_offsets(args, xo, yo):
    return _plotstuff_c.plot_xy_set_offsets(args, xo, yo)

def plot_xy_command(command, cmdargs, args, baton):
    return _plotstuff_c.plot_xy_command(command, cmdargs, args, baton)

def plot_xy_plot(command, cairo, plotargs, baton):
    return _plotstuff_c.plot_xy_plot(command, cairo, plotargs, baton)

def plot_xy_free(args, baton):
    return _plotstuff_c.plot_xy_free(args, baton)

def plot_xy_vals(args, x, y):
    return _plotstuff_c.plot_xy_vals(args, x, y)

def plot_xy_describe(p):
    return _plotstuff_c.plot_xy_describe(p)
class plotradec_args(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    fn = property(_plotstuff_c.plotradec_args_fn_get, _plotstuff_c.plotradec_args_fn_set)
    ext = property(_plotstuff_c.plotradec_args_ext_get, _plotstuff_c.plotradec_args_ext_set)
    racol = property(_plotstuff_c.plotradec_args_racol_get, _plotstuff_c.plotradec_args_racol_set)
    deccol = property(_plotstuff_c.plotradec_args_deccol_get, _plotstuff_c.plotradec_args_deccol_set)
    firstobj = property(_plotstuff_c.plotradec_args_firstobj_get, _plotstuff_c.plotradec_args_firstobj_set)
    nobjs = property(_plotstuff_c.plotradec_args_nobjs_get, _plotstuff_c.plotradec_args_nobjs_set)
    radecvals = property(_plotstuff_c.plotradec_args_radecvals_get, _plotstuff_c.plotradec_args_radecvals_set)

    def set_filename(self, fn):
        return _plotstuff_c.plotradec_args_set_filename(self, fn)

    def __init__(self):
        _plotstuff_c.plotradec_args_swiginit(self, _plotstuff_c.new_plotradec_args())
    __swig_destroy__ = _plotstuff_c.delete_plotradec_args

# Register plotradec_args in _plotstuff_c:
_plotstuff_c.plotradec_args_swigregister(plotradec_args)

def plot_radec_get(pargs):
    return _plotstuff_c.plot_radec_get(pargs)

def plot_radec_reset(args):
    return _plotstuff_c.plot_radec_reset(args)

def plot_radec_init(args):
    return _plotstuff_c.plot_radec_init(args)

def plot_radec_set_racol(args, col):
    return _plotstuff_c.plot_radec_set_racol(args, col)

def plot_radec_set_deccol(args, col):
    return _plotstuff_c.plot_radec_set_deccol(args, col)

def plot_radec_set_filename(args, fn):
    return _plotstuff_c.plot_radec_set_filename(args, fn)

def plot_radec_command(command, cmdargs, args, baton):
    return _plotstuff_c.plot_radec_command(command, cmdargs, args, baton)

def plot_radec_count_inbounds(pargs, args):
    return _plotstuff_c.plot_radec_count_inbounds(pargs, args)

def plot_radec_plot(command, cairo, plotargs, baton):
    return _plotstuff_c.plot_radec_plot(command, cairo, plotargs, baton)

def plot_radec_free(args, baton):
    return _plotstuff_c.plot_radec_free(args, baton)

def plot_radec_vals(args, ra, dec):
    return _plotstuff_c.plot_radec_vals(args, ra, dec)

def plot_radec_describe(p):
    return _plotstuff_c.plot_radec_describe(p)
class plotmatch_args(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    matches = property(_plotstuff_c.plotmatch_args_matches_get, _plotstuff_c.plotmatch_args_matches_set)

    def __init__(self):
        _plotstuff_c.plotmatch_args_swiginit(self, _plotstuff_c.new_plotmatch_args())
    __swig_destroy__ = _plotstuff_c.delete_plotmatch_args

# Register plotmatch_args in _plotstuff_c:
_plotstuff_c.plotmatch_args_swigregister(plotmatch_args)

def plot_match_get(pargs):
    return _plotstuff_c.plot_match_get(pargs)

def plot_match_add_match(args, mo):
    return _plotstuff_c.plot_match_add_match(args, mo)

def plot_match_set_filename(args, filename):
    return _plotstuff_c.plot_match_set_filename(args, filename)

def plot_match_init(args):
    return _plotstuff_c.plot_match_init(args)

def plot_match_command(command, cmdargs, args, baton):
    return _plotstuff_c.plot_match_command(command, cmdargs, args, baton)

def plot_match_plot(command, cr, args, baton):
    return _plotstuff_c.plot_match_plot(command, cr, args, baton)

def plot_match_free(args, baton):
    return _plotstuff_c.plot_match_free(args, baton)

def plot_match_describe(p):
    return _plotstuff_c.plot_match_describe(p)
class annotation_args(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    NGC = property(_plotstuff_c.annotation_args_NGC_get, _plotstuff_c.annotation_args_NGC_set)
    constellations = property(_plotstuff_c.annotation_args_constellations_get, _plotstuff_c.annotation_args_constellations_set)
    constellation_lines = property(_plotstuff_c.annotation_args_constellation_lines_get, _plotstuff_c.annotation_args_constellation_lines_set)
    constellation_markers = property(_plotstuff_c.annotation_args_constellation_markers_get, _plotstuff_c.annotation_args_constellation_markers_set)
    constellation_labels = property(_plotstuff_c.annotation_args_constellation_labels_get, _plotstuff_c.annotation_args_constellation_labels_set)
    constellation_labels_long = property(_plotstuff_c.annotation_args_constellation_labels_long_get, _plotstuff_c.annotation_args_constellation_labels_long_set)
    constellation_lines_offset = property(_plotstuff_c.annotation_args_constellation_lines_offset_get, _plotstuff_c.annotation_args_constellation_lines_offset_set)
    constellation_pastel = property(_plotstuff_c.annotation_args_constellation_pastel_get, _plotstuff_c.annotation_args_constellation_pastel_set)
    bright = property(_plotstuff_c.annotation_args_bright_get, _plotstuff_c.annotation_args_bright_set)
    bright_labels = property(_plotstuff_c.annotation_args_bright_labels_get, _plotstuff_c.annotation_args_bright_labels_set)
    bright_pastel = property(_plotstuff_c.annotation_args_bright_pastel_get, _plotstuff_c.annotation_args_bright_pastel_set)
    HD = property(_plotstuff_c.annotation_args_HD_get, _plotstuff_c.annotation_args_HD_set)
    HD_labels = property(_plotstuff_c.annotation_args_HD_labels_get, _plotstuff_c.annotation_args_HD_labels_set)
    ngc_fraction = property(_plotstuff_c.annotation_args_ngc_fraction_get, _plotstuff_c.annotation_args_ngc_fraction_set)
    targets = property(_plotstuff_c.annotation_args_targets_get, _plotstuff_c.annotation_args_targets_set)
    hd_catalog = property(_plotstuff_c.annotation_args_hd_catalog_get, _plotstuff_c.annotation_args_hd_catalog_set)

    def add_target(self, ra, dec, name):
        return _plotstuff_c.annotation_args_add_target(self, ra, dec, name)

    def add_named_target(self, name):
        return _plotstuff_c.annotation_args_add_named_target(self, name)

    def clear_targets(self):
        return _plotstuff_c.annotation_args_clear_targets(self)

    def __init__(self):
        _plotstuff_c.annotation_args_swiginit(self, _plotstuff_c.new_annotation_args())
    __swig_destroy__ = _plotstuff_c.delete_annotation_args

# Register annotation_args in _plotstuff_c:
_plotstuff_c.annotation_args_swigregister(annotation_args)

def plot_annotations_init(args):
    return _plotstuff_c.plot_annotations_init(args)

def plot_annotations_get(pargs):
    return _plotstuff_c.plot_annotations_get(pargs)

def plot_annotations_command(command, cmdargs, args, baton):
    return _plotstuff_c.plot_annotations_command(command, cmdargs, args, baton)

def plot_annotations_plot(command, cr, args, baton):
    return _plotstuff_c.plot_annotations_plot(command, cr, args, baton)

def plot_annotations_free(args, baton):
    return _plotstuff_c.plot_annotations_free(args, baton)

def plot_annotations_set_hd_catalog(ann, hdfn):
    return _plotstuff_c.plot_annotations_set_hd_catalog(ann, hdfn)

def plot_annotations_add_named_target(ann, target):
    return _plotstuff_c.plot_annotations_add_named_target(ann, target)

def plot_annotations_add_target(ann, ra, dec, name):
    return _plotstuff_c.plot_annotations_add_target(ann, ra, dec, name)

def plot_annotations_clear_targets(ann):
    return _plotstuff_c.plot_annotations_clear_targets(ann)

def plot_annotations_describe(p):
    return _plotstuff_c.plot_annotations_describe(p)
class plothealpix_args(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    nside = property(_plotstuff_c.plothealpix_args_nside_get, _plotstuff_c.plothealpix_args_nside_set)
    stepsize = property(_plotstuff_c.plothealpix_args_stepsize_get, _plotstuff_c.plothealpix_args_stepsize_set)

    def __init__(self):
        _plotstuff_c.plothealpix_args_swiginit(self, _plotstuff_c.new_plothealpix_args())
    __swig_destroy__ = _plotstuff_c.delete_plothealpix_args

# Register plothealpix_args in _plotstuff_c:
_plotstuff_c.plothealpix_args_swigregister(plothealpix_args)

def plot_healpix_get(pargs):
    return _plotstuff_c.plot_healpix_get(pargs)

def plot_healpix_init(args):
    return _plotstuff_c.plot_healpix_init(args)

def plot_healpix_command(command, cmdargs, args, baton):
    return _plotstuff_c.plot_healpix_command(command, cmdargs, args, baton)

def plot_healpix_plot(command, cr, args, baton):
    return _plotstuff_c.plot_healpix_plot(command, cr, args, baton)

def plot_healpix_free(args, baton):
    return _plotstuff_c.plot_healpix_free(args, baton)

def plot_healpix_describe(p):
    return _plotstuff_c.plot_healpix_describe(p)
CAIRO_OPERATOR_CLEAR = _plotstuff_c.CAIRO_OPERATOR_CLEAR
CAIRO_OPERATOR_SOURCE = _plotstuff_c.CAIRO_OPERATOR_SOURCE
CAIRO_OPERATOR_OVER = _plotstuff_c.CAIRO_OPERATOR_OVER
CAIRO_OPERATOR_IN = _plotstuff_c.CAIRO_OPERATOR_IN
CAIRO_OPERATOR_OUT = _plotstuff_c.CAIRO_OPERATOR_OUT
CAIRO_OPERATOR_ATOP = _plotstuff_c.CAIRO_OPERATOR_ATOP
CAIRO_OPERATOR_DEST = _plotstuff_c.CAIRO_OPERATOR_DEST
CAIRO_OPERATOR_DEST_OVER = _plotstuff_c.CAIRO_OPERATOR_DEST_OVER
CAIRO_OPERATOR_DEST_IN = _plotstuff_c.CAIRO_OPERATOR_DEST_IN
CAIRO_OPERATOR_DEST_OUT = _plotstuff_c.CAIRO_OPERATOR_DEST_OUT
CAIRO_OPERATOR_DEST_ATOP = _plotstuff_c.CAIRO_OPERATOR_DEST_ATOP
CAIRO_OPERATOR_XOR = _plotstuff_c.CAIRO_OPERATOR_XOR
CAIRO_OPERATOR_ADD = _plotstuff_c.CAIRO_OPERATOR_ADD
CAIRO_OPERATOR_SATURATE = _plotstuff_c.CAIRO_OPERATOR_SATURATE
CAIRO_OPERATOR_MULTIPLY = _plotstuff_c.CAIRO_OPERATOR_MULTIPLY
CAIRO_OPERATOR_SCREEN = _plotstuff_c.CAIRO_OPERATOR_SCREEN
CAIRO_OPERATOR_OVERLAY = _plotstuff_c.CAIRO_OPERATOR_OVERLAY
CAIRO_OPERATOR_DARKEN = _plotstuff_c.CAIRO_OPERATOR_DARKEN
CAIRO_OPERATOR_LIGHTEN = _plotstuff_c.CAIRO_OPERATOR_LIGHTEN
CAIRO_OPERATOR_COLOR_DODGE = _plotstuff_c.CAIRO_OPERATOR_COLOR_DODGE
CAIRO_OPERATOR_COLOR_BURN = _plotstuff_c.CAIRO_OPERATOR_COLOR_BURN
CAIRO_OPERATOR_HARD_LIGHT = _plotstuff_c.CAIRO_OPERATOR_HARD_LIGHT
CAIRO_OPERATOR_SOFT_LIGHT = _plotstuff_c.CAIRO_OPERATOR_SOFT_LIGHT
CAIRO_OPERATOR_DIFFERENCE = _plotstuff_c.CAIRO_OPERATOR_DIFFERENCE
CAIRO_OPERATOR_EXCLUSION = _plotstuff_c.CAIRO_OPERATOR_EXCLUSION
CAIRO_OPERATOR_HSL_HUE = _plotstuff_c.CAIRO_OPERATOR_HSL_HUE
CAIRO_OPERATOR_HSL_SATURATION = _plotstuff_c.CAIRO_OPERATOR_HSL_SATURATION
CAIRO_OPERATOR_HSL_COLOR = _plotstuff_c.CAIRO_OPERATOR_HSL_COLOR
CAIRO_OPERATOR_HSL_LUMINOSITY = _plotstuff_c.CAIRO_OPERATOR_HSL_LUMINOSITY

def image_debug(img, W, H):
    return _plotstuff_c.image_debug(img, W, H)

def image_add(img, W, H, val):
    return _plotstuff_c.image_add(img, W, H, val)

def image_weighted_smooth(img, W, H, weight, sigma):
    return _plotstuff_c.image_weighted_smooth(img, W, H, weight, sigma)

def plotoutline_setattr(self, name, val):
    if name == 'wcs_file':
        if type(val) is tuple:
            (fn,ext) = val
        else:
            fn = val
            ext = 0
        plot_outline_set_wcs_file(self, fn, ext)
        return
    self.__swig__setattr__(name, val)

plotoutline_args.__swig__setattr__ = plotoutline_args.__setattr__
plotoutline_args.__setattr__ = plotoutline_setattr


def plotimage_set_image_from_numpy(self, img):
    rtn = self._set_image_from_numpy(img)
    if rtn:
        raise RuntimeError('set_image_from_numpy() failed')
plotimage_args.set_image_from_numpy = plotimage_set_image_from_numpy


