astro.plot package

Submodules

astro.plot.AstrometryPlot module

AstrometryPlot, plot astrometry residuals

class astro.plot.AstrometryPlot.AllGAstromOverlapPlot

Bases: astro.plot.AstrometryPlot.GAstromOverlapPlot

This class plots ALL global astrometry residuals of overlap-paired sources in one plot.

get_plist_clist()

Creates the lists of pointings and chips.

save(c)

Save the GAstrometric overlap residuals plot.

title()

Make the title of the GAstrometric overlap residuals plot.

class astro.plot.AstrometryPlot.AllGAstromResidualsPlot

Bases: astro.plot.AstrometryPlot.GAstromResidualsPlot

This class plots ALL global astrometry residuals of reference-paired sources in one plot.

get_plist_clist()

Creates the lists of pointings and chips.

save(c)

Save the GAstrometric reference residuals plot.

title()

Make the title of the GAstrometric reference residuals plot.

class astro.plot.AstrometryPlot.AstromResidualsPlot

Bases: astro.plot.AstrometryPlot.AstrometricPlot

This class plots the residuals obtained from astrometric pairing of extracted sources in one frame with either a reference catalog or another frame’s extracted sources. The residuals will be plotted on a chip-by-chip basis if more than one chip exists (e.g., GAstrom residuals).

astrom = None
clist = {}
data = {}
figtext = []
get_figure(c)

Method to create an individual figure.

get_panel(xname, yname, axes, xlabel=None, ylabel=None, aspect=None, range=None, domain=None, cross=(None, None), reverse=(0, 0), hist=(0, 0), bin_size=0.01)

Get a panel for an AstrometricPlot.

xname = X data list key yname = Y data list key axes = an axis list [left, bottom, width, height] xlabel = panel-specific X axis label ylabel = panel-specific Y axis label aspect = fixed aspect ratio (range set to largest of x or y range,

default is not fixed)

range = tuple of (xmin, xmax) to manually set the X-range domain = tuple of (ymin, ymax) to manually set the Y-range cross = put a dotted line at one or both axis at the specified

value determined by a tuple of values: (x_value,y_value). An empty tuple means no lines.
reverse = reverse the axis order of either axis based on the values
in a tuple: (x,y), where x or y is 0 or 1.
hist = draw a histogram of the data plotted in one or both axes
as indicated by a tuple of values: (x,y), where x or y is 0 or 1.

bin_size = size (in arcsec) of an individual histogram bin

get_plist_clist()

Creates the lists of pointings and chips.

parse_data(c)

Parse the individual data arrays and create the arrays to be plotted such that only the reference pairs from one chip are included.

plist = []
plot_residuals()

Plots the residuals for a (G)Astrometric inspect() method.

The plots generated by this method have the following properties:

  • The plot title with Chip_Indexn, where n is the chip index number, and a base name derived from the source (G)Astrometric object.

  • 5 panels arranged vertically - The top panel is fixed aspect ratio of 1:1 and plots DDEC vs.

    DRA.

    • The lower 4 panels plot DRA vs. RA, DDEC vs. RA, DRA vs. DEC, and DDEC vs. DEC, respectively.
  • Above the top panel is the DATE_OBS (if applicable), Chip index number, and calculated plot statistics: - <RA> = mean RA of plotted points - <DEC> = mean DEC of plotted points - <DRA> = mean RA residual +- sample standard deviation - <DDEC> = mean DEC residual +- sample standard deviation - N = total number of points plotted in panel - RMS = root mean square of the magnitude of the residuals - Max = maximum magnitude of the residuals NOTE: ALL statistical values are calculated from the data plotted

    and are not taken from the (G)Astrometric object.

  • When there is only one chip and pointing in the residuals catalog (e.g., single-chip astrometry), those residuals are plotted in one figure. When there are multiple chips and pointings (e.g., global astrometry of a dither), all pointings of each chips are plotted in one figure (i.e., 8 chips, 8 figures) with individual pointings plotted in a unique color.

  • The top panel also contains histograms using connected lines instead of boxes. When there is more than one histogram plotted, their peaks are independently normalized and NOT scaled relative to each other to enhance readability.

  • In addition to the multiple GAstrometric residuals and overlap plots, a summary plot containing ALL the chips and pointings is created for the residuals and for the overlap. In the case of the single-chip solution, these plots are not applicable.

residuals = {}
save(c)

Save the residuals plot.

show(astrom)

AstrometricResidualsPlot show() method:

astrom = AstrometricParameters or GAstrometric instance

Sets default plot parameters and calls main plotting routine.

title()

Make the title of the AstrometricParameters residuals plot.

class astro.plot.AstrometryPlot.AstromResidualsPlotParameters

Bases: astro.plot.AstrometryPlot.PlotParameters

PlotParameters specific to an astrometric residuals plot.

DATADICT = {'CHIP1': None, 'CHIP2': None, 'DDec': None, 'DRa': None, 'Dec': None, 'POINTING1': None, 'POINTING2': None, 'Ra': None, 'SLID2': None}
SLID = -1
class astro.plot.AstrometryPlot.AstrometricPlot

Bases: object

This abstract base class defines functionality common to all AstrometricPlots.

add_figtext(fig)

Add text to the figure fig based on criteria given in a list:

figtext = [[[xpos,ypos], text_string, text_color, fontsize, alignment],
[[xpos,ypos], text_string, text_color, fontsize, alignment], … [[xpos,ypos], text_string, text_color, fontsize, alignment]]

[xpos, ypos] = X and Y positions relative to current axes [0..1] text_string = any valid Python string to be drawn alignment = horizontal alignment of the text_string

check_preconditions()

Check to see if the residuals catalog exists and if certain plot parameters need to be determined.

cleanup()

Run clean-up routines such as closing the Figure instance.

get_data(datfile)

Gets data from a catalog associated with a (G)Astrometric object.

plot_params = None
save_as(filename)

Save the residuals plot to filename.

show(*args, **kw)

Generic AstrometricPlot show() method.

exception astro.plot.AstrometryPlot.AstrometricPlotError

Bases: Exception

class astro.plot.AstrometryPlot.CoaddOverlapPlot

Bases: astro.plot.AstrometryPlot.RegridOverlapPlot

This class plots RegriddedFrame astrometry residuals of overlap- paired sources in the source RegriddedFrames with respect to the CoaddedRegriddedFrame positions.

get_plist_clist()

Creates the lists of pointings and chips.

parse_data(c)

Parse the individual data arrays and create the arrays to be plotted such that only overlap pairs are plotted (i.e., no associations with reference stars).

save(c)

Save the Coadd overlap residuals plot.

title()

Make the title of the Coadd overlap residuals plot.

class astro.plot.AstrometryPlot.CoaddOverlapPlotParameters

Bases: astro.plot.AstrometryPlot.RegridOverlapPlotParameters

PlotParameters specific to a coadd overlap plot.

class astro.plot.AstrometryPlot.GAstromOverlapPlot

Bases: astro.plot.AstrometryPlot.AstromResidualsPlot

This class plots global astrometry residuals of overlap-paired sources.

get_plist_clist()

Creates the lists of pointings and chips.

parse_data(c)

Parse the individual data arrays and create the arrays to be plotted such that only overlap pairs are plotted (i.e., no associations with reference stars).

save(c)

Save the GAstrometric overlap residuals plot.

title()

Make the title of the GAstrometric overlap residuals plot.

class astro.plot.AstrometryPlot.GAstromOverlapPlotParameters

Bases: astro.plot.AstrometryPlot.PlotParameters

PlotParameters specific to a global astrometric overlap plot.

DATADICT = {'CHIP1': None, 'CHIP2': None, 'DDec': None, 'DRa': None, 'Dec': None, 'POINTING1': None, 'POINTING2': None, 'Ra': None, 'SLID2': None}
class astro.plot.AstrometryPlot.GAstromResidualsPlot

