Package astLib :: Module astPlots
[hide private]
[frames] | no frames]

Module astPlots

source code

module for producing astronomical plots

(c) 2007-2009 Matt Hilton

http://astlib.sourceforge.net

This module provides the matplotlib powered ImagePlot class, which is designed to be flexible. ImagePlots can have RA, Dec. coordinate axes, contour overlays, and have objects marked in them, using WCS coordinates. RGB plots are supported too.

Classes [hide private]
  ImagePlot
This class describes a matplotlib image plot containing an astronomical image with an associated WCS.
Functions [hide private]
dictionary
getTickSteps(plotSizeDeg, axis, mode="sexagesimal")
Chooses the appropriate WCS coordinate tick steps for the given axis of a plot of given size.
source code
Variables [hide private]
dictionary list DEC_TICK_STEPS = [{'deg': 1.0/ 60.0/ 60.0, 'int': 1, 'unit': "...
Defines the possible coordinate label steps on the delination axis in sexagesimal mode.
dictionary list RA_TICK_STEPS = [{'deg':(1.0/ 60.0/ 60.0/ 24.0)* 360.0, 'int':...
Defines the possible coordinate label steps on the right ascension axis in sexagesimal mode.
list DECIMAL_TICK_STEPS = [0.001, 0.0025, 0.005, 0.01, 0.025, 0.05,...
Defines the possible coordinate label steps on both coordinate axes in decimal degrees mode.
string DEG = u"\N{DEGREE SIGN}"
Variable to stand in for the degrees symbol.
string PRIME = "\'"
Variable to stand in for the prime symbol.
string DOUBLE_PRIME = "\""
Variable to stand in for the double prime symbol.
Function Details [hide private]

getTickSteps(plotSizeDeg, axis, mode="sexagesimal")

source code 

Chooses the appropriate WCS coordinate tick steps for the given axis of a plot of given size.

Parameters:
  • plotSizeDeg (float) - size of plot in decimal degrees
  • axis (string) - either "ra" or "dec"
  • mode (string) - either "sexagesimal" (for H:M:S, D:M:S) or "decimal" (for decimal degrees)
Returns: dictionary
tick step sizes for major, minor and unlabelled plot ticks, in format {'major', 'minor', 'unmarked'}

Note: axis is ignored is mode = "decimal"


Variables Details [hide private]

DEC_TICK_STEPS

Defines the possible coordinate label steps on the delination axis in sexagesimal mode. Dictionary format: {'deg', 'int', 'unit'}
Type:
dictionary list
Value:
[{'deg': 1.0/ 60.0/ 60.0, 'int': 1, 'unit': "s"}, {'deg': 5.0/ 60.0/ 6\
0.0, 'int': 5, 'unit': "s"}, {'deg': 10.0/ 60.0/ 60.0, 'int': 10, 'uni\
t': "s"}, {'deg': 30.0/ 60.0/ 60.0, 'int': 30, 'unit': "s"}, {'deg': 1\
.0/ 60.0, 'int': 1, 'unit': "m"}, {'deg': 5.0/ 60.0, 'int': 5, 'unit':\
 "m"}, {'deg': 15.0/ 60.0, 'int': 15, 'unit': "m"}, {'deg': 30.0/ 60.0\
, 'int': 30, 'unit': "m"}, {'deg': 1.0, 'int': 1, 'unit': "d"}, {'deg'\
: 5.0, 'int': 5, 'unit': "d"}, {'deg': 10.0, 'int': 10, 'unit': "d"}, \
{'deg': 30.0, 'int': 30, 'unit': "d"}]

RA_TICK_STEPS

Defines the possible coordinate label steps on the right ascension axis in sexagesimal mode. Dictionary format: {'deg', 'int', 'unit'}
Type:
dictionary list
Value:
[{'deg':(1.0/ 60.0/ 60.0/ 24.0)* 360.0, 'int': 1, 'unit': "s"}, {'deg'\
:(5.0/ 60.0/ 60.0/ 24.0)* 360.0, 'int': 5, 'unit': "s"}, {'deg':(10.0/\
 60.0/ 60.0/ 24.0)* 360.0, 'int': 10, 'unit': "s"}, {'deg':(30.0/ 60.0\
/ 60.0/ 24.0)* 360.0, 'int': 30, 'unit': "s"}, {'deg':(1.0/ 60.0/ 24.0\
)* 360.0, 'int': 1, 'unit': "m"}, {'deg':(5.0/ 60.0/ 24.0)* 360.0, 'in\
t': 5, 'unit': "m"}, {'deg':(10.0/ 60.0/ 24.0)* 360.0, 'int': 15, 'uni\
t': "m"}, {'deg':(30.0/ 60.0/ 24.0)* 360.0, 'int': 30, 'unit': "m"}, {\
'deg':(1.0/ 24.0)* 360.0, 'int': 1, 'unit': "h"}, {'deg':(3.0/ 24.0)* \
...

DECIMAL_TICK_STEPS

Defines the possible coordinate label steps on both coordinate axes in decimal degrees mode.
Type:
list
Value:
[0.001, 0.0025, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.\
0, 10.0, 30.0, 90.0]