Astro::Fluxes

Astro::Fluxes is a Perl class for handling a collection of astronomical flux quantities.
Download

Astro::Fluxes Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Brad Cavanagh
  • Publisher web site:
  • http://search.cpan.org/~bradc/Astro-Flux-0.01/FluxColor.pm

Astro::Fluxes Tags


Astro::Fluxes Description

Astro::Fluxes is a Perl class for handling a collection of astronomical flux quantities. Astro::Fluxes is a Perl class for handling a collection of astronomical flux quantities.SYNOPSIS use Astro::Fluxes; $fluxes = new Astro::Fluxes( $flux1, $flux2, $color1 ); my $flux = $fluxes->flux( waveband => $waveband );Class for handling a collection of astronomical flux quantities.METHODSCONSTRUCTORnewCreate a new instance of an Astro::Fluxes object. $fluxes = new Astro::Fluxes( $flux1, $flux2, $color1 );Any number of Astro::Flux or Astro::FluxColor objects can be passed as arguments.Accessor MethodsfluxReturns the flux for a requested waveband. my $flux = $fluxes->flux( waveband => 'J' );Arguments are passed as key-value pairs. The sole mandatory named argument is 'waveband'; its value can either be an Astro::WaveBand object or a string that can be used to create a new Astro::WaveBand via its Filter parameter.Optional arguments are: derived - Whether or not to return fluxes that have been derived from colors. Defaults to false, so that derived fluxes will not be returned. datetime - whether we should return a flux from a specified object, should be passed as a C object. type - which type of flux to return. If this is not given this method will default to 'mag'. If you supply a type that is not 'mag' or 'magnitudes' and are attempting to return a derived flux, this method will return undef.This method returns an Astro::Flux object.colorReturns the color for two requested wavebands.my $color = $fluxes->color( upper => new Astro::WaveBand( Filter => 'H' ), lower => new Astro::WaveBand( Filter => 'J' ) );my $color = $fluxes->color( upper => new Astro::WaveBand( Filter => 'H' ), lower => new Astro::WaveBand( Filter => 'J' ), datetime => new DateTime );Arguments are passed as key-value pairs. The two mandatory named arguments are 'upper' and 'lower', denoting the upper (longer wavelength) and lower (shorter wavelength) wavebands for the color. The value for either can be either an Astro::WaveBand object or a string that can be used to create a new Astro::WaveBand object via its Filter parameter.The above example will return the first H-K color in the Fluxes object. The optional datetime arguement allows you to return a colour at a specific datetime stamp.pushfluxesPush Astro::Flux and Astro::FluxColor object into the Astro::Fluxes object, $fluxes->pushfluxes( $flux1, $flux2, $color1 );Any number of Astro::Flux or Astro::FluxColor objects can be passed as arguments.allfluxesReturns an array of all the Astro::Flux objects contained in the Astro::Fluxes object, @fluxes_not_dervied = $fluxes->allfluxes(); @fluxes_including_dervied = $fluxes->allfluxes( 'derived' );by default this will not return the derived fluxes, however the method takes an optional arguement of 'derived', in which case it will do.fluxesbywavebandReturns an hash of all the Astro::Flux objects contained in the Astro::Fluxes object, @fluxes = $fluxes->fluxesbywaveband( waveband => 'J' );original_colorsReturns an array of the original (not derived) colors contained in the object @colors = $fluxes->original_colors( );original_wavebandsReturns an array of the original (not derived) filters contained in the object @wavebands = $fluxes->original_wavebands( ); @filters = $fluxes->original_wavebands( 'filters' );optional arguement 'filters' returns an actual filter list rather than a list of Astro::WaveBand objects.mergeMerges another Astro::Fluxes object with this object $fluxes1->merge( $fluxes2 );datestampApplies a datestamp to all Astro::Flux object with this object $fluxes->datestamp( new DateTime ); Requirements: · Perl


Astro::Fluxes Related Software