Bases: astro.plot.AstrometryPlot.AstromResidualsPlot

This class plots global astrometry residuals of reference-paired sources.

parse_data(c)

Parse the individual data arrays and create the arrays to be plotted such that only the reference pairs from one chip are included in the case of individual plots, all chips in the case of “All” plots.

save(c)

Save the GAstrometric reference residuals plot.

title()

Make the title of the GAstrometric reference residuals plot.

class astro.plot.AstrometryPlot.NullPlot

Bases: object

This plot instance is returned when plot cannot be made.

show(*args, **kw)
class astro.plot.AstrometryPlot.PlotParameters

Bases: object

Abstract base class defining parameters common to all AstrometricPlots.

DATADICT = dictionary with keys set to the column entries to be
retrieved and values set to ‘[]’ or ‘None’

MARGIN = data margin to edge of axes as a percentage (0.15=15%) RANGE = a tuple defining (xmin, xmax) of DRA, overriding automatic

width determination (does not affect RA, DEC)
DOMAIN = a tuple defining (ymin, ymax) of DDEC, overriding automatic
height determination (does not affect RA, DEC)

MARKER = plot symbol style MARKERSIZE = plot symbol point size FONTSIZE = base font size for all text COLOR = plot symbol color TEXT_COLOR = color of text inside plots TABLE_NAME = name of binary FITS table to extract DIRECTORY = directory to store any saved files in. BASE_NAME = identifying name for use in titles, output filenames, etc. DATE_OBS = observation date of source frame (if applicable) VERBOSE = verbosity level: 0 - no plots/text shown

1 - only some text shown 2 - normal text and plots shown 3 - ALL text and plots shown
BASE_NAME = None
COLOR = ['#000000', '#800000', '#008000', '#000080', '#800080', '#008080', '#808000', '#f00000', '#00f000', '#0000f0', '#f000f0', '#00f0f0', '#f0f000', '#f0f0f0']
DATADICT = {'CHIP1': None, 'CHIP2': None, 'DDec': None, 'DRa': None, 'Dec': None, 'POINTING1': None, 'POINTING2': None, 'Ra': None, 'SLID1': None, 'SLID2': None}
DATE_OBS = None
DIRECTORY = '.'
DOMAIN = None
EXTENSION = 'png'
FONTSIZE = 8
KAPPA = 3.0
LEGEND = True
MARGIN = 0.1
MARKER = '.'
MARKERSIZE = 1
RANGE = None
TABLE_NAME = 'RESIDUALS'
TEXT_COLOR = 'b'
VERBOSE = 2
WIDTH_FILE = 255
WIDTH_PLOT = 60
info()
class astro.plot.AstrometryPlot.RegridOverlapPlot

Bases: astro.plot.AstrometryPlot.AllGAstromOverlapPlot

This class plots RegriddedFrame astrometry residuals of overlap- paired sources in the source RegriddedFrames.

get_plist_clist()

Creates the lists of pointings and chips.

parse_data(c)

Parse the individual data arrays and create the arrays to be plotted such that only overlap pairs are plotted (i.e., no associations with reference stars).

save(c)

Save the Regrid overlap residuals plot.

title()

Make the title of the Regrid overlap residuals plot.

class astro.plot.AstrometryPlot.RegridOverlapPlotParameters

Bases: astro.plot.AstrometryPlot.GAstromOverlapPlotParameters

PlotParameters specific to a regrid overlap plot.

astro.plot.AstrometryPlot.create_plot(plot_name)

An instance of the appropriate Plot object should be retrieved through this factory (currently: AstResiduals, GASResiduals, AllGASResiduals, OvrResiduals, AllOvrResiduals).

astro.plot.AstrometryPlot.fit_gaussian(xdata, ydata, kappa=0, external_gaussfit='')

Fit data to a Gaussian (normal) distribution profile.

xdata: array in x-direction ydata: array in y-direction kappa: iteratively clip the ends of the profile at kappa*sigma (a

value of 0 disables clipping)
external_gaussfit: name of the external program to run the gaussian
profile fit

Returns (xdata_fit, ydata_fit, x0, ymax, sigma_fit, fwhm_fit), where:

xdata_fit: x-direction data (pass-through of xdata if kappa=0) ydata_fit: y-direction data fit to a smooth Gaussian

x0: center position of the Gaussian

ymax: maximum y-value of Gaussian

sigma_fit: sigma value of Gaussian
fwhm_fit: full width at half maximum of Gaussian
astro.plot.AstrometryPlot.fix_filename(name, alt='_')

Replace characters that cannot exist in a filename with the string alt, and return the new filename.

astro.plot.AstrometryPlot.histogram(y, bins=10, normed=0)

Return the histogram of y with bins equally sized bins. If bins is an array, use the bins. Return value is (n,x) where n is the count for each bin in x

If normed is False, return the counts in the first element of the return tuple. If normed is True, return the probability density n/(len(y)*dbin)

If y has rank>1, it will be raveled. If y is masked, only the unmasked values will be used. Credits: the Numeric 22 documentation

astro.plot.AstrometryStatistics module

Plot astrometry statistics

class astro.plot.AstrometryStatistics.AstrometryStatistics(red_filenames=[], object_ids=[], instrument=None, filter=None, chip=None, creation_date=None, is_valid=1, quality_flags=0, nref_range=(15, 1200), noverlap_range=(0, 0), astrom=True, gastrom=True, reduced_props=False, project_only=False)

Bases: object

Acquire astrometric statistical data from the database and plot it in a number of ways.

This class allows compilation of astrometrical data from the database in a form ready to be plotted. The data can be accessed via the “data” parameter which is a dictionary containing numerical Python arrays whose keys are the persistent_properties names. This compilation is performed by the “compile” method.

This class also contains several plotting routines for specific types of plots. See the plot_* methods’ documentation for details.

Examples:

awe> from astro.plot.AstrometryStatistics import AstrometryStatistics awe> as = AstrometryStatistics(instrument=’WFI’) awe> as.compile() # This will take a minute. awe> as.plot(‘NREF’, ‘field_err’) awe> as.plot_histogram(‘NREF’, max=2000) awe> as.plot_ranks()
ap_persistent_properties = ['CD1_1', 'CD1_2', 'CD2_1', 'CD2_2', 'CRPIX1', 'CRPIX2', 'CRVAL1', 'CRVAL2', 'MEAN_DDEC', 'MEAN_DDEC_OVERLAP', 'MEAN_DRA', 'MEAN_DRA_OVERLAP', 'NFITPARM', 'NREF', 'N_OVERLAP', 'PV1_0', 'PV1_1', 'PV1_2', 'PV1_3', 'PV1_4', 'PV1_5', 'PV1_6', 'PV1_7', 'PV1_8', 'PV1_9', 'PV1_10', 'PV2_0', 'PV2_1', 'PV2_2', 'PV2_3', 'PV2_4', 'PV2_5', 'PV2_6', 'PV2_7', 'PV2_8', 'PV2_9', 'PV2_10', 'RMS', 'RMS_OVERLAP', 'SEEING', 'SIG_DDEC', 'SIG_DDEC_OVERLAP', 'SIG_DRA', 'SIG_DRA_OVERLAP', 'field_err', 'is_valid', 'quality_flags', 'x_err', 'xx_err', 'xy_err', 'y_err', 'yy_err']
attr = '[arcsec]'
compile()
construct_data_arrays()
plot(x_axis, y_axis, range=None, domain=None, filename=None, finite=True)

Generic plot routine.

x_axis: name of persistent property to plot along X-axis y_axis: name of persistent property to plot along Y-axis

range: plot range of X-axis in a tuple (min, max)

domain: plot range of Y-axis in a tuple (min, max)

filename: name of file to write plot to (.png or .ps)
finite: filter to retain only finite values
plot_compare(*args, **kwargs)
plot_delta(x_axis=None, y_axis=None, common='filename', range=None, domain=None, show=True, filename=None, finite=True)

