The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

App::SourcePlot::Source - creates a observation source

SYNOPSIS

use App::SourcePlot::Source;
$src = new App::SourcePlot::Source;

DESCRIPTION

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.

PUBLIC METHODS

These are the methods avaliable in this class:

new

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);
name

returns and sets the name of the source

$name = $obs->name();
$obs->name('Mars');
coords

Set or return the corresponding Astro::Coords object.

active

returns and sets whether the source is active

$on = $obs->active();
$obs->active(0);
color

returns and sets the source color

$col = $obs->color();
$obs->color('black');
lineWidth

returns and sets the sources thickness

$LW = $obs->lineWidth();
$obs->lineWidth(2);
index

returns and sets the sources window index

$index = $obs->index();
$obs->index(1234);
ra

Returns the RA of the source, or other coordinate type in systems other than RJ / RB.

$ra = $obs->ra();
dec

Returns the declination of the source, or other coordinate type in systems other than RJ / RB.

$dec = $obs->dec();
ra2000

returns the ra of the source in J2000 in radians

$ra2000 = $obs->ra2000();
dec2000

returns dec of the source in J2000 in radians

$dec2000 = $obs->dec2000();
epoc

returns the epoch of the source

$epoc = $obs->epoc();
elevation

returns the current elevation of the source at the ut time in degrees

$ele = $obs->elevation();
is_blank

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.

NameX

returns and sets the current x position of name label

$x = $obs->NameX();
$obs->NameX(6.5);
NameY

returns and sets the current y position of name label

$y = $obs->NameY();
$obs->NameY(6.5);
AzElOffsets

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);
timeDotX

returns and sets the current position of the time dot on the x axis

$x = $obs->timeDotX();
$obs->timeDotX('15.122');
timeDotY

returns and sets the current position of the time dot on the y axis

$y = $obs->timeDotY();
$obs->timeDotY('15.122');
time_ele_points

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();
dispLine

returns the line to display - presentation use

$line = $obs->dispLine();
copy

returns a copy of this object

$cp = $obs->copy();
calcPoints

Calculations the Elevation, Azimeth, etc. points $MW is the main window widget. Required for progress bar

$obs->calcPoints($date, $time, $num_points, $MW, $tel);
calcPoint

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);
erasePoints

Erases all of the plotting points. Needed when new coords put in.

$obs->erasePoints();
eraseTimeDot

Erases the time dot coordinates

$obs->eraseTimeDot();

AUTHOR

Casey Best

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/>.