The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

App::SourcePlot - implements Souce Plot application

SYNOPSIS

  use App::SourcePlot;
  App::SourcePlot::run_sourceplot_gui();

DESCRIPTION

This module contains the implementation of the Source Plot application, which can be launched using the sourceplot command.

Source Plot is a simple astronomical source plotter designed to display a plot of astronomical sources on adjustable axes.

METHODS

run_sourceplot_gui

Initializes the Source Plot GUI application and enters the Tk main loop.

open_catalog

Creates an Astro::Catalog object by reading the JCMT catalog which is distributed with this module. This catalog is then passed to the constructor of Tk::AstroCatalog to open a catalog window.

Also sets the $CATALOG_OPEN variable and disables the catalog button.

reset

Resets status relating to the catalog window.

Clears the $CATALOG_OPEN variable and enables the catalog button.

addCommand

This is the subroutine which is provided to Tk::AstroCatalog to be called when a source should be added to the display.

It recieves an Astro::Coords object and uses it to construct an enclosing App::SourcePlot::Source object.

waitForResponse

Waits until the $RESPONSE variable has been changed.

isWithin

Checks whether a source is already part of a list. The source is compared to sources from the list by invoking the summary method on their Astro::Coords objects.

    next if isWithin($source, @list);
remove

Removes entries from the list which match the given source. The comparison is performed in the same way as isWithin.

    remove($source, \@list)
update_status

Invokes the update method of the main window.

changeDate

Changes the date to a new date.

changeOpt

Displays a window allowing the options to be changed.

addPlanetSource

Adds a planet source into the plotting list. The planet number is currently unused.

    addPlanetSource($name, $number);
getSource

Prompts the user to enter source coords and name. Can specify previous source object to edit.

Returns a Source object.

editSource

Edits the existing source list.

fillWithSourceList

Fills a Text box with the list of current sources.

plot

Plots the graphs, including axis.

am_to_deg

Converts air mass to degrees.

getColor

Returns a color.

calcTime

Draws a dot at the current time on each source.

tagOnOff

Configures all object with the tag name off or on.

error

Displays an error message in Tk.

inswt

The "Insert With Tags" procedure inserts text into a given text widget and applies one or more tags to that text.

Parameters:

    $w     -  Window in which to insert
    $text  -  Text to insert (it's inserted at the "insert" mark)
    $args  -  One or more tags to apply to text.  If this is empty 
              then all tags are removed from the text.

Returns: Nothing

SEE ALSO

Astro::Coords Astro::Catalog Tk::AstroCatalog

AUTHORS

Casey Best (University of Victoria), Pam Shimek (University of Victoria), Tim Jenness (Joint Astronomy Centre), Remo Tilanus (Joint Astronomy Centre), Graham Bell (Joint Astronomy Centre).

COPYRIGHT

Copyright (C) 2012, 2013 Science and Technology Facilities Council. Copyright (C) 1998, 1999 Particle Physics and Astronomy Research Council. All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.