Plot the deltas between two elements of two properties that share a common third property. For example, plot SIG_DRA_1 - SIG_DRA_0 versus SIG_DDEC_1 - SIG_DDEC_0, where the operands share a common filename.

x_axis: name of persistent property to plot along X-axis y_axis: name of persistent property to plot along Y-axis common: name of persistent property common to both

range: plot range of X-axis in a tuple (min, max)

domain: plot range of Y-axis in a tuple (min, max)

filename: name of file to write plot to (.png or .ps)
finite: filter to retain only finite values
NOTE: Only common property elements with exactly two entries will
have their differences be plotted.
plot_histogram(property=None, min=None, max=None, bins=100, range=None, domain=None, show=True, filename=None, finite=True)

Plot a histogram of a given persistent property.

property: name of persistent property (if None, RMS is used)
min: minimum value of property to consider min: maximum value of property to consider

bins: number of bins to plot

range: plot range of X-axis in a tuple (min, max)

domain: plot range of Y-axis in a tuple (min, max)

filename: name of file to write plot to (.png or .ps)
finite: filter to retain only finite values
plot_ranks(property=None, range=5, stride=0.1, domain=(80, 100), show=True, filename=None, finite=True)

Plot the percentile ranks of the requested persistent property (RMS if None) of the sample.

property: name of persistent property (if None, RMS is used)
range: range of data to consider

stride: effective bin size of the sample domain: tuple of percentages (low, high) to be plotted

filename: name of file to write plot to (.png or .ps)
finite: filter to retain only finite values

The line plotted here represents the percentage of RMSs that are lower in value than the given RMS. The 99th and 99.9th percentile are indicated by a red dashed and a red dotted line respectively.

prop = 'psf_radius'
query_database()
red_persistent_properties = ['AIRMEND', 'AIRMSTRT', 'EXPTIME', 'NAXIS1', 'NAXIS2', 'psf_radius']
units_dict = {'AIRMEND': '', 'AIRMSTRT': '', 'CD1_1': '[deg]', 'CD1_2': '[deg]', 'CD2_1': '[deg]', 'CD2_2': '[deg]', 'CRPIX1': '[pixel]', 'CRPIX2': '[pixel]', 'CRVAL1': '[deg]', 'CRVAL2': '[deg]', 'EXPTIME': '[sec]', 'MEAN_DDEC': '[arcsec]', 'MEAN_DDEC_OVERLAP': '[arcsec]', 'MEAN_DRA': '[arcsec]', 'MEAN_DRA_OVERLAP': '[arcsec]', 'NAXIS1': '[pixel]', 'NAXIS2': '[pixel]', 'NFITPARM': '', 'NREF': '', 'N_OVERLAP': '', 'PV1_0': '', 'PV1_1': '', 'PV1_10': '', 'PV1_2': '', 'PV1_3': '', 'PV1_4': '', 'PV1_5': '', 'PV1_6': '', 'PV1_7': '', 'PV1_8': '', 'PV1_9': '', 'PV2_0': '', 'PV2_1': '', 'PV2_10': '', 'PV2_2': '', 'PV2_3': '', 'PV2_4': '', 'PV2_5': '', 'PV2_6': '', 'PV2_7': '', 'PV2_8': '', 'PV2_9': '', 'RMS': '[arcsec]', 'RMS_OVERLAP': '[arcsec]', 'SEEING': '[arcsec]', 'SIG_DDEC': '[arcsec]', 'SIG_DDEC_OVERLAP': '[arcsec]', 'SIG_DRA': '[arcsec]', 'SIG_DRA_OVERLAP': '[arcsec]', 'field_err': '[arcsec]', 'is_valid': '', 'psf_radius': '[arcsec]', 'quality_flags': '', 'x_err': '[arcsec]', 'xx_err': '[arcsec]', 'xy_err': '[arcsec]', 'y_err': '[arcsec]', 'yy_err': '[arcsec]'}
exception astro.plot.AstrometryStatistics.AstrometryStatisticsError

Bases: Exception

astro.plot.AstrometryStatistics.capture_key_press()

astro.plot.ColdPixelsPlot module

class astro.plot.ColdPixelsPlot.ColdPixelsPlot(coldpixelmaps=[], date_range=(), filename='', interactive=True)

Bases: astro.plot.OCAMMosaicPlot.OCAMMosaicPlot

Plot an overview of cold pixel numbers in a representation of the OmegaCAM mosaic.

The plot takes as input a list of ColdPixelMap objects

color_map = {'OCAM_B_JOHN': '#feb289', 'OCAM_H_ALPHA': '#fe81b6', 'OCAM_V_JOHN': '#c3feb4', 'OCAM_g_SDSS': 'g', 'OCAM_i_SDSS': 'y', 'OCAM_r_SDSS': 'r', 'OCAM_u_SDSS': 'b', 'OCAM_u_g_r_i_SDSS': 'm', 'OCAM_v_STRM': '#b18cfe', 'OCAM_z_SDSS': 'c'}
get_data_from_date_range()
get_data_from_objects()
individual_ylim = True
label_map = {'OCAM_B_JOHN': 'B', 'OCAM_H_ALPHA': 'Halpha', 'OCAM_V_JOHN': 'V', 'OCAM_g_SDSS': "g'", 'OCAM_i_SDSS': "i'", 'OCAM_r_SDSS': "r'", 'OCAM_u_SDSS': "u'", 'OCAM_u_g_r_i_SDSS': 'ugri', 'OCAM_v_STRM': 'v', 'OCAM_z_SDSS': "z'"}
plot_data()
title = 'Cold pixels'
xlabel = 'DATE-OBS'
ylabel = 'Count'

astro.plot.CrossTalkPlot module

class astro.plot.CrossTalkPlot.CrossTalkHistogram

Bases: object

add_title()
make()
class astro.plot.CrossTalkPlot.CrossTalkPlot(crosstalk)

Bases: object

add_created()

Place “created” information in bottom left corner

add_date_obs()
add_title()
individual_xlim = True
individual_ylim = True
make()
plot_data()
plot_data_subplot(i, j)

Extract crosstalk values between CCD “i” and “j” from crosstalk object and plot in a subplot.

In order to plot results on top of real data the filtering steps done in the derivation in CrossTalk need to be repeated, because this kind of data is not stored in the CrossTalk class (nor should it).

save()
set_labels()

Set the x-label and y-label

set_limits()

Set the limits on the x-axes and y-axis of the subplots

xlabel = 'Pixel value in the source CCD [ADU]'
xlim = (0, 65535)
ylabel = 'Offset from median in the target CCD [ADU]'
ylim = (-500, 350)

astro.plot.CrossTalkPlotSingle module

class astro.plot.CrossTalkPlotSingle.CrossTalkHistogram

Bases: object

add_title()
make()
class astro.plot.CrossTalkPlotSingle.CrossTalkPlotSingle(crosstalk)

Bases: object

add_created()

Place “created” information in bottom left corner

add_date_obs()
add_title()
individual_xlim = True
individual_ylim = True
make()
plot_data()
plot_data_subplot(i, j)

Extract crosstalk values between CCD “i” and “j” from crosstalk object and plot in a subplot.

In order to plot results on top of real data the filtering steps done in the derivation in CrossTalk need to be repeated, because this kind of data is not stored in the CrossTalk class (nor should it).

save()
set_labels()

Set the x-label and y-label

set_limits()

Set the limits on the x-axes and y-axis of the subplots

xlabel = 'Pixel value in CCD #96 [ADU]'
xlim = (0, 65535)
ylabel = 'Offset from background in CCD #95 [ADU]'
ylim = (-100, 300)

astro.plot.DarkCurrentPlot module

class astro.plot.DarkCurrentPlot.DarkCurrentPlot(darkcurrents=[], date_range=(), filename='', interactive=True)

