ESO-MIDAS Frequently Askes Questions

Please check out this FAQ, especially before posting your question to the ESO-MIDAS Support service or the mailing list midas-users@eso.org. A copy of this FAQ file can be obtained from the ESO-MIDAS anonymous ftp account.

Table of Contents



Frequently Asked Questions

Section 1. Introduction and General Information

Section 2. Network sources and resources

Section 3. ESO-MIDAS most common installation problems.

Section 4. Display and plotting with ESO-MIDAS.

Section 5. The internal ESO-MIDAS system and monitor.

  • to be filled

Section 6. General applications in ESO-MIDAS.

  • to be filled

Section 7. Data I/O in ESO-MIDAS. Import-Export.

Section 8. Standard reduction and calibration packages in ESO-MIDAS.

Section M. Miscellaneous



Answers

Section 1: Introduction and General Information

Question 1.1 What is ESO-MIDAS?

ESO-MIDAS is the acronym for the European Southern Observatory - Munich Image Data Analysis System which is developed and maintained by the European Southern Observatory.

The ESO-MIDAS system provides general tools for image processing and data reductions with emphasis on astronomical applications including imaging and spectral reduction packages for ESO instrumentation at Paranal and La Silla.

Question 1.2 Which is the ESO-MIDAS distribution policy?

As of the 95NOV release, patch level 2.0, ESO-MIDAS is available under the GNU General Public License. The short statement of the GNU license is included in every MIDAS file; the full text is included as a separate file in the ESO-MIDAS Release.

All source code, documentation, as well as binary copies of ESO-MIDAS (already installed and without sources) for specific systems can be retrieved from the ESO-MIDAS anonymous ftp account ftp://ftp.eso.org/midaspub. Manual pages,installation guides and other documentation are generally released together with the source code and can also be obtained from this ftp account.

As with the main release, patches, new applications, updates of the documentation, etc. will be made available on the above mentioned anonymous ftp account. They will announced via the various communication channels to the User's community and described in the ESO-MIDAS Web page on Support and Information Services. MIDAS sides are also recommended to check for the existence of new patches in the relevant README file on our anonymous ftp account on a regular basis.

Question 1.3 How is the source code of ESO-MIDAS structured?

The initial design of MIDAS was made on a DEC/VMS system in the early 80's. However, in the late 80's with the acceptance of UNIX as a standard operating system and the introduction of workstations, the system was largely redesigned and now runs on a wide variety of computers, with either DEC/VMS or one of the various flavours of UNIX as the operating system.

The latest official release 98NOVpl2.2 has been distributed as 42 Mbytes of source code (14 Mbytes in a tar-compressed file). The number of source code lines is shown in Table 1 for different types of files, where "FORTRAN" and "C" correspond to actual program code, while "prg" refers to high-level MIDAS procedures. Documentation is in the form of MIDAS help files.

Table 1. Size of source code for different file type in units of 1000 lines:

C
413
FORTRAN
240
prg
51
Help
50
The size of the source code can also be divided into main MIDAS classes. As a sample, Table 2 shows some main categories, namely "core" MIDAS, graphic users interfaces (gui), system applications (applic), standard reductions (stdred) and general application packages (contrib):

Table 2. Size of source code in different directories in Mbytes:

Total
30.6
"core"
14.7
gui
4.6
applic
1.4
stdred
3.3
contrib
5.7

ESO-MIDAS documentation is not included in this distribution. It is available however in PostScript or .html format under the release version subdirectory under in the directory source/doc.

Question 1.4 Which platforms are supported? Which hardware is required to run ESO-MIDAS?

The next table shows in which platforms 98NOVpl2.1 has been installed and verified succesfully. The size of a complete installation. i.e. including source can be obtained by added "sources" and "binaries".

SUN Solaris 2.5.1 SUN Solaris 2.6 (1.) HP HP-UX A.10.20 Intel/Linux 2.0.34
Alpha/OSF1 V4.0A (2.) Alpha/Linux 2.1.120 (3.) IBM AIX/V4.1    

The total disk space required for ESO-MIDAS will be less than this figures if you do not install all optional packages. As a reference, on a HP-UX you will need 82 Mbytes for a complete installation but only 36 Mbytes for the installation of only the "core" of MIDAS. In the same machine "applic" requires 4 Mbytes, "stdred" 10 Mbytes, "contrib" 21 Mbytes and GUIs 10 Mbytes.

