Image-DS9

 view release on metacpan or  search on metacpan

lib/Image/DS9/Manual/API.pod  view on Meta::CPAN


# ABSTRACT: Image::DS9 API Reference
# PODNAME: Image::DS9::Manual::API.pod

__END__

=pod

=for :stopwords Diab Jerius Smithsonian Astrophysical Observatory XPA cmap colorbar
crosshair dsseso dsssao dssstsci envi fp gif iconify iis ixem jpeg mecube
minmax mosaicimage multiframe nameserver nrrd nvss pagesetup pixeltable png
prefs rgb rgbarray rgbcube rgbimage samp saveimage shm sia skyview threed
vla vlss vo wcs xpa zscale

=head1 NAME

Image::DS9::Manual::API.pod - Image::DS9 API Reference

=head1 VERSION

version v1.0.1

=head1 DESCRIPTION

L<Image::DS9> provides the user access to C<DS9>'s directives via
methods which closely mirror their syntax.  This document provides the
list of methods, as generated from L<Image::DS9>'s internal grammar

Most methods exactly parallel the B<DS9> B<XPA> commands.  For more
information on what the methods do, or how the arguments affect
things, please consult the B<DS9> documentation.

In general each element in a command is passed as a separate argument
to the method.  For example, to change the binning factor:

  $dsp->bin( factor => 0.2 );

Some commands have more arguments:

  $dsp->bin( smooth => function => 'boxcar' );
  $dsp->bin( smooth => radius => 33 );
  $dsp->bin( about => ( 3, 3 ) );
  $dsp->bin( cols => ( 'rt_x', 'rt_y' ) );

Note the use of the C<=E<gt>> operator to force preceding barewords to be
treated as strings, and the frivolous use of extra parenthesis for
aesthetics.  Some arguments are concatenated to avoid confusion; see
the documentation for the individual methods.

Some commands can query B<DS9> for state information as well as set it.
For example,

        $function = $dsp->bin( smooth => function );

B<Image::DS9> differentiates between the setting and requesting of
values by the presence or absence of the argument containing the information.

Some commands take a hash as their last argument, which contains
attributes which are passed on to B<DS9>.

True Boolean values may be one of the following:  C<1>, C<yes>, C<true>.
False Boolean values may be one of the following:  C<0>, C<no>,
C<false>.  Boolean values returned by a command are always translated
into either C<0> or C<1>.

The documentation for the commands lists the options supported and
any deviations from the general approach described above.  Refer
to the B<DS9> B<XPA> documentation to determine which commands permit
queries and the allowed data types for the arguments.  B<Image::DS9>
checks that all data passed to B<DS9> is of the appropriate type.

=head2 Arguments and Return values

lib/Image/DS9/Manual/API.pod  view on Meta::CPAN

  $ds9->pan( <ra>:DECIMAL_OR_SEXAGESIMAL, <dec>:DECIMAL_OR_SEXAGESIMAL
    );

  $ds9->pan( <ra>:DECIMAL_OR_SEXAGESIMAL, <dec>:DECIMAL_OR_SEXAGESIMAL,
    FRAME_COORD_SYSTEMS );

  $ds9->pan( <ra>:DECIMAL_OR_SEXAGESIMAL, <dec>:DECIMAL_OR_SEXAGESIMAL,
    FRAME_COORD_SYSTEMS, ( 'degrees' | 'sexagesimal' ) );

  $ds9->pan( <ra>:DECIMAL_OR_SEXAGESIMAL, <dec>:DECIMAL_OR_SEXAGESIMAL,
    FRAME_COORD_SYSTEMS, SKYFRAME );

  $ds9->pan( <ra>:DECIMAL_OR_SEXAGESIMAL, <dec>:DECIMAL_OR_SEXAGESIMAL,
    FRAME_COORD_SYSTEMS, SKYFRAME, ( 'degrees' | 'sexagesimal' ) );

  $ds9->pan( FRAME_COORD_SYSTEMS );
  $ds9->pan( FRAME_COORD_SYSTEMS, ( 'degrees' | 'sexagesimal' ) );
  $ds9->pan( FRAME_COORD_SYSTEMS, SKYFRAME );
  $ds9->pan( FRAME_COORD_SYSTEMS, SKYFRAME, ( 'degrees' | 'sexagesimal'
    ) );

  $ds9->pan;

  [ STRING, STRING ] = $ds9->pan( FRAME_COORD_SYSTEMS );
  [ STRING, STRING ] = $ds9->pan( FRAME_COORD_SYSTEMS, ( 'degrees' |
    'sexagesimal' ) );

  [ STRING, STRING ] = $ds9->pan( FRAME_COORD_SYSTEMS, SKYFRAME );
  [ STRING, STRING ] = $ds9->pan( FRAME_COORD_SYSTEMS, SKYFRAME, (
    'degrees' | 'sexagesimal' ) );

  [ STRING, STRING ] = $ds9->pan;

=head2 pixeltable

  $ds9->pixeltable( ( 'close' | 'open' ) );
  $ds9->pixeltable( BOOL );

  [ ( 'close' | 'open' ) ] = $ds9->pixeltable;

  [ BOOL ] = $ds9->pixeltable;

=head2 plot

I<Not implemented>

=head2 png

  $ds9->png( 'new', SCALARREF );
  $ds9->png( 'new', STRING );

  $ds9->png( 'slice', SCALARREF );
  $ds9->png( 'slice', STRING );

  $ds9->png( <filename>:STRING );

  $ds9->png( SCALARREF );

  [ STRING ] = $ds9->png;

=head2 prefs

I<Not implemented>

=head2 preserve

  $ds9->preserve( 'pan', BOOL );
  $ds9->preserve( 'regions', BOOL );

  [ BOOL ] = $ds9->preserve( 'pan' );
  [ BOOL ] = $ds9->preserve( 'regions' );

=head2 print

  $ds9->print( 'color', ( 'cmyk' | 'gray' | 'rgb' ) );
  $ds9->print( 'command', STRING );
  $ds9->print( 'destination', ( 'file' | 'printer' ) );
  $ds9->print( 'filename', STRING );
  $ds9->print( 'level', ( '1' | '2' | '3' ) );
  $ds9->print( 'resolution', PRINT_RESOLUTIONS );

  $ds9->print;

  [ <color>:STRING ] = $ds9->print( 'color' );

  [ <destination>:STRING ] = $ds9->print( 'destination' );

  [ <level>:INTEGER ] = $ds9->print( 'level' );

  [ <resolution>:STRING ] = $ds9->print( 'resolution' );

  [ STRING ] = $ds9->print( 'command' );
  [ STRING ] = $ds9->print( 'filename' );

=head2 prism

I<Not implemented>

=head2 quit

  $ds9->quit;

=head2 raise

  $ds9->raise;

=head2 region

  $ds9->region( 'color', COLOR );
  $ds9->region( 'deleteall' );
  $ds9->region( 'format', REGION_FORMATS );
  $ds9->region( 'load', <filename>:STRING );
  $ds9->region( 'moveback' );
  $ds9->region( 'movefront' );
  $ds9->region( 'save', <filename>:STRING );
  $ds9->region( 'selectall' );
  $ds9->region( 'selectnone' );
  $ds9->region( 'shape', STRING );
  $ds9->region( 'sky', SKYFRAME );
  $ds9->region( 'skyformat', ( 'degrees' | 'sexagesimal' ) );
  $ds9->region( 'strip', BOOL );



( run in 1.316 second using v1.01-cache-2.11-cpan-0bb4e1dffa6 )