Bases: astro.plot.OCAMMosaicPlot.OCAMMosaicPlot

Plot an overview of darkcurrent values in a representation of the OmegaCAM mosaic.

The plot takes as input a list of DarkCurrent objects

get_data_from_date_range()
get_data_from_objects()
plot_data()
title = 'Dark current'
xlabel = 'DATE-OBS'
ylabel = 'Dark current [ADU/pix/hr]'
ylim = (-0.5, 2)
ymax = 2
ymin = -0.5

astro.plot.FramePlot module

FramePlot, plot pixel data from a frame or frames

class astro.plot.FramePlot.DifferenceFramePlot

Bases: astro.plot.FramePlot.FramePlot

check_preconditions()

Check to see if the FITS file or data exist.

get_data()

Gets data from frames for the DiffPlot

show(filename0=None, filename1=None, data0=None, data1=None, zone=None)

FramePlot show() method.

filename0: first filename to retrieve data from filename1: second filename to retrieve data from

data0: first data array to plot data1: second data array to plot

zone: tuple of (x0, y0, x1, y1) representing the image
coordinates of the two oposing corners of the sub image to consider
NOTE: If filenameN exists, its pixel data will be loaded into
dataN. If both filenameN and dataN are defined, the data from the file will overwrite the data in dataN.

The sense of the difference is (filename0/data0 - filename1/data1).

title()

Make the title of the DifferenceFramePlot.

class astro.plot.FramePlot.DifferenceFramePlotParameters

Bases: astro.plot.FramePlot.FramePlotParameters

PlotParameters specific to a DifferenceFramePlot.

CLIP = False
class astro.plot.FramePlot.FramePlot

Bases: object

This base class defines functionality common to all FramePlots.

check_preconditions()

Check to see if the FITS file or data exist.

get_data()

Gets data from a frame for the FramePlot.

plot_frame()

plot_frame() displays basic image statistics (mean, stddev) and then a representation of the image that can be zoomed and panned. Pressing various keys will give different results described below in a region of interest described by SUBPLOT_SIZE:

q - closes the most recent plot window when pressed in
the main window
[space] - displays the X and Y coordinate (FITS standard unit
indexed) and the count level
a - performs aperture photometry on brightest feature in
the region of interest (NOT YET IMPLEMENTED)
c - displays a contour plot of the region of interest
see CONTOUR_LEVELS)
h - displays a histogram of the pixel values of the
region of interest (see NUM_BINS)
r - displays a radial plot of the brightest feature in
the region of interest (currently uses cursor position)

w - displays a wireframe plot of the region of interest p - displays profile plots in both X and Y dimensions

versus intensity (count level)

NOTE: None of the commands above work from within the subplots.

plot_params = None
save()

Save the Frameplot.

show(filename=None, data=None, zone=None)

FramePlot show() method.

filename: filename to retrieve data from

data: data array to plot zone: tuple of (x0, y0, x1, y1) representing the image

coordinates of the two oposing corners of the sub image to consider
NOTE: If filenameN exists, its pixel data will be loaded into
dataN. If both filenameN and dataN are defined, the data from the file will overwrite the data in dataN.
title()

Make the title of the FramePlot.

exception astro.plot.FramePlot.FramePlotError

Bases: Exception

class astro.plot.FramePlot.FramePlotParameters

Bases: object

Abstract base class defining parameters common to all FramePlots.

KAPPA: the factor by which the dynamic range is increased in
units of sigma (0 gives full range)
ITERATIONS: number of iterations in the kappa-sigma range clipping
CMAP: PyLab color map instance VMIN: lower display range in native units (e.g. ADU) VMAX: upper display range in native units (e.g. ADU)
INTERPOLATION: type of interpolation the PyLab viewer uses (nearest,
bilnear, etc.)
WIDTH_PLOT: width of the PyLab figure window (in inches)
RATIO: ratio by which to scale the figure height (default:
x_dim/y_dim)

SUBPLOT_SIZE: width and height in pixels of region of interest

CONTOUR_LEVELS: number of contour levels for the contour plot of the
region of interest

NUM_BINS: number of bins in the histogram plot

BASE_NAME: base name for title and saved files EXTENSION: extension denoting the filetype to save plot to (no

extenrsion, no automatic saving of the plot)

FONTSIZE: size of font for title and other manual plot text

WIDTH_TITLE: maximum with of title before it is wrapped
WIDTH_FILE: maximum length of output filename
VERBOSE: verbosity level (0, 1, 2, 3)
BASE_NAME = ''
CMAP = None
CONTOUR_LEVELS = 20
EXTENSION = 'png'
FONTSIZE = 10
INTERPOLATION = 'lanczos'
ITERATIONS = 2
KAPPA = 3.0
NUM_BINS = 100
RATIO = None
SUBPLOT_SIZE = 50
VERBOSE = 1
VMAX = None
VMIN = None
WIDTH_FILE = 255
WIDTH_PLOT = 6
WIDTH_TITLE = 70
info()
class astro.plot.FramePlot.NullPlot

Bases: object

This plot instance is returned when plot cannot be made.

show(*args, **kw)
class astro.plot.FramePlot.RGBFramePlot

Bases: astro.plot.FramePlot.FramePlot

check_preconditions()

Check to see if the FITS file or data exist.

get_data()

Gets data from the frames for the RGBPlot.

show(filename0=None, filename1=None, filename2=None, data0=None, data1=None, data2=None, zone=None)

FramePlot show() method.

filename0: first filename to retrieve data from filename1: second filename to retrieve data from filename2: third filename to retrieve data from

data0: first data array to plot data1: second data array to plot data2: third data array to plot

zone: tuple of (x0, y0, x1, y1) representing the image
coordinates of the two oposing corners of the sub image to consider
NOTE: If filenameN exists, its pixel data will be loaded into
dataN. If both filenameN and dataN are defined, the data from the file will overwrite the data in dataN.
title()

Make the title of the DifferenceFramePlot.

class astro.plot.FramePlot.RGBFramePlotParameters

Bases: astro.plot.FramePlot.DifferenceFramePlotParameters

PlotParameters specific to a RGBFramePlot.

astro.plot.FramePlot.create_plot(plot_name)

An instance of the appropriate Plot object should be retrieved through this factory (currently: AstResiduals, GASResiduals, AllGASResiduals, OvrResiduals, AllOvrResiduals).

astro.plot.GainPlot module

class astro.plot.GainPlot.GainInspectPlot(gain)

Bases: object

Inspect plot for a single CCD

add_labels()
add_legend()
add_notes()
make()
set_title()
class astro.plot.GainPlot.GainMosaicInspectPlot(gains, filename='')

Bases: astro.plot.OCAMMosaicPlot.OCAMMosaicPlot

Plot an overview of gain values in a representation of the OmegaCAM mosaic.

The plot takes as input a list of GainLinearity objects

plot_data()
subtitle = 'Input: image pairs of the same exposure time'
title = 'GainLinearity'
xlabel = 'Median/2 of sum image [ADU]'
xlim = (-1000, 66000)
ylabel = 'Deviations from fit to $\\sigma ^2$of difference image [%]'
ylim = (-10, 10)
class astro.plot.GainPlot.GainMosaicInspectPlotLine(gains1, gains2, filename='')

Bases: astro.plot.OCAMMosaicPlot.OCAMMosaicPlot

Plot an overview of gain values in a representation of the OmegaCAM mosaic.

The plot takes as input a list of GainLinearity objects

plot_data()
subtitle = 'Input: image pairs of the same exposure time'
title = 'GainLinearity'
xlabel = 'Median/2 of sum image [ADU]'
xlim = (-1000, 66000)
ylabel = 'Variance ($\\sigma ^2$) of difference image'
ylim = (-1000, 30000)
class astro.plot.GainPlot.GainPlot(gains=[], date_range=(), filename='', interactive=True)

