# Path: photometry/plots.py
# def plots_interactive(backend=('Qt5Agg', 'MacOSX', 'Qt4Agg', 'Qt5Cairo', 'TkAgg')):
# def plots_noninteractive():
# def plot_image(image, ax=None, scale='log', cmap=None, origin='lower', xlabel=None,
# 	ylabel=None, cbar=None, clabel='Flux ($e^{-}s^{-1}$)', cbar_ticks=None,
# 	cbar_ticklabels=None, cbar_pad=None, cbar_size='5%', title=None,
# 	percentile=95.0, vmin=None, vmax=None, offset_axes=None, color_bad='k', **kwargs):
# def plot_image_fit_residuals(fig, image, fit, residuals=None, percentile=95.0):
# def plot_outline(img, ax=None, threshold=0.5, **kwargs):
# def save_figure(path, fig=None, fmt='png', **kwargs):


import pytest
import os.path
import numpy as np
import conftest # noqa: F401
from scipy.stats import multivariate_normal
from photometry.plots import plt, plot_image, plot_image_fit_residuals, plots_interactive
	return fig

#--------------------------------------------------------------------------------------------------
@pytest.mark.mpl_image_compare(**kwargs)
def test_plot_image_grid():

	img = np.zeros((5,7))
	img[:,0] = 1
	img[0,:] = 1
	img[:,-1] = 1
	img[-1,:] = 1

	fig = plt.figure()
	ax = fig.add_subplot(111)
	plot_image(img, ax=ax, scale='linear')
	ax.plot(0.5, 0.5, 'r+')
	ax.plot(5.5, 3.5, 'g+')
	ax.grid(True)
	return fig

#--------------------------------------------------------------------------------------------------
@pytest.mark.mpl_image_compare(**kwargs)
def test_plot_image_grid_offset():

	img = np.zeros((5,7))
	img[:,0] = 1
	img[0,:] = 1
	img[:,-1] = 1
	img[-1,:] = 1


# Path: photometry/plots.py
# def plots_interactive(backend=('Qt5Agg', 'MacOSX', 'Qt4Agg', 'Qt5Cairo', 'TkAgg')):
# def plots_noninteractive():
# def plot_image(image, ax=None, scale='log', cmap=None, origin='lower', xlabel=None,
# 	ylabel=None, cbar=None, clabel='Flux ($e^{-}s^{-1}$)', cbar_ticks=None,
# 	cbar_ticklabels=None, cbar_pad=None, cbar_size='5%', title=None,
# 	percentile=95.0, vmin=None, vmax=None, offset_axes=None, color_bad='k', **kwargs):
# def plot_image_fit_residuals(fig, image, fit, residuals=None, percentile=95.0):
# def plot_outline(img, ax=None, threshold=0.5, **kwargs):
# def save_figure(path, fig=None, fmt='png', **kwargs):


# Path: tests/test_plots.py
import pytest
import os.path
import numpy as np
import conftest # noqa: F401
from scipy.stats import multivariate_normal
from photometry.plots import plt, plot_image, plot_image_fit_residuals, plots_interactive

	return fig

#--------------------------------------------------------------------------------------------------
@pytest.mark.mpl_image_compare(**kwargs)
def test_plot_image_grid():

	img = np.zeros((5,7))
	img[:,0] = 1
	img[0,:] = 1
	img[:,-1] = 1
	img[-1,:] = 1

	fig = plt.figure()
	ax = fig.add_subplot(111)
	plot_image(img, ax=ax, scale='linear')
	ax.plot(0.5, 0.5, 'r+')
	ax.plot(5.5, 3.5, 'g+')
	ax.grid(True)
	return fig

#--------------------------------------------------------------------------------------------------
@pytest.mark.mpl_image_compare(**kwargs)
def test_plot_image_grid_offset():

	img = np.zeros((5,7))
	img[:,0] = 1
	img[0,:] = 1
	img[:,-1] = 1
	img[-1,:] = 1


	fig = plt.figure()