Astro-WaveBand
view release on metacpan or search on metacpan
t/waveband.t view on Meta::CPAN
Species => 'CO',
Transition => '3 - 2');
isa_ok($wb4, 'Astro::WaveBand');
is($wb4->species, 'CO', 'Read species accessor');
is($wb4->transition, '3 - 2', 'Read transition accessor');
$wb4->frequency(354.5054759e9);
$wb4->species('HCN');
$wb4->transition('4 - 3');
is($wb4->species, 'HCN', 'Read update species accessor');
is($wb4->transition, '4 - 3', 'Read updated transition accessor');
is($wb4->frequency({format => 1}), '354.505 GHz', 'Format frequency');
is($wb4->frequency({format => 1, ndp => 1}), '354.5 GHz', 'Format frequency, 1 dp');
is($wb4->natural({format => 1, ndp => 2}), '354.51 GHz', 'Natural format, 2 dp');
is($wb4->wavelength({format => 1}), '845.664 mu', 'Format wavelength');
is($wb4->wavenumber({format => 1}), '11.825/cm', 'Format wavenumber');
exit;
( run in 0.241 second using v1.01-cache-2.11-cpan-05444aca049 )