Bases: astro.plot.OCAMMosaicPlot.OCAMMosaicPlot

Plot an overview of gain values in a representation of the OmegaCAM mosaic.

The plot takes as input a list of GainLinearity objects

get_data_from_date_range()
get_data_from_objects()
individual_ylim = True
plot_data()
title = 'Gain'
xlabel = 'DATE-OBS'
ylabel = 'Gain [e/ADU]'
class astro.plot.GainPlot.GainPlotParameters

Bases: object

TITLEFONTSIZE = 14
XLABELFONTSIZE = 12
YLABELFONTSIZE = 12

astro.plot.HotPixelsPlot module

class astro.plot.HotPixelsPlot.HotPixelsPlot(hotpixelmaps=[], date_range=(), filename='', interactive=True)

Bases: astro.plot.OCAMMosaicPlot.OCAMMosaicPlot

Plot an overview of hot pixel numbers in a representation of the OmegaCAM mosaic.

The plot takes as input a list of HotPixelMap objects

get_data_from_date_range()
get_data_from_objects()
individual_ylim = True
plot_data()
title = 'Hot pixels'
xlabel = 'DATE-OBS'
ylabel = 'Count'

astro.plot.KidsCatAbmagsat module

Calculates saturation magnitude and creates figure.

class astro.plot.KidsCatAbmagsat.KidsCatAbmagsat(sourcelist=None, data=None, name_ob=None, force_creation=False)

Bases: astro.main.KidsCat.KidsCatBaseFigureStat

Make the KiDS-CAT ABMAGSAT figure and statistics.

Implemented from satur_mag.f by Naples KiDS-CAT (La Barbera et al.)

Instance variables are inherited from KidsCatBase.

Public method make overrides KidsCatBase.make.

Extends from KidsCatBase the methods find_sourcelist, load_data, print_message, find_stars, get_attribute, make_statistics, and make_plot.

SATUR_LEVEL = None
subtype = 'ABMAGSAT'

astro.plot.KidsCatCompl module

Calculates the completeness and creates the figure.

class astro.plot.KidsCatCompl.KidsCatCompl(sourcelist=None, data=None, name_ob=None, force_creation=False)

Bases: astro.main.KidsCat.KidsCatBaseFigureStat

Make the KiDS-CAT COMPL figure and statistics.

Implemented from completeness.f by Naples KiDS-CAT (La Barbera et al.)

Instance variables are inherited from KidsCatBase.

Public method make overrides KidsCatBase.make.

Extends from KidsCatBase the methods find_sourcelist, load_data, print_message, get_attribute, bin_mat, make_statistics, and make_plot.

subtype = 'COMPL'
astro.plot.KidsCatCompl.percentile(a, q)

Returns the q-th percentile of a.

astro.plot.KidsCatFwhmsn module

Calculates FWHM and creates figure.

class astro.plot.KidsCatFwhmsn.KidsCatFwhmsn(sourcelist=None, data=None, name_ob=None, force_creation=False)

Bases: astro.main.KidsCat.KidsCatBaseFigureStat

Make the KiDS-CAT FWHMSN figure and statistics.

Implemented from plot_ss.f by Naples KiDS-CAT (La Barbera et al.)

Instance variables are inherited from KidsCatBase.

Public method make overrides KidsCatBase.make.

Extends methods KidsCatBase.make_statistics and KidsCatBase.make_plot.

Extends from KidsCatBase the methods find_sourcelist, load_data, print_message, get_attribute, find_stars, make_statistics, and make_plot.

Uses the file stars_cand_SL_name.dat, which is made by the function find_stars.

All exceptions are handled by printing the traceback and return none.

TODO: - We can create the 2DPHOT flag independently from this plot.

So we can calculate bit 1 first, and then use that here, instead of vice-versa. Check how to do this properly.
subtype = 'FWHMSN'

astro.plot.KidsCatMlim module

Calculates the limiting magnitudes and creates the figure.

class astro.plot.KidsCatMlim.KidsCatMlim(sourcelist=None, data=None, name_ob=None, force_creation=False)

Bases: astro.main.KidsCat.KidsCatBaseFigureStat

Make the KiDS-CAT MLIM figure and statistics.

Implemented from maglim.f by Naples KiDS-CAT (La Barbera et al.)

Instance variables are inherited from KidsCatBase.

Public method make overrides KidsCatBase.make.

Extends from KidsCatBase the methods find_sourcelist, load_data, print_message, get_attribute, bin_mat, make_statistics, and make_plot.

subtype = 'MLIM'

astro.plot.KidsCatSg module

Creates star-galaxy separation plot.

class astro.plot.KidsCatSg.KidsCatSg(sourcelist=None, data=None, name_ob=None, force_creation=False)

Bases: astro.main.KidsCat.KidsCatBaseFigureStat

Make the KiDS-CAT SG figure and statistics.

Implemented from stargal.f by Naples KiDS-CAT (La Barbera et al.)

Instance variables are inherited from KidsCatBase.

Public method make overrides KidsCatBase.make.

subtype = 'SG'

astro.plot.KidsCatSourceDistribution module

Make SourceDistribution plot.

Based on slSourceDistribution and plotsourcesonthumbnail from qcSourcelist_KiDS_ESO_DR1.py

class astro.plot.KidsCatSourceDistribution.KidsCatSourceDistribution(sourcelist=None, data=None, name_ob=None, force_creation=False)

Bases: astro.main.KidsCat.KidsCatBaseFigureStat

Make SourceDistribution plot.

Based on slSourceDistribution and plotsourcesonthumbnail from qcSourcelist_KiDS_ESO_DR1.py

TODO: - Proper InspectFigure. - load_data from CA etc.

coadd = None
compare(other, tolerance=0.05)
subtype = 'SourceDistribution'

astro.plot.LinearityPlot module

class astro.plot.LinearityPlot.LinearityPlot(gains, filename='')

Bases: astro.plot.OCAMMosaicPlot.OCAMMosaicPlot

Plot an overview of CCD linearity values in a representation of the OmegaCAM mosaic.

The plot takes as input a list of GainLinearity objects

plot_data()
title = 'Linearity'
xlabel = 'Exposure level [ADU]'
xlim = (-5000.0, 66000.0)
ylabel = 'Normalized response [ADU/s]'
ylim = (0.98, 1.02)
class astro.plot.LinearityPlot.LinearityTimeLinesPlot(gains, filename='')

Bases: astro.plot.OCAMMosaicPlot.OCAMMosaicPlot

Plot an overview of CCD linearity values in a representation of the OmegaCAM mosaic, as a function of dateobs.

The plot takes as input a list of GainLinearity objects

plot_data()
title = 'Normalized response for pairs of equal exposure time'
xlabel = 'Date'
ylabel = 'Normalized response [ADU/s]'
ylim = (0.98, 1.02)
class astro.plot.LinearityPlot.LinearityTimePlot(gains, filename='')

Bases: astro.plot.OCAMMosaicPlot.OCAMMosaicPlot

Plot an overview of CCD linearity values in a representation of the OmegaCAM mosaic, as a function of dateobs.

The plot takes as input a list of GainLinearity objects

plot_data()
title = 'Normalized response as function of DATE-OBS in Gain template'
xlabel = 'Date'
ylabel = 'Normalized response [ADU/s]'
ylim = (0.98, 1.02)

astro.plot.OCAMMosaicPlot module

class astro.plot.OCAMMosaicPlot.OCAMMosaicPlot(filename='', interactive=True)

Bases: object

Mosaic plot for OmegaCAM, with 4*8=32 subplots, one for each CCD.

add_chipnums()

Place chip identifiers inside the subplots

