NAME
Astro::Catalog::Star - A generic star object in a stellar catalogue.
SYNOPSIS
$star = new Astro::Catalog::Star( ID => $id,
RA => $ra,
Dec => $dec,
Magnitudes => \%magnitudes,
MagErr => \%mag_errors,
Colours => \%colours,
ColErr => \%colour_errors,
Quality => $quality_flag,
Field => $field,
GSC => $in_gsc,
Distance => $distance_to_centre,
PosAngle => $position_angle,
X => $x_pixel_coord,
Y => $y_pixel_coord );
DESCRIPTION
Stores generic meta-data about an individual stellar object from a catalogue.
If the catalogue has a field center the Distance and Position Angle properties should be used to store the direction to the field center, e.g. a star from the USNO-A2 catalogue retrieived from the ESO/ST-ECF Archive will have these properties.
REVISION
$Id: Star.pm,v 1.6 2002/03/29 17:40:17 aa Exp $
METHODS
Constructor
- new
-
Create a new instance from a hash of options
$star = new Astro::Catalog::Star( ID => $id, RA => $ra, Dec => $dec, Magnitudes => \%magnitudes, MagErr => \%mag_errors, Colours => \%colours, ColErr => \%colour_errors, Quality => $quality_flag, Field => $field, GSC => $in_gsc, Distance => $distance_to_centre, PosAngle => $position_angle, X => $x_pixel_coord, Y => $y_pixel_coord );
returns a reference to an Astro::Catalog::Star object.
Accessor Methods
- id
-
Return (or set) the ID of the star
$id = $star->id(); $star->id( $id );
- RA
-
Return (or set) the current object R.A.
$ra = $star->ra(); $star->ra( $ra );
- Dec
-
Return (or set) the current target Declination defined for the DSS query
$dec = $dss->dec(); $dss->dec( $dec );
where $dec should be a string of the form "+-HH MM SS.SS", e.g. +43 35 09.5 or -40 25 67.89
- Magnitudes
-
Set the UBVRIHK magnitudes of the object, takes a reference to a hash of magnitude values
my %mags = ( B => '16.5', V => '15.4', R => '14.3' ); $star->magnitudes( \%mags );
additional calls to magnitudes() will append, not replace, additional magnitude values, magnitudes for filters already existing will be over-written.
- MagErr
-
Set the error in UBVRIHK magnitudes of the object, takes a reference to a hash of error values
my %mag_errors = ( B => '0.3', V => '0.1', R => '0.4' ); $star->magerr( \%mag_errors );
additional calls to magerr() will append, not replace, additional error values, errors for filters already existing will be over-written.
- Colours
-
Set the colour values for the object, takes a reference to a hash of colours
my %cols = ( 'B-V' => '0.5', 'B-R' => '0.4' ); $star->colours( \%cols );
additional calls to colours() will append, not replace, colour values, altough for colours which already have defined values, these values will be over-written.
- ColErr
-
Set the colour error values for the object, takes a reference to a hash of colour errors
my %col_errors = ( 'B-V' => '0.02', 'B-R' => '0.05' ); $star->colerr( \%col_errors );
additional calls to colerr() will append, not replace, colour error values, altough for errors which already have defined values, these values will be over-written.
- what_filters
-
Returns a list of the filters for which the object has defined values.
@filters = $star->what_filters(); $num = $star->what_filters();
if called in a scalar context it will return the number of filters which have defined magnitudes in the object.
- what_colours
-
Returns a list of the colours for which the object has defined values.
@colours = $star->what_colours(); $num = $star->what_colours();
if called in a scalar context it will return the number of colours which have defined values in the object.
- get_magnitude
-
Returns the magnitude for the supplied filter if available
$magnitude = $star->get_magnitude( 'B' );
- get_errors
-
Returns the error in the magnitude value for the supplied filter if available
$mag_errors = $star->get_errors( 'B' );
- get_colour
-
Returns the value of the supplied colour if available
$colour = $star->get_colour( 'B-V' );
- get_colourerror
-
Returns the error in the colour value for the supplied colour if available
$col_errors = $star->get_colourerr( 'B-V' );
- quality
-
Return (or set) the quality flag of the star
$quality = $star->quailty(); $star->quality( 0 );
for example for the USNO-A2 catalogue, 0 denotes good quality, and 1 denotes a possible problem object. In the generic case any flag value, including a boolean, could be used.
- field
-
Return (or set) the field parameter for the star
$field = $star->field(); $star->field( '0080' );
- gsc
-
Return (or set) the GSC flag for the object
$gsc = $star->gsc(); $star->gsc( 'TRUE' );
the flag is TRUE if the object is known to be in the Guide Star Catalogue, and FALSE otherwise.
- distance
-
Return (or set) the distance from the field centre
$distance = $star->distance(); $star->distance( '0.009' );
e.g. for the USNO-A2 catalogue.
- posangle
-
Return (or set) the position angle from the field centre
$position_angle = $star->posangle(); $star->posangle( '50.761' );
e.g. for the USNO-A2 catalogue.
- x
-
Return (or set) the X pixel co-ordinate of the star
$x = $star->x(); $star->id( $x );
- y
-
Return (or set) the Y pixel co-ordinate of the star
$y = $star->y(); $star->id( $y );
General Methods
- configure
-
Configures the object from multiple pieces of information.
$star->configure( %options );
Takes a hash as argument with the list of keywords.
- freeze
-
Method to return a blessed reference to the object so that we can store ths object on disk using Data::Dumper module.
COPYRIGHT
Copyright (C) 2001 University of Exeter. All Rights Reserved.
This program was written as part of the eSTAR project and is free software; you can redistribute it and/or modify it under the terms of the GNU Public License.
AUTHORS
Alasdair Allan <aa@astro.ex.ac.uk>,