#!/usr/bin/env jython

import sys

from ipptopsps import IppToPsps
from plot import Plot


'''
Plotter class
'''
class Plotter(IppToPsps):

    '''
    Constructor
    '''
    def __init__(self, argv):
        super(Plotter, self).__init__(argv)

        self.plot = Plot(self.logger, self.skychunk, self.ippToPspsDb)
 
        if len(argv) < 3:
            self.printUsage()
            self.exitProgram("No plot type specified")

        if argv[2] == "density": 
            self.plot.createDensityPlot("P2")
            self.plot.createDensityPlot("ST")
            self.plot.createDensityPlot("OB")

    '''
    Overrides base-class version
    '''
    def printUsage(self):
        super(Plotter, self).printUsage("[density]")


'''
Start of program
'''
try:
    plotter = Plotter(sys.argv)
    plotter.exitProgram("completed")
except: pass
