<!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 a Descriptor</TITLE> <META NAME="description" CONTENT="Specifying a Descriptor"> <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="node27.html"> <LINK REL="previous" HREF="node25.html"> <LINK REL="up" HREF="node25.html"> <LINK REL="next" HREF="node27.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html812" HREF="node27.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="icons.gif/next_motif.gif"></A> <A NAME="tex2html808" HREF="node25.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="icons.gif/up_motif.gif"></A> <A NAME="tex2html802" HREF="node25.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="icons.gif/previous_motif.gif"></A> <A NAME="tex2html810" HREF="node1.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="icons.gif/contents_motif.gif"></A> <A NAME="tex2html811" 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="tex2html813" HREF="node27.html">Specifying Keywords</A> <B> Up:</B> <A NAME="tex2html809" HREF="node25.html">MIDAS Data Structures</A> <B> Previous:</B> <A NAME="tex2html803" HREF="node25.html">MIDAS Data Structures</A> <BR> <BR> <!--End of Navigation Panel--> <H2><A NAME="SECTION00631000000000000000"> </A><A NAME="1450"> </A> <BR> Specifying a Descriptor </H2> <P> Descriptors have been derived from the concepts used in a FITS file header and have many similarities with the FITS keywords. In particular the names of the MIDAS standard descriptors, e.g. <TT>NAXIS</TT>, <TT>NPIX</TT>, etc., (for details see Appendix ``Standard Descriptors'' of the MIDAS Environment doc.) correspond to those in the FITS header. <BR><A NAME="1453"> </A> Descriptors come in four flavours: <I>integer, real, double precision</I> and <I>character</I>. Mixed types are not possible, i.e. you cannot have a real descriptor TEST and an integer descriptor TEST at the same time. Each descriptor also has a name (max. 48 chars.) and a length (no. of elements).<BLOCKQUOTE> <DIV ALIGN="CENTER"> <B>Note</DIV> <I>NTT and VLT instruments will produce data frames with all ancillary information stored in the ESO hierarchical FITS keywords. In order to get ready for these long keywords, the max. size of the names of Midas descriptors has been extended from 15 to 48 chars. Therefore, images and tables created with a Midas version after 95NOV cannot be processed with an earlier Midas version! Files created with older Midas versions can, naturally, be used in the new (and future) Midas versions. <BR> Since the 98NOV version you can set a switch (via <TT>SET/MIDAS DSCFORMAT=OLD</TT>) to create new frames with the old descriptor format. </I></B></BLOCKQUOTE> <P> Writing values into positions beyond the current length leads to an automatic extension of the descriptor (and update of its length) just as a text file is extended by the ``editor'' when you are editing it. <BR> Beware, not to create uninitialized `holes' by writing to descriptor elements which are not immediately following the current last element! MIDAS will not initialize the descriptor elements in between, so their values are unpredictable. <BR> <BR> The command to write values into a descriptor requires the name of the data file (which could be an image, table or fit file), the descriptor name, the descriptor type, the first element to be accessed, and the total number of elements to be transferred (all separated by a `/' (slash)). Finally, the data values are given (separated by commas for numeric data, but no spaces). For example,<BLOCKQUOTE> <TT>WRITE/DESCR imgfile Descname/C/1/7 Anyname</TT></BLOCKQUOTE>would write the ASCII string <TT>Anyname</TT> into the character descriptor <TT>Descname</TT> associated with the data file <TT>imgfile.bdf</TT>. Since spaces serve as parameter delimiters in MIDAS they have to be enclosed by double quotes (<TT>"</TT>) if used as data. So<BLOCKQUOTE> <TT>WRITE/DESCR imgfile Descname/C/1/7 " "</TT></BLOCKQUOTE>would fill <TT>Descname</TT> with 7 blanks.<BLOCKQUOTE> <TT>WRITE/DESCR imgfile Descname/R/4/3 17.3,8.8E2,-.3</TT></BLOCKQUOTE>would write the numbers <TT>17.3, 880.0, -0.3</TT> into elements 4,5 and 6 of real descriptor <TT>Descname</TT>. If the descriptor were created with fewer than 6 elements it would be expanded automatically.<BLOCKQUOTE> <TT>WRITE/DESCR tblname.tbl Descname/R/4/3 17.3,8.8E2,-.3</TT></BLOCKQUOTE>would write the numbers <TT>17.3, 880.0, -0.3</TT> into elements 4,5 and 6 of real descriptor <TT>Descname</TT> of the table file <TT>tblname.tbl</TT>. <BR> Note, that we had to add the file extension <TT>.tbl</TT> to the name <TT>tblname</TT>, since the command <TT>WRITE/DESCR</TT> defaults the first parameter to an image and appends the file type <TT>.bdf</TT> if no type is given by the user. <BR> <BR> Single descriptor elements can also be written in a more direct way, via <BR> <TT>frame,descr = value</TT>, e.g. to set <TT>STEP(2)</TT> of image <TT>lola.bdf</TT> to <TT>1.234</TT>, use <BR> <TT>lola,step(2) = 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 <A HREF="node40.html#symbol-substitution">3.6.2</A>. <BR> <BR> This is how descriptors work at the most basic level. However, in many cases, higher level commands have been implemented to update specific descriptors. The MIDAS command <TT>CUTS</TT>, which sets the high and low cuts of an image (in descriptor <TT>LHCUTS</TT>) for displaying or plotting it, is an example of this. <BR> <BR> Some of the commands dealing with descriptors are: <BR> <TT>READ/DESCR, WRITE/DESCR, SHOW/DESCR, DELETE/DESCR, INFO/DESCR, COPY/DD</TT>. <BR> <P> An optional help text can be attached to each descriptor and is then displayed via the <TT>READ/DESCR</TT> and <TT>SHOW/DESCR</TT> commands. This text is copied from the original FITS file (if existing) when reading in the data file or can be explicitly set via <TT>WRITE/DHELP</TT>. <P> <HR> <!--Navigation Panel--> <A NAME="tex2html812" HREF="node27.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="icons.gif/next_motif.gif"></A> <A NAME="tex2html808" HREF="node25.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="icons.gif/up_motif.gif"></A> <A NAME="tex2html802" HREF="node25.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="icons.gif/previous_motif.gif"></A> <A NAME="tex2html810" HREF="node1.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="icons.gif/contents_motif.gif"></A> <A NAME="tex2html811" 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="tex2html813" HREF="node27.html">Specifying Keywords</A> <B> Up:</B> <A NAME="tex2html809" HREF="node25.html">MIDAS Data Structures</A> <B> Previous:</B> <A NAME="tex2html803" HREF="node25.html">MIDAS Data Structures</A> <!--End of Navigation Panel--> <ADDRESS> <I>Petra Nass</I> <BR><I>1999-06-09</I> </ADDRESS> </BODY> </HTML>