Astro-WaveBand

 view release on metacpan or  search on metacpan

lib/Astro/WaveBand.pm  view on Meta::CPAN

        "P1100" => 1100,
        # This is a kluge until the class can
        # be extended to support multiple wavelength
        # instruments.
        "850S:PHOT" => 1100,
        "450W:850W" => 443,
        "450N:850N" => 442,
        "350N:750N" => 344,
    },
    'SCUBA-2' => {
        850 => 863,    # guesses
        450 => 445,
    },
);

# Instruments that have natural units
my %NATURAL = (
    WFCAM => 'filter',
    CGS4 => 'wavelength',
    SCUBA => 'filter',
    'SCUBA-2' => 'filter',

lib/Astro/WaveBand.pm  view on Meta::CPAN

sub instrument {
    my $self = shift;
    if (@_) {$self->{Instrument} = uc(shift);}
    return $self->{Instrument};
}

=item B<natural_unit>

Override the natural unit to be used for stringification. If this
value is not set the class will determine the unit of choice by
looking at the instrument name and then by taking an informed guess.

    $w->natural_unit('filter');

=cut

sub natural_unit {
    my $self = shift;
    if (@_) {$self->{NaturalUnit} = shift;}
    return $self->{NaturalUnit};
}



( run in 0.668 second using v1.01-cache-2.11-cpan-702932259ff )