Astro-FITS-HdrTrans

 view release on metacpan or  search on metacpan

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


=head1 COMPLEX CONVERSIONS

=over 4

=item B<to_ROTATION>

This determines the angle, in decimal degrees, of the rotation of the
sky component of the WCS. It uses the standard transformation matrix
PCi_j as defined in the FITS WCS Standard. In the absence of a PCi_j
matrix, it looks for the CROTA2 keyword.

For CGS4 the PCi_j matrix is obtained from i=[2,3] and j=[2,3].

=cut

sub to_ROTATION {
  my $self = shift;
  my $FITS_headers = shift;
  my $rotation;

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


=over 4


=item B<to_ROTATION>

This determines the angle, in decimal degrees, of the declination or
latitude axis with respect to the second axis of the data array, measured
in the anticlockwise direction.

It first looks for the linear-transformation CD matrix, widely used
including by IRAF and the precursor to the PC matrix.  If this is
absent, the routine attempts to find the standard transformation
matrix PC defined in the FITS WCS Standard.  Either matrix is
converted into a single rotation angle.

In the absence of a PC matrix it looks for the CROTA2 keyword from the
AIPS convention.

The evaluation from the CD matrix is based upon Micah Johnson's
cdelrot.pl script supplied for use with XIMAGE, extended to average
the two estimates using FITS-WCS Paper II Section 6.2 prescription.

=cut

sub to_ROTATION {
  my $self = shift;

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

use 5.006;
use warnings;
use strict;
use Carp;

# Inherit from the Base translation class and not HdrTrans itself
# (which is just a class-less wrapper).

use base qw/ Astro::FITS::HdrTrans::FITS /;

use Scalar::Util qw/ looks_like_number /;
use Astro::FITS::HdrTrans::FITS;

our $VERSION = "1.66";

# in each class we have three sets of data.
#   - constant mappings
#   - unit mappings
#   - complex mappings

# for a constant mapping, there is no FITS header, just a generic

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

my %CONST_MAP = (

                );

# Unit mapping implies that the value propogates directly
# to the output with only a keyword name change.

# Note that header merging fails with IRCAM in some cases because
# some items are duplicated in the .HEADER and .I1 but using different
# comment strings so the merging routine does not realise they are the
# same header. It is arguably an error that Astro::FITS::Header looks
# at comments.

my %UNIT_MAP = (
                AIRMASS_START        => 'AMSTART',
                # IRCAM Specific
                OBSERVATION_NUMBER   => 'RUN', # cf. OBSNUM
                DEC_TELESCOPE_OFFSET => 'DECOFF',
                DETECTOR_BIAS        => 'DET_BIAS',
                RA_TELESCOPE_OFFSET  => 'RAOFF',
               );

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

      # Translated header either so a true logical
      $return = $FITS_headers->{'STANDARD'};
    }

  } elsif ( ( exists $FITS_headers->{OBJECT} &&
              $FITS_headers->{'OBJECT'} =~ /^[bf]s/i ) ||
            ( exists( $FITS_headers->{'RECIPE'} ) &&
              $FITS_headers->{'RECIPE'} =~ /^standard/i
            )) {
    # Either we have an object with name prefix of BS or FS or
    # our recipe looks suspiciously like a standard.
    $return = 1;

  }

  return $return;

}

=item B<to_UTDATE>

t/bidi.t  view on Meta::CPAN

# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place,Suite 330, Boston, MA 02111-1307,
# USA.

use 5.006;
use strict;
use warnings;
use Test::More;

use File::Spec;
use Scalar::Util qw/ looks_like_number /;

# For detailed comparison
use Data::Dumper;
$Data::Dumper::Sortkeys = 1;

eval {
  require Astro::FITS::Header;
};
if ($@) {
  plan skip_all => 'Test requires Astro::FITS::Header module';



( run in 0.361 second using v1.01-cache-2.11-cpan-64827b87656 )