Sophie

Sophie

distrib > Mageia > 5 > i586 > by-pkgid > 37ce2601040f8edc2329d4714238376a > files > 816

eso-midas-doc-13SEPpl1.2-3.mga5.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--Converted with LaTeX2HTML 98.1p1 release (March 2nd, 1998)
originally by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>Specifying Pixels in an Image</TITLE>
<META NAME="description" CONTENT="Specifying Pixels in an Image">
<META NAME="keywords" CONTENT="vol1">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<LINK REL="STYLESHEET" HREF="vol1.css">
<LINK REL="next" HREF="node30.html">
<LINK REL="previous" HREF="node28.html">
<LINK REL="up" HREF="node25.html">
<LINK REL="next" HREF="node30.html">
</HEAD>
<BODY >
<!--Navigation Panel-->
<A NAME="tex2html848"
 HREF="node30.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
 SRC="icons.gif/next_motif.gif"></A> 
<A NAME="tex2html844"
 HREF="node25.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
 SRC="icons.gif/up_motif.gif"></A> 
<A NAME="tex2html838"
 HREF="node28.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
 SRC="icons.gif/previous_motif.gif"></A> 
<A NAME="tex2html846"
 HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
 SRC="icons.gif/contents_motif.gif"></A> 
<A NAME="tex2html847"
 HREF="node216.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index"
 SRC="icons.gif/index_motif.gif"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html849"
 HREF="node30.html">Specifying Sub-Image</A>
<B> Up:</B> <A NAME="tex2html845"
 HREF="node25.html">MIDAS Data Structures</A>
<B> Previous:</B> <A NAME="tex2html839"
 HREF="node28.html">Specifying Elements in a</A>
<BR>
<BR>
<!--End of Navigation Panel-->

<H2><A NAME="SECTION00634000000000000000">&#160;</A><A NAME="1549">&#160;</A><A NAME="1550">&#160;</A>
<BR>
Specifying Pixels in an Image
</H2> 

<P>
In some commands it is necessary to specify the columns and rows of
an image to which that command should refer. <BR>
This is done in the following way for e.g. a 2-dim frame:
<TT>frame[x1,y1:x2,y2]</TT>
<BR>
where the column specification, <TT>x</TT> or the row specification,
<TT>y</TT> can be any of
<UL>
<LI>world coordinates, indicated via real or integer numbers:&nbsp;&nbsp;20.0,300
<LI>pixel numbers, indicated via integers preceded by @:&nbsp;&nbsp;@35,@200
<LI>or a special symbol to indicate
    <I>start</I>&nbsp;(&lt;), or <I>end</I>&nbsp;(&gt;) of a row or column;
    thus <TT>[@20,</TT>&lt;<TT>:@20,</TT>&gt;<TT>]</TT> specifies the complete 20th column of 
    a 2-dimensional image
</UL>&nbsp;&nbsp; <BR>
World coordinates are the physically meaningful coordinates with units such as
wavelengths or arc seconds (which are defined in the descriptor <TT>CUNIT</TT>).
Pixel numbers (starting with 1 for each dimension) are the indices 
of an image seen as an array.
<BR>
For example, extracting the complete 12th plane from the 3-dim image stored in
<TT>cube.bdf</TT> is done via
<BR>
<TT>EXTRACT/IMAGE plane12 = cube [</TT>&lt;<TT>,</TT>&lt;<TT>,@12:</TT>&gt;<TT>,</TT>&gt;<TT>,@12] </TT>
&nbsp;&nbsp; <BR>
Single pixels can also be written in a more direct way, via
<BR>
<TT>frame[x,y,z] = value</TT>, e.g. to set the pixel in row 27 and column 1023 of
the 2-dim image <TT>lola.bdf</TT> to <TT>1.234</TT>, use
<TT>lola[@1023,@27] = 1.234</TT>
<BR>
The <I>value</I> can also be an <I>expression</I> made up of constants and elements
of any MIDAS data structure, see the subsection&nbsp;<A HREF="node40.html#symbol-substitution">3.6.2</A>.
<BR>
&nbsp;&nbsp;
<BR>
Some of the commands dealing with images are:
<BR>
<TT>READ/IMAGE, WRITE/IMAGE, COMPUTE/IMAGE, STATIST/IMAGE, 
DELETE/IMAGE, COPY/II</TT>.

<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html848"
 HREF="node30.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
 SRC="icons.gif/next_motif.gif"></A> 
<A NAME="tex2html844"
 HREF="node25.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
 SRC="icons.gif/up_motif.gif"></A> 
<A NAME="tex2html838"
 HREF="node28.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
 SRC="icons.gif/previous_motif.gif"></A> 
<A NAME="tex2html846"
 HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
 SRC="icons.gif/contents_motif.gif"></A> 
<A NAME="tex2html847"
 HREF="node216.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index"
 SRC="icons.gif/index_motif.gif"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html849"
 HREF="node30.html">Specifying Sub-Image</A>
<B> Up:</B> <A NAME="tex2html845"
 HREF="node25.html">MIDAS Data Structures</A>
<B> Previous:</B> <A NAME="tex2html839"
 HREF="node28.html">Specifying Elements in a</A>
<!--End of Navigation Panel-->
<ADDRESS>
<I>Petra Nass</I>
<BR><I>1999-06-09</I>
</ADDRESS>
</BODY>
</HTML>