App::SourcePlot::Source - creates a observation source
use App::SourcePlot::Source; $src = new App::SourcePlot::Source;
This class will create Source objects that will hold essential information for any single source.
It is essentially a wrapper around an Astro::Coords object to add the additional information used to display a source in this application.
These are the methods avaliable in this class:
Create a new Source object.
$obs = new App::SourcePlot::Source($planet); $obs = new App::SourcePlot::Source($name, $RA, $DEC, $Epoc);
Or using an Astro::Coords object.
$coords = new Astro::Coords(...); $obs = new App::SourcePlot::Source($coords);
returns and sets the name of the source
$name = $obs->name(); $obs->name('Mars');
Set or return the corresponding Astro::Coords object.
returns and sets whether the source is active
$on = $obs->active(); $obs->active(0);
returns and sets the source color
$col = $obs->color(); $obs->color('black');
returns and sets the sources thickness
$LW = $obs->lineWidth(); $obs->lineWidth(2);
returns and sets the sources window index
$index = $obs->index(); $obs->index(1234);
Returns the RA of the source, or other coordinate type in systems other than RJ / RB.
$ra = $obs->ra();
Returns the declination of the source, or other coordinate type in systems other than RJ / RB.
$dec = $obs->dec();
returns the ra of the source in J2000 in radians
$ra2000 = $obs->ra2000();
returns dec of the source in J2000 in radians
$dec2000 = $obs->dec2000();
returns the epoch of the source
$epoc = $obs->epoc();
returns the current elevation of the source at the ut time in degrees
$ele = $obs->elevation();
Returns true if the source information is "blank". This is the default state for an object constructed with no arguments, and is represented by the Astro::Coords default type -- a Calibration object.
returns and sets the current x position of name label
$x = $obs->NameX(); $obs->NameX(6.5);
returns and sets the current y position of name label
$y = $obs->NameY(); $obs->NameY(6.5);
returns the amount in the current system to offset to draw the Elevation and Azimuth axes
($elex, $eley, $azx, $azy) = $obs->AzElOffsets(); $obs->AzElOffsets(.5, 4, .3, 2);
returns and sets the current position of the time dot on the x axis
$x = $obs->timeDotX(); $obs->timeDotX('15.122');
returns and sets the current position of the time dot on the y axis
$y = $obs->timeDotY(); $obs->timeDotY('15.122');
These functions return an array of comparative points for different characteristics of this source. The avaliable comparisons are:
time_ele_points - time vs elevation time_az_points - time vs azimuth time_pa_points - time vs parallactic angle ele_time_points - elevation vs time ele_az_points - elevation vs azimuth ele_pa_points - elevation vs parallactic angle az_time_points - azimuth vs time az_ele_points - azimuth vs azimuth az_pa_points - azimuth vs parallactic angle pa_time_points - parallactic angle vs time pa_ele_points - parallactic angle vs elevation pa_az_points - parallactic angle vs azimuth Example syntax: @time_ele_points = $obs->time_ele_points();
returns the line to display - presentation use
$line = $obs->dispLine();
returns a copy of this object
$cp = $obs->copy();
Calculations the Elevation, Azimeth, etc. points $MW is the main window widget. Required for progress bar
$obs->calcPoints($date, $time, $num_points, $MW, $tel);
Returns the time in decimal, elevation, azimuth, and parallactic angle for a given source at a particular time and date.
($lst, $ele, $az, $pa) = $obs->calcPoint($date, $time, $tel);
Erases all of the plotting points. Needed when new coords put in.
Erases the time dot coordinates
Copyright (C) 2018 East Asian Observatory. Copyright (C) 2012-2014 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/>.