You can reduce the disk space required if you clean ESO-MIDAS directory after installation (Option 9 - Clean MIDAS, in the main menu). You can remove object files, source files, libraries and optional packages that you might have installed but you do not need any more). Again, on a HP-UX system using 82 Mbytes for a complete installation, you can remove 11 Mbytes of object files, 31 Mbytes if you remove object and source files and 37 Mbytes if you remove objects, sources and libraries. Cleaning MIDAS is recomended if you want to distribute copies of MIDAS to different machines. It is however highly recomended to keep a master copy with all files (or at least a backup) for the purpose of installing upgrades and patches.

In addition to the disk space required for the installation of ESO-MIDAS, you will need optionally some more disk space for documentation (5 Mbytes in compressed-tar PostScript files), demo files (10 Mbytes in compressed-tar files, 24 Mbytes after the installation) and calibration files (1 Mbytes in a compressed-tar file.

Still you will need some more disk space for user data. This depends in the average number of images per session and in the size of the images, e.g. 20 images of 1000x1000 pixels occupies 4 Mbytes on disk (4 bytes each pixel) will need 100 Mbytes for the initial data and most likely another 100 Mbytes for the reduced data.

Question 1.5 How much memory do I need to run ESO-MIDAS?

This question is also difficult to answer with preciseness. It depends in many different factors like which system, which MIDAS application and which images.

In SunOS 4.1.3 the MIDAS monitor uses 1.1 Mbytes of memory, 2.6 Mbytes if you open a display window and 2.7 Mbytes for a graphic window. Some applications allocates 1 or 2 times the size of the image, that means 4 Mbytes or 8 Mbytes for an image of 1000x1000 pixels. A minimum of 32 Mbytes of memory per user of MIDAS is recommended and in any case as much as necessary to avoid the system to start swapping (paging in and out blocks of memory to disk).

Question 1.6 Which software do I need to install ESO-MIDAS?

First, you need a C compiler. Both ANSI C and the Traditional C from Kernie&Ritchie can be used for the installation of ESO-MIDAS. If your system does not provide you with a C compiler, or this is licensed and you do not want to pay the license fee, get a copy of the GNU public-domain C compiler "gcc" which is also available for almost all platforms.

Second, you need a F77 Fortran compiler. Here again and without a licensed Fortran compiler you can use the Fortran_to_C converter, which converts ESO-MIDAS Fortran code into C, which then can be compiled with the C compiler. The Fortran_to_C converter is again public domain software from AT&T Bell Laboratories and is called "f2c". A script called "fc" or "f77", which uses "f2c", reproduces the same behaviour of the Sun Fortran compiler "f77". This option is used with the installation of ESO-MIDAS on PC/Linux where the GNU ANSI C compiler and the Fortran_to_C converter "f2c" are normally included with the Linux distribution. There is now also a GNU public domain Fortran compiler, called "g77".

Third you need the X11 window system which is used by ESO-Midas for display and graphics. ESO-MIDAS can be installed with both X11 release 4, or X11 release 5, but not yet with X11 release 6. X11 is included with the system in all platforms, but is also public domain software that you can install yourself if you do not like the one provided by your system.

Optionally you need Motif. Both Motif release 1.1 and release 1.2 are supported by ESO-MIDAS. Without Motif software, you still can install most of ESO-MIDAS packages, but not the Graphical User Interfaces GUIs that require the Motif widget-library. Motif, unfortunatelly, is not a public domain software. Many systems do include Motif by default in their distribution like HP/HP-UX, OSF/1 or Solaris 5.4. For other systems you will have to buy a Motif license (e.g. 250 DM for PC/Linux). It is however our policy to distribute the GUIs already compiled and linked with the static Motif library for those systems that do not get Motif in their system distribution, like SunOS 4.1.3 or PC/Linux, so you do not have to buy any Motif license. See also question Question 3.8 .

The NAG library, the mathematical library from Numerical Algorithms Group, is used for particular options of some MIDAS commands. If you have a license for the NAG library tell the MIDAS installation script where the library is located, otherwise a dummy NAG library will be created by the installation script to complete the installation without errors, but the options using the NAG routines will return an error. See question Q ?.? for more details about which MIDAS commands/options need the NAG library.

Question 1.7 How is the ESO-MIDAS documentation organized?

The main source of information about MIDAS is the MIDAS Users Guide, Volumes A, B and C (ESO-DMD, 1993) ( MIDAS User Guide ) . The MIDAS system has been described in various papers. General overviews can be found in Banse et al. (1983) and in Grosbol and Ponz (1990). MIDAS as a development environment is discussed in the document ``MIDAS Environment'' (ESO-IPG, 1993) and by Banse et al. (1991). The performance of MIDAS on different platforms is described by Grosbol et al., 1988. The implementation of the table file system is described by Grosbol and Ponz, 1985. For a more complete reference list, see References .

Volume A: describes the basic MIDAS system with all general purpose facilities such as MIDAS Control Language, all available commands, data input/output (including plotting and image display), table system (MIDAS Data Base). Site specific features are given in an appendix. This volume can now also be accessed online Volume A on the web or downloaded as compressed .ps file vol1.ps.gz

Volume B: describes how to use the MIDAS system for astronomical data reduction. Application packages for special types of data or reductions (e.g. long slit and echelle spectra, object search, or crowded field photometry) are discussed assuming intensity calibrated data. A set of appendices gives a detailed description of the reduction of raw data from ESO instruments. This volume can now also be accessed online Volume B on the web or downloaded as compressed .ps file vol2.ps.gz

Volume C: gave the detailed description for all commands available. This volume is not available anymore as the MIDAS help can now be accessed via the MIDAS GUI XHelp.

It is intended that users will mainly need Volume A for general reference. For specific reduction of raw data and usage of special astronomical packages, Volume B will be more informative. Users are recommended to use the on-line help facility which always gives a full up to date description of the commands available

Detailed technical information of software interfaces and designs used in MIDAS is also given in the following documentation: MIDAS Environment; MIDAS IDI-routines; AGL Reference Manual.

Users who want to write their own application programs for MIDAS should read the MIDAS Environment document which gives the relevant information and examples.

All above documents and further documentation can be obtained by contacting the MIDAS support team (preferable via the ESO-MIDAS Problem Reporting Form on the WWW or via FTP from ftp://ftp.eso.org/midaspub.

References:

  • Banse, K., Crane, Ph., Ounnas, Ch., Ponz, D.: 1983, ``MIDAS'' in Proc. of DECUS, Zurich, p. 87
  • Banse, K., Grosbol, P.J., Baade, D.: 1991, ``MIDAS as a Development Environment'', in Astronomical Data Analysis Software and Systems I , PASP Conf. Series, Vol. 25, p. 120.
  • Banse, K., Grosbol, P., Ponz, D., Ounnas, C., Warmels, R., `The MIDAS Image Processing System in Instrumentation for Ground Based Astronomy: Present and Future, L.B. Robinson, ed., New York: Springer Verlag, p. 431.
  • Grosbol P., Banse, K., Guirao, C, Ponz, J.D., Warmels, R.H.: 1988, ``MIDAS Benchmarks of Workstations'' in ESO Messenger, ESO, Garching, 54 , 59
  • Grosbol, P.J., Ponz, J.D.: 1985, Mem. S.A.It., 56, 429
  • Grosbol, P.J., Ponz, J.D.: 1990, ``The MIDAS System'' in Acquisition, Processing and Archiving of Astronomical Images,, G. Longo and G. Sedmak (eds.), OAC and FORMEZ, 1990, p.109
  • Warmels, R.H.: 1991, ``The ESO-MIDAS System'', in Astronomical Data Analysis Software and Systems I , PASP Conf. Series, Vol. 25, p. 115.

Section 2. Network sources and resources

Question 2.1 Where can I get ESO-MIDAS material by FTP?

The Internet name for our FTP machine "ftp://ftp.eso.org/midaspub" is "ftp.eso.org" or IP address 134.171.40.2. All ESO-MIDAS files, i.e. sources of ESO-MIDAS, binaries, documentation, demonstration and calibration data, and the archives for the two ESO-MIDAS mailing lists: midas-users and midas-announce are located in the various subdirectories under the main directory "/midaspub". The WWW pages of ESO-MIDAS provide a direct link to the ESO-MIDAS ftp server.

Question 2.2 How do I install ESO-MIDAS?

There are three different installation procedures for ESO-MIDAS:
  • From source code on UNIX platforms, follow the document "Installation of MIDAS on UNIX systems" . The document is available in PostScript format in the file installunix.ps.Z and in our "midaspub" FTP account in the directory "98NOV/sources".
  • Binary distribution of ESO-MIDAS for PC/Linux. The installation of a binary copy of ESO-MIDAS is simpler and faster than the one with sources. The installation notes are found in the file /midaspub/98NOV/intel_linux/README.intel_linux on our anonymous FTP account.

    Binary distributions are also available for alpha_linux, alpha_osf, hp_ux, ibm_aix, solaris in subdirectories where you'll also find READMEs for the installation of MIDAS on this specific platform.

Question 2.3 I don't have FTP access. My internet connection is too slow to retrieve MIDAS via the internet. How do I get ESO-MIDAS?

ESO-MIDAS is also available on CD-ROM.

The CD-ROM is available to everyone interested in the ESO-MIDAS. Research Institutes can order the CD-ROM directly from the ESO-MIDAS Group by filling out the ESO-MIDAS Problem Reporting Form (category distribution), or just by sending an email to midas@eso.org.

To remind you, the ESO-MIDAS products contained on the CD-ROM, are available via our anonymous ftp server (also in smaller packages of 1.4 MB): ftp://ftp.eso.org/midaspub. The ftp services include regular patches and updates of ESO-MIDAS.

Question 2.4 What other network services are there for ESO-MIDAS?

  • WWW (World Wide Web): http://http.hq.eso.org/projects/esomidas.
  • The electronic mailing lists: midas-announce: For official announcement related to ESO-MIDAS, like patches and releases. midas-users: For general discussion about ESO-MIDAS (un-moderated). To subscribe to any mailing list, send a mail to "majordomo@eso.org" with the following command in the body of the message: subscribe midas-announce [your email address] or subscribe midas-users [your email address]
  • The ESO-MIDAS support: Only for ESO-MIDAS sites. For sending problem or comment, please use the 'Xhelp' GUI interface (CREATE/GUI help), the shell command "helpmidas", or the ESO-MIDAS WWW Problem Report Form. Or send your Problem Reports to "midas@eso.org". Your mail will then be forwarded to the ARS, our problem reporting system, and it will be forwarded to the relevant person in the ESO-MIDAS group.

Question 2.5 Are the mailing lists archived anywhere?

Yes. The archives are also available via Majordomo using the "get" command (send "help" in the body of a message to "midas-announce@eso.org" or "midas-users@eso.org" for more info), or via anonymous FTP from ftp.eso.org in directories /midaspub/midas-announce and /midaspub/midas-users. The archives are broken down by year, month and day, and are stored in files named "midas-users.YYMM" and "midas-announce.YYMMDD".

Section 3. ESO-MIDAS most common installation problems

Question 3.1 Generic installation problems on UNIX systems.

The ESO-MIDAS Unix installation guide describes the installation of MIDAS on UNIX systems.

  • One typical problem when installing a binary distribution of MIDAS is that it may have problems to access the MIDAS shared libraries, e.g.:
    • OSF/1 V3.0: /sbin/loader: Fatal Error: cannot map libmidas.so
    • HP-UX A.09: /lib/dld.sl: Can't open shared library: <path>/libmidas.sl
    • Linux 1.2.8: <path>/prepa.exe: can't find library 'libgmidas.so.3'
    • SunOS 4.1.3: ld.so: libmidas.so.3: not found
    • SunOS 5.4: ld.so.1: <path>/prepa.exe: fatal: libgmidas.so: can't open
    • SG/IRIX 5.2: <path>/prepa.exe: rld: Fatal Error: cannot find 'libmidas.so'

    You can solve this problem in different ways depending on the platform, but one common one is to include the MIDAS library directory (e.g.: /midas/98NOV/lib) into the system environment variable for shared libraries. This variable is called SHLIB_PATH on HPs and LD_LIBRARY PATH on other platforms. To modify the variable, if it was already defined, just type before running MIDAS:

    • C-Shell: % setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH:/midas/98NOV/lib
    • Bourne-Shell: % LD_LIBRARY_PATH=/midas/98NOV/lib; export LD_LIBRARY_PATH

    or if the variable was not defined:

    • C-Shell: % setenv LD_LIBRARY_PATH midas/98NOV/lib
    • Bourne-Shell: % LD_LIBRARY_PATH=midas/98NOV/lib; export LD_LIBRARY_PATH

    You can make this modification permanently to all users, by including its Bourne-Shell form at the beginning of your inmidas,gomidas and helpmidas front-end scripts.

  • MIDAS uses namepipes to comunicate between the monitor and both, the display server and the XHelp Graphical User Interface. Typically you get the following error messages when starting MIDAS:
    cannot create server for GUI Xhelp.exe.
    or
    OSX: Could not open Client WRITE channel, error = 2
    OSX: Writing error in 'round_trip', error = -1

    Namepipes (like midas_xw00 and xhelp00) are special filenames which, in some cases like OSF/1 and IBM are not recognized by NFS or AFS. To workaround the problem you can run MIDAS on a NFS filesystem by telling MIDAS to use a local filesystem for the namepipes, e.g. /tmp/midwork. Just define the environment variable MID_WORK, or use the option "-m <mid_work>" in the inmidas script.
    % setenv MID_WORK /tmp/midwork
    or
    % inmidas -m /tmp/midwork

Question 3.2 Generic installation problems on VMS systems.

The ESO-MIDAS VMS and Open-VMS installation guide describes the installation of MIDAS on VMS and Open-VMS systems.

One common problem with MIDAS installation on VMS systems is how to install or reinstall a particular package without installing MIDAS completely. Let's assume as an example the package DAOPHOT, then proceed as follows:

  • Assign MID_DISK to the disk where MIDAS is located (e.g. DBA2):
    $ ASSIGN DBA2: MID_DISK:
  • Assign MIDASHOME and MIDVERS to the directories in MID_DISK where MIDAS is located (e.g. DBA2:[SOFTWARE.MIDAS.98NOV]):
    $ MIDASHOME :== SOFTWARE
    $ MIDVERS :== 98NOV
  • Execute the DCL file that defines some MIDAS logical files:
    $ @ ['MIDASHOME'.'MIDVERS'.MONIT]MIDLOGS.COM
  • Execute the DCL file that defines libraries and installation procedures:
    $ @ ['MIDASHOME'.'MIDVERS'.INSTALL.VMS]LIBDEF.COM
  • Move to the directory of the package you want to install (or reinstall):
    $ set def ['MIDASHOME'.'MIDVERS'.CONTRIB.DAOPHOT]
  • Execute the command "make" on each of the following subdirectories: LIBSRC, SRC, ETC and PROC. The order is irrelevant, except for LIBSRC which should be always before SRC (Note: some packages might miss some of these subdirectories)
    $ set def [.LIBSRC]
    $ make
    $ set def [.SRC]
    $ make
    $ set def [.ETC]
    $ make
    $ set def [.PROC]
    $ make
  • Finally and optionally, purge the MIDAS:
    $ set def ['MIDASHOME'.'MIDVERS']
    $ purge [...]*.*

Question 3.3 Installation problems on SunOS 5.3 and 5.4 (Solaris).

  • Before you start the MIDAS installation and if you want to use the the SUN C compiler, make sure your "path" environment variable contains at least the following directories:
    % set path=(/opt/SUNWspro/bin /usr/bin /usr/ccs/bin .)
  • Before you start the MIDAS installation and if you use the GNU C compiler, then set your "path" should contain:
    % set path=(/opt/cygnus/bin /opt/SUNWspro/bin /usr/ccs/bin /usr/bin.
    In the ./local/make_options file the SLIB definition should be:
    SLIB=-lsocket -lnsl -lgcc -R$(MIDASHOME)/$(MIDVERS)/lib
    and /usr/lib/libgcc.a/opt/cygnus/lib/libgcc.a
  • Before you start the MIDAS installation, and for those users of MIDAS the LD_LIBRARY_PATH should contains at least:
    % setenv LD_LIBRARY_PATH /usr/dt/lib:/usr/openwin/lib:/opt/SUNWspro/lib:/usr/ccs/lib
  • Users of MIDAS need /usr/openwin/lib and (or equivalent directories for X11 and Motif) in theirs LD_LIBRARY_PATH environment, otherwise they will get errors like "libX11.so.n.n: can't open file".
  • On SunOS 5.3 the Motif library is not included, thus MIDAS GUIs can not be compiled. On SunOS 5.4 the Motif library is included and located in /usr/dt/lib directory.
  • The line editor may not work for MIDAS in an openwindows environment if you run it in a cmdtool window, but it should work in a shelltool window.
  • You may find problems with INTAPE/FITS to read more than one file from a DAT tape. The INTAPE/FITS may finish with an "End Of Data" after reading the first file. The problem is simply solved by using the BSD behavior for DAT tapes, that is, using devicenames with letter 'b' in the component of the name (e.g. /dev/rmt/0bn instead of /dev/rmt/0n)

Question 3.4 Installation problems on OSF/1.

If during the MIDAS installation you get this error:
Midas 001> @ ascii_bin
........
OSY_SPAWN: Child killed by a signal
Could not execute /usr/util/midas/95NOV/prim/exec/crfram.exe
This is due to a bug in the f77 version 3.11-0. The bug has been already solved in 3.11-4.

If you can not get the f77 release 3.11-4, you will have to remake the MIDAS installation without using the MIDAS shared libraries. To do so, put in comments the SH_CMD and SH_EXT entries in your ./local/make_options file.

Question 3.5 Installation problems on Linux.

  • The binary distribution of MIDAS requires Motif 1.2 (run kit) for the Graphical User interfaces. If you do not have Motif 1.2 (and do not want to buy one licence) you can retrieve the binary copy of MIDAS GUIs with statically linked Motif libraries. They are available in our anonymous ftp "ftp.eso.org" under "/midaspub/98NOV/linux/gui" directory.

Question 3.6 Installation problems on HPs.

  • The default installation of MIDAS for HPs uses the options "-O" and "+z" for the C compiler. They are used to optimize the C code and to generate position independent code for shared libraries.

    Here you could get "Warning" messages because these two options are not supported by the HP-UX C compiler when is provided as part of the standard HP-UX system. They are supported by the C compiler sold as an optional separated pruduct.

    In this case, and after executing the "5 - preinstall MIDAS" option, you will have to remove in the "./98NOV/local/make_options" file the lines "C_OPT=-O" and those ones starting with "SH_".

  • One typical problem with MIDAS on HP is the terminal setup, e.g.:
    • The key '@' cannot be typed in the command line, it removes the already typed line.
    • The key 'BACKSPACE' has no influence at all in the MIDAS command-line.

    These problems are most times solved with the following configuration in you .login file:
    # set up the terminal
    eval `tset -s -Q -m ':?vt100' `
    stty erase "^H" kill "^U" intr "^C" eof "^D" susp "^Z" \
    hupcl ixon ixoff tostop
    tabs

Question 3.7 Installation problems on SGs

If in compilation time you get the following error:
Compiler error line 3764 of reduce.f: Too many names.
Try the '-Nn#' option (# currently = 8191)
*** Error code 1 (bu21)

You could solve it by executing the following: % cd <midas_dir>/98NOV/contrib/pepsys/src
% make reduce.f
% f77 -c -Nn15000 reduce.f
% make

Question 3.8 I do not have Motif, how could I run MIDAS GUIs?

Just run them! Since MIDAS 99NOVpl2.2 the GUIs are working smoothly on Linux systems, since Motif became public software in May 2000. The binary distribution of 99NOVpl2.2 contains already the Motif library, so it is not necessary to install Motif.

Question 3.9 I have MIDAS 98NOVpl2.1 on my PC and have problems with GUIs

Please use MIDAS 99NOVpl2.2 (see question 3.8 & answer)

Question 3.10 Why do I get "MIDAS version 98NOV on VAX/VMS" if I am on UNIX?

You did forget to execute the option (or it failed):
Select: 8 - setup MIDAS
in the main config menu.

This could also happen if a patch file applied to your version of MIDAS updated the ./monit/syskeys.datorg or ./monit/syskeys.unix files. In this case the option
Select: 8 - setup MIDAS
should be re-executed AFTER the re-installation or update of MIDAS.

Question 3.11 Most MIDAS tutorials do not work. The demo data is missing.

The demo data used in most of the MIDAS tutorials are not included in the distribution source or binary files. They are however available under the subdirectory "demo" in our "ftp" account, or as an extra file in the distribution tape. In both cases a README file should explain clearly how to install this data. The important thing is that MIDAS will look for demo data in the directory $MIDASHOME/demo/data. If you have installed your demo directory somewhere else you will have to make a soft link to convince MIDAS of the contrary.

Section 4. Display and graphics with ESO-MIDAS

Question 4.1 TrueColor / PseudoColor / DirectColor

Since the 97NOV release, Midas supported also TrueColor mode (i.e. RGB with 8 bits per color) for devices which supported that mode. In that mode you would use 3 images (one for R, for G and for B plane) to get a combined "real" color image display. On most high res devices, like e.g. an NCD Xterminal, the installed Xserver would offer also PseudoColor mode besides the RGB mode (and in parallel, so that different applications could work with different visuals). Thus, you could choose in Midas if you wanted to use PseudoColor or TrueColor mode for your displays (param 5 in command INITIALIZE/DISPLAY).

Recently PCs got more and more powerful graphics cards. Unfortunately, most Xservers for PCs do not offer different visuals at the same time, it's either Pseudo or TrueColor. Thus, you have to stop the Xserver, edit the setup file and then restart X, in order to run applications requiring different visual modes.

Therefore, we included the possiblity to emulate PseudoColor mode on top of TrueColor which uses 24bit graphics. Naturally, with such a board you can also use the TrueColor mode in Midas if you wish so. Also, note, that true color is not always true color... In X there is the distinction of DirectColor and TrueColor visual for 24 bit graphics. With DirectColor you can manipulate the colors via a LUT, whereas in TrueColor you cannot change the colors youself, there's just one fixed system LUT (usually a ramp). With the command SHOW/DISPLAY you can see which visual is supported by the Xserver.

If we cannot modify the colors directly in X, the LUT handling is emulated in Midas, which has one "interesting" side effect:
Midas > load/image lola
Midas > load/lut heat

will NOT show the image `lola' with the colors of LUT `heat' immediately, only the color bar at the bottom changes, have to do again
Midas > load/image lola
to see the effect (same goes for ITTs). This is implemented in our last patch 1.4 for the 98NOV Midas release.

Please, note, that we still do not support 16 bit graphics! There, you have to switch your server to 8bit PseudoColor mode. So, it's only with 24 bit graphics cards where you can profit from this patch.

Question 4.2 I have problems with my displays

Lately one user had problems with Midas displays on a TrueColor display (i.e. 24 bits per pixels = 3 colors) with Linux.

After some testing we found, that the specific X-Server in use on that machine was using actually only 24 bits per pixel. Sounds not surprising, but up to now we only had encountered X-Servers which used 24 bits as 3*8 bits per color per pixel, but stored each pixel actually in a full word, i.e. 4 bytes (= 32 bits) per pixel were used in memory.

That can be seen when running our Xtest program for TrueColor displays:
$ /midas/98NOV/system/idiserv/src/Xtest.exe T
produces among other things:
Image structure attributes:
width = 530, height = 200
xoffset = 0, format = 2
bitmap_unit = 32, bitmap_pad = 32, depth = 24
bytes_per_line = 2120, bits_per_pixel = 32

Because the Xserver uses 4 bytes per pixel, we get:
bytes_per_line = 2120, bits_per_pixel = 32
for the 530*200 image, one line is: 530*4 = 2120.

On the machine with a "real" 24bit server we got:
Image structure attributes:
width = 530, height = 200
xoffset = 0, format = 2
bitmap_unit = 32, bitmap_pad = 32, depth = 24
bytes_per_line = 1592, bits_per_pixel = 24

Here the Xserver uses only 3 bytes per pixel in memory. Thus 530*3 = 1590 bytes and since each line must fit into multiple words (or a multiple of 4 (bytes)) it's padded up to 1592 bytes.

After this output the program crashed...

Unfortunately, we have no support yet for these Xservers - we implicitely assume 32 bits per pixel in memory.

So, if you have problems with Midas and your TrueColor display, please, execute first the Xtest.exe module as shown above and check the output carefully for the ominous 1592 line size.

Section 5. The internal ESO-MIDAS system and monitor

Section 6. General applications in ESO-MIDAS

Section 7. Data I/O in ESO-MIDAS - Import-Export

Question 7.1 Why I cannot access my tape device with INTAPE/FITS command?

If the error message you get is "Function not available: open", you might have installed an old devcap.dat file in the directory "<midas_dir>/98NOV/incl". Just remove it and try again.

The "devcap.dat" was necessary for the 93NOV release and older. In more recent releases a "generic" driver for tape devices allows access to most common tape devices (DAT/DDS, Exabyte, 1/2 inch Magtapes) by using a semi-standard UNIX interface called "mtio". The "generic" driver has proved to be good enough for most platforms and it does not require the tape configuration file "devcap.dat" anymore, but if it exists it will be used.

Question 7.2 Why can I only access the first image when I use INTAPE/FITS?

On Solaris, you have to use a different notation when you use INTAPE/FITS. E.g. if you tape device has the name /dev/rmt/1 the correct command to read file 2 to 10 from your tape would be:
Midas 001> INTAPE/FITS 2-10 mydata /dev/rmt/1bn

Without the "bn" at the end of the device name, MIDAS is not able to read several files, because the tape would stop at the end of the first file and go back to the beginning of the tape ("n" stands for non-rewind, "b" stands for BSD). Therefore, no matter where you start to read, only the first file of your list will be read correctly.

This problem occurs only on Solaris.

Question 7.3 Can I use MIDAS format files between different platforms?

The MIDAS .bdf, .tbl and .fit formats use the local number representation of the machine on which it is installed in order to get optimal performance. There are several different standards used by vendors. The two general issues are byte order (i.e. big or little endian; Intel PC's and DEC machines use little while most others use big endians) and number format for both interger and real numbers (e.g. ones or twos complement, IEEE or VAX; virtual all vendors use twos complement and IEEE by now).

On UNIX systems, MIDAS format files are interchangeable between platforms using the same byte order (i.e. between PC/Linux, Ultrix and OSF/1 for little endian architectures, and SunOS, Solaris, HP-UX, Irix and AIX for big endian architectures)

As an example, the reason for the problem using SPARC .bdf files on a PC Linux system is the byte-order which is opposite. Although we have never seen the problem, there could also be different alignment requirements for different system.

For exactly this reason the FITS format was defined as a machine independent exchange format. You would need to use the OUTDISK/FITS command to convert from the Midas internal format to FITS. The FITS files can then be transfered to your PC Linux system either by ftp (use binary option) or tar. The FITS files re then converted back to the internal Midas format by the INDISK/FITS command. Since the 95NOV version of MIDAS you could also read FITS image files directly in Midas (i.e. without an explicit conversion). Since the 98NOV version you can read and write FITS images and tables. There are two caveats:

  • a) FITS extensions (e.g. a binary table appended to an image) are not supported directly, INDISK/FITS has to be used on those FITS files to get the image and table in two separate Midas files
  • b) for backward compatibility FITS files cannot be updated rught away in 98NOV; you have to use the command: SET/MIDAS F_UPDATE=YES first (could be put into your `login.prg') to enable writing to FITS files

Section 8. Standard reduction and calibration packages in ESO-MIDAS

Question 8.1 How are the calibration and demonstration data distributed?

A certain number of tables are distributed on request in complement to the Midas releases. These tables are also available on anonymous ftp at the host ftp.eso.org (IP number 134.171.40.2).

The files to be retrieved are located in the directory /midaspub/calib and are named README.calib and calib.tar.Z. Command SHOW/TABLE can be used to visualize the column name and physical units of the tables. Demonstration data required to execute the tutorial for the different packages are also located on this ftp server in the directory /midaspub/demo. FTP access is also provided on the World Wide Web URL: http://www.eso.org/projects/esomidas/

The calibration directory contains other information such as characteristic curves for ESO filters and CCD detectors, which can be visualized with the Graphical User Interface XFilter (command CREATE/GUI FILTER).

Section M. Miscellaneous

Question M.1 How to perform desktop computations with MIDAS?

Use command COMPUTE/IMAGE, which can be abbreviated to comp, like in:
Midas...> comp tan(45.) - ln(2.718282) + (1.E-01)**2. + log10(10.)
1.010000

Question M.2 How do I get on-line help?

Just type (in your MIDAS session):
> help {command_name}/{qualifier}
e.g. if you want to know all about load/image type:
Midas> help load/image

If you do not know the name of the command you need, but know the qualifier, you can us help/qualifier. E.g. if you want to see, what MIDAS commands exist with the qualifier image just type: Midas> help/qual image

The XHelp GUI can be created with the command CREATE/GUI help or directly from the shell with the helpmidas command. GUIs require MOTIF libraries to be installed.

Question M.3 How can I overplot a contour on an image?

The command ASSIGN/GRAPH DISPLAY will set the display window as a plotting device. In order to accord the bounds of the image to the bounds of the plot, use PLOT/AXES [<,<>,>] followed by PLOT/CONTOUR command.

Question M.4 How can I reinitialize failing graphic and display windows?

Use the command:
Midas> RESET/DISPLAY

Killing the idiserver could have resulted from interrupting interactive comands with a CTRL-C. Try to avoid it next time.

Question M.5 Why do the GUIs appear with missing colors?

Color demanding Midas applications like the display window or external applications such as xv reserve for themselves a large number of colors of the Xterminal. The Midas GUIs should be created before such applications.

Question M.6 How can I define my own commands and create windows when I start a Midas session?

Include definitions in your login.prg procedure which can be located in your working directory or in the MIDWORK directory. Such a file could include definitions like:
CREATE/COMMAND RK READ/KEYWORD
CREATE/COMMAND CD CHANGE/DIRECTORY
CREATE/COMMMAND mydisp CREATE/DISPLAY 1 400,400
CREATE/COMMAND lheat LOAD/LUT heat

Question M.7 The cursor rectangle created by, e.g. EXTRACT/CURSOR or GET/CURSOR, does not react to arrow keys.

This is rather a problem of the keyboard input focus policy of your window manager than a problem of MIDAS:

Before a window could get any input from the keyword (like arrow keys) this must be selected. Most window managers support (by default) a keyboard input focus policy of explicit selection. This means when a window is selected to get keyboard input, it continues to get keyboard input until another window is explicitly selected. The client window with the keyboard input focus has the active window appearance with a visually distinct window frame.

This focus policy of explicit selection means, for MIDAS commands like EXTRACT/CURSOR and GET/CURSOR, that in order to use the arrow keys the MIDAS display window must be selected first, and you do so not by moving the cursor inside the window, but by pressing button 1 in the title area of the window.

The other keyboard focus policy, that we here at ESO use by default and is available in most window managers, is the the pointer one. When set to pointer, the keyboard focus policy is to have the keyboard focus set to the client window that contains the pointer. The window selection is done automatically by moving the mouse pointer to the window we want to activate.

With the pointer focus policy, MIDAS commands like EXTRACT/CURSOR reacts immediately to the arrow keys as soon as the mouse pointer is inside the display window.

To change from explicit selection to pointer focus policy, you will have to change the resources of your window manager. For the Motif Window Manager (mwm) is "Mwm*keyboardFocusPolicy: pointer", for the Virtual Window Manager (fvwm) the pointer focus policy is the default unless "ClickToFocus" is set in you "system.fvwmrc", for the OPEN LOOK (openwindows) window manager (olwm & olvwm) the resource is "OpenWindows.SetInput: followmouse" in your .Xdefaults file.