GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  ASTRO::FLUX (3)

.ds Aq ’

NAME

Astro::Flux - Class for handling astronomical flux quantities.

CONTENTS

SYNOPSIS



  use Astro::Flux;

  $flux = new Astro::Flux( $quantity, $units, $waveband );

  $quantity = $flux->quantity(mag);



DESCRIPTION

Class for handling astronomical flux quantities. This class does not currently support conversions from one flux type to another (say, from magnitudes to Janskies) but may in the future.

METHODS

    Constructor

<B>newB> Create a new instance of an Astro::Flux object.



  $flux = new Astro::Flux( $quantity, $type, $waveband );



The first three parameters must be defined. They are:



  quantity - numerical value for the flux, my be a primitive, or a
             C<Number::Uncertainty> object.
  type - type of flux. Can be any string.
  waveband - waveband for the given flux. Must be an C<Astro::WaveBand> object.



If any of the parameters are undefined, the constructor will throw an error. If the waveband parameter is not an Astro::WaveBand object, the constructor will throw an error.

The type is case-insensitive for lookups using the quantity method.

A fourth optional argument may be passed; this is a hash containing the following optional keys:



  quality - an C<Misc::Quality> object denoting quality flags for the
    C<Astro::Flux> object.
  reference_waveband - an C<Astro::WaveBand> object denoting a reference
    waveband for the C<Astro::Flux> object. This is used for determining
    magnitudes when deriving them from C<Astro::FluxColor> objects. See
    C<Astro::Fluxes>.
  datetime - an C<DateTime> object which is the datetime of observation for the
    measurement in the C<Astro::Flux> object.
  obsid - An array reference to a list of observation identifiers. Can be
    used to identify the observation(s) from which this measurement was
    taken (e.g. from a filename).



    Accessor Methods

<B>quantityB> Returns the quantity for a requested flux type.



  my $mag = $flux->quantity(mag);



No conversions are done between types. What you put in via the constructor is all you can get out, so if you specify the type to be ’magnitude’ and you ask for a ’mag’, this method will throw an error.

The type is case-insensitive.

<B>errorB> Returns the error in the quantity for a requested flux type.



  my $mag = $flux->error(mag);



No conversions are done between types. What you put in via the constructor is all you can get out, so if you specify the type to be ’magnitude’ and you ask for a ’mag’, this method will throw an error.

The type is case-insensitive.

Errors are only returned if one was created with the object.

<B>wavebandB> Returns the waveband for the given flux object.



  my $waveband = $flux->waveband;



Returns an Astro::WaveBand object.

<B>qualityB> Returns the quality for the given flux object.



  my $quality = $flux->quality;



Returns an Misc::Quality object if defined. If not, returns undef.

<B>reference_wavebandB> Returns the reference waveband for the given flux object.



  my $ref_waveband = $flux->reference_waveband;



Returns an Astro::WaveBand object if defined. If not, returns undef.

<B>datetimeB> Sets or returns the datetime stamp for the given flux object.



  my $datetime = $flux->datetime;
  $flux->datetime( new DateTime );



Returns an Date::datetime object if defined. If not, returns undef.

<B>obsidB> Sets or returns the observation ID for the given flux object.



  my $obsid = $flux->obsid;
  $flux->obsid( $obsid );



Returns an array reference if defined. If not, returns undef.

<B>typeB> Returns the type of flux measurement stored.



  my $type = $flux->type;



Cannot be used to set the type.

REVISION



 $Id: Flux.pm,v 1.14 2005/06/24 21:02:11 bradc Exp $



AUTHORS

Brad Cavanagh <b.cavanagh@jach.hawaii.edu>, Alasdair Allan <aa@astro.ex.ac.uk>

COPYRIGHT

Copyright (C) 2004 - 2005 Particle Physics and Astronomy Research Council. All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 FLUX (3) 2005-06-24

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.