add_created()
check_preconditions()
chip_layout = ['ESO_CCD_#89', 'ESO_CCD_#90', 'ESO_CCD_#91', 'ESO_CCD_#92', 'ESO_CCD_#93', 'ESO_CCD_#94', 'ESO_CCD_#95', 'ESO_CCD_#96', 'ESO_CCD_#81', 'ESO_CCD_#82', 'ESO_CCD_#83', 'ESO_CCD_#84', 'ESO_CCD_#85', 'ESO_CCD_#86', 'ESO_CCD_#87', 'ESO_CCD_#88', 'ESO_CCD_#73', 'ESO_CCD_#74', 'ESO_CCD_#75', 'ESO_CCD_#76', 'ESO_CCD_#77', 'ESO_CCD_#78', 'ESO_CCD_#79', 'ESO_CCD_#80', 'ESO_CCD_#65', 'ESO_CCD_#66', 'ESO_CCD_#67', 'ESO_CCD_#68', 'ESO_CCD_#69', 'ESO_CCD_#70', 'ESO_CCD_#71', 'ESO_CCD_#72']
chipnums = [89, 90, 91, 92, 93, 94, 95, 96, 81, 82, 83, 84, 85, 86, 87, 88, 73, 74, 75, 76, 77, 78, 79, 80, 65, 66, 67, 68, 69, 70, 71, 72]
get_figure()

Get a new figure of specific size

individual_xlim = False
individual_ylim = False
make()

Make the plot

plot_data()

Plot the actual data (abstract base method)

Child classes should best use self.figure for plotting (e.g. self.figure.scatter(x,y)). Use methods of this pylab.Figure instance or axes thereof for plotting, pylab.<method>() calls should be kept to a minimum. This makes the script as safe as it can be in a parallel environment or one where pylab plots may already be open.

save(filename='')

Save to file

set_labels()

Set the x-label and y-label

set_limits()

Set the limits on the x-axes and y-axis of the subplots

set_title()

Set the title of the plot

show()

Show on screen

title = 'The Title'
xlabel = 'The x-label'
xlim = ()
ylabel = 'The y-label'
ylim = ()

astro.plot.PSFAnisotropyPlot module

PSF Anisotropy plot


This class makes 5 plots of Sextractor parameters: 1) Bars of length ELLIPTICITY (times a scale factor) and angle w.r.t.

x-axis Theta.
  1. MAG_ISO vs. FLUX_RADIUS (half-light radius)
  2. FWHM_IMAGE vs. THETA (position angle)
  3. FWHM_IMAGE vs. Xpos-CRPIX1
  4. FWHM_IMAGE vs. Ypos-CRPIX2

class astro.plot.PSFAnisotropyPlot.PSFAnisotropyPlot(title='', as_table=False, interactive=True)

Bases: object

copy_process_parameters(process_params)
make()
save()
save_anisotropy_data_as_table(filename='')
show()
exception astro.plot.PSFAnisotropyPlot.PSFAnisotropyPlotError(message)

Bases: common.log.Error.Error

class astro.plot.PSFAnisotropyPlot.PSFAnisotropyPlotParameters

Bases: object

ELLIPTICITY = True
ELLIPTICITY_SCALEFACTOR = 5000.0
FILENAME = ''
FLAG_MAX = 0
FLUX_RADIUS_FACTOR = 1.3
FWHM_SCALEFACTOR = 15.0
LEGEND_ELLIPTICITY = 0.1
LEGEND_FWHM = 10.0
MAX_FLUX_RADIUS = 50.0
MAX_SEEING = 0.0
MAX_VAL = 64000
MIN_FLUX_RADIUS = 1.0
USE_FWHM_WORLD = True
WBOX = 200.0
astro.plot.PSFAnisotropyPlot.capture_key_press(figure)

astro.plot.ParticleEventRatePlot module

class astro.plot.ParticleEventRatePlot.ParticleEventRatePlot(darkcurrents=[], date_range=(), filename='', interactive=True)

Bases: astro.plot.OCAMMosaicPlot.OCAMMosaicPlot

get_data_from_date_range()
get_data_from_objects()
plot_data()
title = 'Particle event rate'
xlabel = 'DATE-OBS'
ylabel = 'Particle event rate [part./cm^2/h]'
ylim = (0, 300)
ymax = 300
ymin = 0

astro.plot.PhotometryPlot module

class astro.plot.PhotometryPlot.ColorPlot

Bases: astro.plot.PhotometryPlot.PhotometryPlot

check_validity_of_bands(refcat, band1, band2)
get_inverted_dict_of_origins(photcat)
show(photcat, refcat, band1, band2)

This plot is used to plot the measured zeropoints contained in a PhotSrcCatalog object versus one particular color.

The “photcat” parameter is a PhotSrcCatalog object, and the “refcat” parameter is a PhotRefCatalog object (a standard star catalog). The “band1” and “band2” parameters describe the color against which the measured zeropoints must be plotted. These are strings and can have any value that is known to the input standard star catalog. Examples of these are eg. ‘JohnsonV’ or ‘SloanG’.

exception astro.plot.PhotometryPlot.ColorPlotError

Bases: Exception

class astro.plot.PhotometryPlot.IlluminationVariationPlot

Bases: astro.plot.PhotometryPlot.PhotometryPlot

illumination_variation(X, Y, illum)
show(illum)
class astro.plot.PhotometryPlot.IlluminationVariationPointsPlot

Bases: astro.plot.PhotometryPlot.PhotometryPlot

show(illum)
class astro.plot.PhotometryPlot.IlluminationVerifyPlot

Bases: astro.plot.PhotometryPlot.PhotometryPlot

collect_data_from(photcats)
show(illum)
class astro.plot.PhotometryPlot.IlluminationVerifyPlotParameters

Bases: astro.plot.PhotometryPlot.PlotParameters

class astro.plot.PhotometryPlot.MonitoringPlot

Bases: astro.plot.PhotometryPlot.PhotometryPlot

collect_data(report)
derive_boundaries(x, y)
get_plotsymbols(mag_id_dict)
show(report)
class astro.plot.PhotometryPlot.NullPlot

Bases: object

show(*args, **kw)
class astro.plot.PhotometryPlot.PhotcatPlot

Bases: astro.plot.PhotometryPlot.PhotometryPlot

This plot is dedicated to displaying the contents of a PhotSrcCatalog object.

get_inverted_dict_of_origins(photcat)
show(photcat)
class astro.plot.PhotometryPlot.PhotcatPlotParameters

Bases: astro.plot.PhotometryPlot.PlotParameters

XAXIS_TYPE = 'MAGS'
get_xaxis()
xaxis_map = {'INDEX': <class 'astro.plot.PhotometryPlot.XaxisPhotcatIndex'>, 'MAGS': <class 'astro.plot.PhotometryPlot.XaxisPhotcatMags'>, 'RADIAL': <class 'astro.plot.PhotometryPlot.XaxisPhotcatRadial'>, 'XPOS': <class 'astro.plot.PhotometryPlot.XaxisPhotcatXpos'>, 'YPOS': <class 'astro.plot.PhotometryPlot.XaxisPhotcatYpos'>}
class astro.plot.PhotometryPlot.PhotomPlot

Bases: astro.plot.PhotometryPlot.PhotometryPlot

This plot is dedicated to displaying the contents of a PhotometricParameters object. The plot shows the stars that are contained within the PhotSrcCatalog object from which the PhotometricParameters object was made, ‘overlaid’ with the results from the “make” of PhotometricParameters (eg. zeropoint, sigclip_levels, stars corrected for extinction).

get_inverted_dict_of_origins(photcat)
show(photom)
class astro.plot.PhotometryPlot.PhotomPlotParameters

Bases: astro.plot.PhotometryPlot.PlotParameters

class astro.plot.PhotometryPlot.PhotometryPlot

Bases: object

This abstract base class defines some of the basic functionalities of all plots.

derive_boundaries(x, y)
get_frame_name(photcat)
get_plotsymbols(inverted_dict)
show(*args, **kw)
class astro.plot.PhotometryPlot.PlotParameters

