Astro-FITS-HdrTrans

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


1.58 2015-03-08

    - SEEING for JCMT is now average of SEEINGST and SEEINGEN.
    - Add translation of SCAN_PAT header for JCMT.
    - Add translations for species/molecule and transition for ACSIS.

1.57 2015-03-06

    - Add support for more LCOGT instruments (Tim Lister).
    - Avoid NaN values for LCOGT (Tim Lister).

1.56 2014-07-16

    - For CGS4Old read INTTYPE if MODE is not present.
    - Add rotation for IRCAM.

1.55 2013-05-08

    - Updates to some LCOGT telescope translations (Tim Lister).
    - Added AMBIENT_TEMPERATURE for SCUBA-2.

lib/Astro/FITS/HdrTrans/LCO.pm  view on Meta::CPAN

Converts a sky angle specified in d m s format into decimal degrees.
The argument is the sexagesimal-format angle.

=cut

sub dms_to_degrees {
  my $self = shift;
  my $sexa = shift;
  my $dms;
  if ( defined( $sexa ) ) {
    if ($sexa =~ /UNKNOWN/i or $sexa eq "N/A" or $sexa eq "NaN" ) {
      $dms = 0.0;
    } else {
      my @pos = split( /:/, $sexa );
      $dms = abs($pos[ 0 ]) + $pos[ 1 ] / 60.0 + $pos [ 2 ] / 3600.0;
      if ( $pos[ 0 ] =~ /-/ ) {
        $dms = -$dms;
      }
    }
  }
  return $dms;

lib/Astro/FITS/HdrTrans/LCO.pm  view on Meta::CPAN

It takes no account of latitude.  The argument is the sexagesimal
format angle.

=cut

sub hms_to_degrees {
  my $self = shift;
  my $sexa = shift;
  my $hms;
  if ( defined( $sexa ) ) {
    if ($sexa =~ /UNKNOWN/i or $sexa eq "N/A" or $sexa eq "NaN" ) {
      $hms = 0.0;
    } else {
      my @pos = split( /:/, $sexa );
      $hms = 15.0 * ( $pos[ 0 ] + $pos[ 1 ] / 60.0 + $pos [ 2 ] / 3600.0 );
    }
  }
  return $hms;
}

# Returns the UT date in YYYYMMDD format.



( run in 0.238 second using v1.01-cache-2.11-cpan-fd5d4e115d8 )