| Astro-Catalog documentation | Contained in the Astro-Catalog distribution. |
Astro::Catalog::Item::Morphology - Information about a star's morphology.
$morphology = new Astro::Catalog::Item::Morphology( );
Stores information about an astronomical object's morphology.
Create a new instance of an Astro::Catalog::Item::Morphology object.
$morphology = new Astro::Catalog::Item::Morphology( );
This method returns a reference to an Astro::Catalog::Item::Morphology
object.
The ellipticity of the object.
Position angle using the pixel frame as a reference. Measured counter- clockwise from the positive x axis.
Position angle using the world coordinate system as a reference. Measured east of north.
Length of the semi-major axis in units of pixels.
Length of the semi-minor axis in units of pixels.
Length of the semi-major axis in units of degrees.
Length of the semi-minor axis in units of degrees.
Area of the object, usually by using isophotal techniques, in square pixels.
Configure the object.
$Id: Morphology.pm,v 1.3 2005/10/25 01:22:29 cavanagh Exp $
Copyright (C) 2004 Particle Physics and Astronomy Research Council. All Rights Reserved.
Brad Cavanagh <b.cavanagh@jach.hawaii.edu>
| Astro-Catalog documentation | Contained in the Astro-Catalog distribution. |
package Astro::Catalog::Item::Morphology;
use 5.006; use strict; use warnings; use vars qw/ $VERSION /; use Carp; use Number::Uncertainty; use warnings::register; '$Revision: 1.3 $ ' =~ /.*:\s(.*)\s\$/ && ($VERSION = $1);
sub new { my $proto = shift; my $class = ref( $proto ) || $proto; # Retrieve the arguments. my %args = @_; # Create the object. my $obj = bless {}, $class; # Configure the object. $obj->_configure( %args ); # And return it. return $obj; }
sub ellipticity { my $self = shift; if( @_ ) { my $ell = shift; if( defined( $ell ) && ! UNIVERSAL::isa( $ell, "Number::Uncertainty" ) ) { $ell = new Number::Uncertainty( Value => $ell ); } $self->{ELLIPTICITY} = $ell; } return $self->{ELLIPTICITY}; }
sub position_angle_pixel { my $self = shift; if( @_ ) { my $ang = shift; if( defined( $ang ) && ! UNIVERSAL::isa( $ang, "Number::Uncertainty" ) ) { $ang = new Number::Uncertainty( Value => $ang ); } $self->{POSITION_ANGLE_PIXEL} = $ang; } return $self->{POSITION_ANGLE_PIXEL}; }
sub position_angle_world { my $self = shift; if( @_ ) { my $ang = shift; if( defined( $ang ) && ! UNIVERSAL::isa( $ang, "Number::Uncertainty" ) ) { $ang = new Number::Uncertainty( Value => $ang ); } $self->{POSITION_ANGLE_WORLD} = $ang; } return $self->{POSITION_ANGLE_WORLD}; }
sub major_axis_pixel { my $self = shift; if( @_ ) { my $axis = shift; if( defined( $axis ) && ! UNIVERSAL::isa( $axis, "Number::Uncertainty" ) ) { $axis = new Number::Uncertainty( Value => $axis ); } $self->{MAJOR_AXIS_PIXEL} = $axis; } return $self->{MAJOR_AXIS_PIXEL}; }
sub minor_axis_pixel { my $self = shift; if( @_ ) { my $axis = shift; if( defined( $axis ) && ! UNIVERSAL::isa( $axis, "Number::Uncertainty" ) ) { $axis = new Number::Uncertainty( Value => $axis ); } $self->{MINOR_AXIS_PIXEL} = $axis; } return $self->{MINOR_AXIS_PIXEL}; }
sub major_axis_world { my $self = shift; if( @_ ) { my $axis = shift; if( defined( $axis ) && ! UNIVERSAL::isa( $axis, "Number::Uncertainty" ) ) { $axis = new Number::Uncertainty( Value => $axis ); } $self->{MAJOR_AXIS_WORLD} = $axis; } return $self->{MAJOR_AXIS_WORLD}; }
sub minor_axis_world { my $self = shift; if( @_ ) { my $axis = shift; if( defined( $axis ) && ! UNIVERSAL::isa( $axis, "Number::Uncertainty" ) ) { $axis = new Number::Uncertainty( Value => $axis ); } $self->{MINOR_AXIS_WORLD} = $axis; } return $self->{MINOR_AXIS_WORLD}; }
sub area { my $self = shift; if( @_ ) { my $area = shift; if( defined( $area ) && ! UNIVERSAL::isa( $area, "Number::Uncertainty" ) ) { $area = new Number::Uncertainty( Value => $area ); } $self->{AREA} = $area; } return $self->{AREA}; }
sub _configure { my $self = shift; my %args = @_; foreach my $key ( keys %args ) { if( $self->can( lc( $key ) ) ) { my $method = lc $key; $self->$method( $args{$key} ); } } }
1;