Bases: object

FILE_NAME = 'plot.eps'
FILE_OUTPUT = 0
MAX_FRAME_FILENAME_WIDTH = 50
PLOTHEADER = ''
XRANGE_FRACTION = 0.25
YRANGE_FRACTION = 1.0
info()
class astro.plot.PhotometryPlot.XaxisPhotcat

Bases: object

This abstract base class represents the x-axis in a plot involving a PhotSrcCatalog object.

add_label(figure, photcat)
get_data(photcat)
class astro.plot.PhotometryPlot.XaxisPhotcatIndex

Bases: astro.plot.PhotometryPlot.XaxisPhotcat

This x-axis provides the index of the sources as according to the standard star catalog.

add_label(figure, photcat)
get_data(photcat)
class astro.plot.PhotometryPlot.XaxisPhotcatMags

Bases: astro.plot.PhotometryPlot.XaxisPhotcat

This x-axis provides the magnitude of the sources as according to the standard star catalog.

add_label(figure, photcat)
get_data(photcat)
class astro.plot.PhotometryPlot.XaxisPhotcatRadial

Bases: astro.plot.PhotometryPlot.XaxisPhotcat

This x-axis provides the radial position of the sources on the detector in pixels.

add_label(figure, photcat)
get_data(photcat)
class astro.plot.PhotometryPlot.XaxisPhotcatXpos

Bases: astro.plot.PhotometryPlot.XaxisPhotcat

This x-axis provides the x-position of the sources on the detector in pixels.

add_label(figure, photcat)
get_data(photcat)
class astro.plot.PhotometryPlot.XaxisPhotcatYpos

Bases: astro.plot.PhotometryPlot.XaxisPhotcat

This x-axis provides the y-position of the sources on the detector in pixels.

add_label(figure, photcat)
get_data(photcat)
astro.plot.PhotometryPlot.capture_key_press(figure)
astro.plot.PhotometryPlot.create_plot(name)

An instance of the appropriate Plot object should be retrieved through this factory.

astro.plot.QuickCheckPlot module

class astro.plot.QuickCheckPlot.QuickCheckPlot(rawdomeflats=[], date_range=(), filename='', statistics=True, interactive=True)

Bases: astro.plot.OCAMMosaicPlot.OCAMMosaicPlot

Plot an overview of QuickCheckFrame values in a representation of the OmegaCAM mosaic.

The plot takes as input a list of QuickCheckFrame objects

get_data_from_date_range()
get_data_from_objects()
plot_data()
title = 'Quick detector responsivity check'
xlabel = 'DATE-OBS'
ylabel = 'Exposure level [ADU]'
ylim = (20000, 40000)
class astro.plot.QuickCheckPlot.QuickCheckRatioPlot(rawdomeflats=[], date_range=(), filename='', statistics=True, interactive=True)

Bases: astro.plot.OCAMMosaicPlot.OCAMMosaicPlot

Plot an overview of QuickCheckFrame values in a representation of the OmegaCAM mosaic.

The plot takes as input a list of QuickCheckFrame objects

get_data_from_date_range()
get_data_from_objects()
plot_data()
title = 'Quick detector responsivity check'
xlabel = 'DATE-OBS'
ylabel = 'Exposure level Lamp set 1 / Lamp set 2'
ylim = (0.85, 1.0)

astro.plot.RawBiasFramePlot module

class astro.plot.RawBiasFramePlot.RawBiasFramePlot(rawbiasframes=[], date_range=(), filename='', interactive=True)

Bases: astro.plot.OCAMMosaicPlot.OCAMMosaicPlot

Plot an overview of RawBiasFrame values in a representation of the OmegaCAM mosaic.

The plot takes as input a list of RawBiasFrame objects

get_data_from_date_range()
get_data_from_objects()
individual_ylim = True
plot_data()
title = 'Raw Bias level'
xlabel = 'DATE-OBS'
ylabel = 'Bias level [ADU]'

astro.plot.RawDomeFlatFramePlot module

class astro.plot.RawDomeFlatFramePlot.RawDomeFlatFluxPlot(rawdomeflatframes=[], date_range=(), filter_name='', filename='')

Bases: astro.plot.OCAMMosaicPlot.OCAMMosaicPlot

Plot an overview of RawDomeFlatFrame values in a representation of the OmegaCAM mosaic.

The plot takes as input a list of RawDomeFlatFrame objects

color_map = {'OCAM_B_JOHN': '#feb289', 'OCAM_H_ALPHA': '#fe81b6', 'OCAM_NB_659': '#fe4b0a', 'OCAM_V_JOHN': '#c3feb4', 'OCAM_g_SDSS': 'g', 'OCAM_i_SDSS': 'y', 'OCAM_r_SDSS': 'r', 'OCAM_u_SDSS': 'b', 'OCAM_u_g_r_i_SDSS': 'm', 'OCAM_v_STRM': '#b18cfe', 'OCAM_z_SDSS': 'c', 'opaque': '#fe4b0a'}
get_data_from_date_range()
get_data_from_objects()
label_map = {'OCAM_B_JOHN': 'B', 'OCAM_H_ALPHA': 'Halpha', 'OCAM_NB_659': 'NB659', 'OCAM_V_JOHN': 'V', 'OCAM_g_SDSS': 'g', 'OCAM_i_SDSS': 'i', 'OCAM_r_SDSS': 'r', 'OCAM_u_SDSS': 'u', 'OCAM_u_g_r_i_SDSS': 'ugri', 'OCAM_v_STRM': 'v', 'OCAM_z_SDSS': 'z', 'opaque': 'opaque'}
plot_data()
set_ylim_from_encountered_filters(filter_names)
title = 'Flux of raw dome flats'
xlabel = 'DATE-OBS'
ylabel = 'Flux (overscan-X corrected) [ADU/s]'
ylim = (3000, 75000)
ylim_map = {'OCAM_g_SDSS': (9500, 16500), 'OCAM_i_SDSS': (42000, 68000), 'OCAM_r_SDSS': (40000, 75000), 'OCAM_u_SDSS': (90, 250)}
class astro.plot.RawDomeFlatFramePlot.RawDomeFlatFramePlot(rawdomeflatframes=[], date_range=(), filename='')

Bases: astro.plot.OCAMMosaicPlot.OCAMMosaicPlot

Plot an overview of RawDomeFlatFrame values in a representation of the OmegaCAM mosaic.

The plot takes as input a list of RawDomeFlatFrame objects

get_data_from_date_range()
get_data_from_objects()
plot_data()
title = 'Raw dome flats'
xlabel = 'DATE-OBS'
ylabel = 'Exposure level (overscan-X corrected) [ADU]'
ylim = (25000, 40000)

astro.plot.ReadNoisePlot module

class astro.plot.ReadNoisePlot.ReadNoisePlot(readnoises=[], date_range=(), filename='', interactive=True)

Bases: astro.plot.OCAMMosaicPlot.OCAMMosaicPlot

Plot an overview of readnoise values in a representation of the OmegaCAM mosaic.

The plot takes as input a list of ReadNoise objects

get_data_from_date_range()
get_data_from_objects()
plot_data()
title = 'Readout noise'
xlabel = 'DATE-OBS'
ylabel = 'Readout noise [ADU]'
ylim = (1, 4)
class astro.plot.ReadNoisePlot.ReadNoisePlotElectrons(readnoises, gains, filename='')

Bases: astro.plot.OCAMMosaicPlot.OCAMMosaicPlot

Plot an overview of readnoise values (in electrons) in a representation of the OmegaCAM mosaic.

The plot takes as input a list of ReadNoise objects, as well as a list of GainLinearity objects.

plot_data()
title = 'Readout noise'
xlabel = 'DATE-OBS'
ylabel = 'Read noise [e]'
ylim = (4, 6)

astro.plot.ShutterCheckPlot module

