# 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: photometry/quality.py
# class PixelQualityFlags(QualityFlagsBase):
# 	"""
# 	This class encodes the meaning of the various TESS QUALITY bitmask flags.
# 	"""
# 	NotUsedForBackground = 1
# 	ManualExclude = 2
# 	BackgroundShenanigans = 4
# 
# 	# Default bitmask
# 	DEFAULT_BITMASK = (ManualExclude)
# 
# 	# Pretty string descriptions for each flag
# 	STRINGS = {
# 		NotUsedForBackground: "Pixel was not used in background calculation",
# 		ManualExclude: "Manual exclude",
# 		BackgroundShenanigans: "Background Shenanigans detected in pixel",
# 	}


import numpy as np
import h5py
import sys
import os.path
from photometry.plots import plt, plot_image, matplotlib
from photometry.quality import PixelQualityFlags
from matplotlib.colors import ListedColormap
from rasterize_and_save import rasterize_and_save
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Code to generate plot for Photometry Paper.

.. codeauthor:: Rasmus Handberg <rasmush@phys.au.dk>
"""

sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
matplotlib.rcParams['font.family'] = 'serif'
matplotlib.rcParams['font.size'] = '14'

# 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: photometry/quality.py
# class PixelQualityFlags(QualityFlagsBase):
# 	"""
# 	This class encodes the meaning of the various TESS QUALITY bitmask flags.
# 	"""
# 	NotUsedForBackground = 1
# 	ManualExclude = 2
# 	BackgroundShenanigans = 4
# 
# 	# Default bitmask
# 	DEFAULT_BITMASK = (ManualExclude)
# 
# 	# Pretty string descriptions for each flag
# 	STRINGS = {
# 		NotUsedForBackground: "Pixel was not used in background calculation",
# 		ManualExclude: "Manual exclude",
# 		BackgroundShenanigans: "Background Shenanigans detected in pixel",
# 	}


# Path: notes/paper_plot_backgrounds.py
import numpy as np
import h5py
import sys
import os.path
from photometry.plots import plt, plot_image, matplotlib
from photometry.quality import PixelQualityFlags
from matplotlib.colors import ListedColormap
from rasterize_and_save import rasterize_and_save

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Code to generate plot for Photometry Paper.

.. codeauthor:: Rasmus Handberg <rasmush@phys.au.dk>
"""

sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
matplotlib.rcParams['font.family'] = 'serif'
matplotlib.rcParams['font.size'] = '14'

matplotlib.rcParams['axes.titlesize'] = '18'