class astro.plot.ShutterCheckPlot.ShutterCheckPlot(shutterchecks, interactive=True)

Bases: object

This plot shows average pixel values along the direction of movement of the shutter.

Input is a list of ShutterCheckFrame objects.

determine_collapse_direction(frame)
make()
plot()
class astro.plot.ShutterCheckPlot.ShutterPlot(gains, filename='')

Bases: astro.plot.OCAMMosaicPlot.OCAMMosaicPlot

Shutter delay plot based on GainLinearity objects.

Plotted is flux level as a function of exposure time.

individual_ylim = True
plot_data()
title = 'Shutter timing'
xlabel = 'Requested exposure time [sec]'
ylabel = 'Flux [ADU/sec]'

astro.plot.ThumbnailPlot module

class astro.plot.ThumbnailPlot.ThumbnailPlot(frame, filename='')

Bases: object

add_colorbar(caxis, max_level)
bin_image()

Bin the image so the output size is roughly equal to the process parameter SIZE

get_color_scale_min_max(binned)

Determine clipping (=color scale) levels

Returns min_level, max_level.

get_colormap()
get_min_from_greylevel(data, max_level)

Derive the min level by demanding that the color range in the output thumbnail starts at a certain grey level. This requires the sky background value, estimated as the median of the data, as well as the max level, derived from quantiles or otherwise.

get_min_max_from_quantiles(data)
get_min_max_from_statistics()
make()
exception astro.plot.ThumbnailPlot.ThumbnailPlotError

Bases: Exception

class astro.plot.ThumbnailPlot.ThumbnailPlotParameters

Bases: object

COLORBAR = True
COLORBAR_AXIS_FRACTION = 0.12
COLOR_MAP = 'auto'
GAMMA = 2.22
JPG_QUALITY = 65
MAX_LEVEL = False
MAX_QUANTILE = 0.98
MAX_TYPE = 'QUANTILE'
MIN_GREYLEVEL = 0.001
MIN_LEVEL = False
MIN_QUANTILE = 0.1
MIN_TYPE = 'QUANTILE'
NEGATIVE = False
SIGMA_LOWER = 0.5
SIGMA_UPPER = 2.0
SIZE = 1600
astro.plot.ThumbnailPlot.drange(start, stop, step)
astro.plot.ThumbnailPlot.main()

astro.plot.TilePhotometryPlot module

Show all plots relevant for this field as a one-page summary

class astro.plot.TilePhotometryPlot.TilePhotometryPlot(tilename=None, filebased=False, scid=None)

Bases: object

get_data()
get_data_filebased()
get_pre_processed_dndm_data()
make()
plot()
read_standards_catalog(filename='Pickles.cat')

Read the Pickles standard stars

class astro.plot.TilePhotometryPlot.TilePhotometryPlotParameters

Bases: object

blue_color_pairs = [('g-r', 'u-g')]
clist = ['b', 'g', 'r', 'c', 'm', 'y', 'k', 'Navy', 'DarkOrange', 'Olive']
mag_auto_band = 'r'
mag_auto_label = 'MAG_AUTO'
mag_labels = ['MAG_GAAP_HOM_u', 'MAG_GAAP_HOM_g', 'MAG_GAAP_HOM_r', 'MAG_GAAP_HOM_i']
mag_pairs = [('u', 'g'), ('g', 'r'), ('r', 'i')]
mask_thres_val = 0
max_mag = 30
min_mag = 17
passband_list = ['u', 'g', 'r', 'i']
radec_rmag_thres = 24
red_color_pairs = [('g-r', 'r-i')]
slist = ['-', '--', '-.', ':']
star_rmag_thres = 22
whisker_mag_cut = 20
z_mbin = array([21, 23, 24])
astro.plot.TilePhotometryPlot.main()

astro.plot.ZeropointPlot module

class astro.plot.ZeropointPlot.PhotomMosaicPlot(photoms, filename='', interactive=True)

Bases: astro.plot.OCAMMosaicPlot.OCAMMosaicPlot

Mosaic version of normal PhotometricParameters.inspect()

COLOR_MAP = {'AW2S': 'b', 'Landolt': 'g', 'SDSS7': 'r', 'SDSS8': 'r', 'Stetson': 'k'}
individual_xlim = True
individual_ylim = True
plot_data()
title = 'PhotometricParameters inspect for all CCDs'
xlabel = 'Magnitude'
ylabel = 'Zeropoint [mag]'
class astro.plot.ZeropointPlot.QuickCheckPlusZeropointPlot(photoms=[], rawdomeflats=[], date_range=(), filename='')

Bases: astro.plot.OCAMMosaicPlot.OCAMMosaicPlot

Plot an overview of zeropoints as well as offset quick checks in a representation of the OmegaCAM mosaic.

The plot takes as input a list of PhotometricParameters objects and a list of RawDomeFlatFrames.

color_map = {'OCAM_g_SDSS': 'm', 'OCAM_i_SDSS': 'y', 'OCAM_r_SDSS': 'g', 'OCAM_u_SDSS': 'c'}
get_photom_data_from_date_range()
get_photom_data_from_objects()
get_rawdomeflat_data_from_date_range()
get_rawdomeflat_data_from_objects()
individual_ylim = True
label_map = {'OCAM_g_SDSS': "zeropoint g'", 'OCAM_i_SDSS': "zeropoint i'", 'OCAM_r_SDSS': "zeropoint r'", 'OCAM_u_SDSS': "zeropoint u'"}
plot_data()
title = 'Zeropoint and quick check (domeflat) trends'
xlabel = 'DATE-OBS'
ylabel = 'Zeropoint [mag]'
class astro.plot.ZeropointPlot.ZeropointPlot(photoms=[], date_range=(), filter_name='', filename='')

Bases: astro.plot.OCAMMosaicPlot.OCAMMosaicPlot

Plot an overview of zeropoints in a representation of the OmegaCAM mosaic.

The plot takes as input a list of PhotometricParameters objects

color_map = {'OCAM_g_SDSS': 'g', 'OCAM_i_SDSS': 'y', 'OCAM_r_SDSS': 'r', 'OCAM_u_SDSS': 'b'}
color_map_2 = {('AW2S',): 'b', ('Landolt',): 'g', ('SDSS7',): 'y', ('SDSS8',): 'r', ('Stetson',): 'v'}
get_data_from_date_range()

NOTE: the SQL code here is somewhat messy, with views and tables used together. The end result is rather bloated, because for every PhotSrcSource one row is returned, repeating all the other info.

get_data_from_objects()
get_ylimits_from_data(data)
individual_ylim = False
label_map = {'OCAM_g_SDSS': 'g', 'OCAM_i_SDSS': 'i', 'OCAM_r_SDSS': 'r', 'OCAM_u_SDSS': 'u'}
plot_data()
symbol_map = {('AW2S',): 'x', ('Landolt',): '^', ('SDSS7',): 'd', ('SDSS8',): 'o', ('Stetson',): 'v'}
title = 'Zeropoints per CCD'
xlabel = 'DATE-OBS'
ylabel = 'Zeropoint [mag]'
ylim = (23.8, 24.6)
ylim_map = {'OCAM_g_SDSS': (24.5, 25.2), 'OCAM_i_SDSS': (23.8, 24.6), 'OCAM_r_SDSS': (24.4, 25.0), 'OCAM_u_SDSS': (23.0, 24.0)}
astro.plot.ZeropointPlot.derive_boundaries(x, y)
astro.plot.ZeropointPlot.get_inverted_dict_of_origins(photcat)
astro.plot.ZeropointPlot.get_plotsymbols(inverted_dict)

astro.plot.aweimports module

automatic imports for the interpreter

Module contents

Plot packages

AstrometryPlot: plot residuals from an astrometric solution
AstrometryStatistics: plot statistics from AstrometricParameters
PhotometryPlot: plot results from photometric routines