## B.1 Customizing the installation

If you will use IMD with a licensed copy of IDL, and you choose not to install the `imd` directory inside of the `user_contrib` directory in the main IDL directory, then you must edit the file `imdsiteconfig.pro`, located in the `imd` directory. The file `imdsiteconfig.pro` contains executable IDL code (although the program itself will not run if you just type `.run imdsiteconfig.pro` at the IDL prompt.) You must change the value of the `imdhome` variable in this file so that it refers to the actual IMD installation directory.

There are several other parameters you can adjust in this file:

- You can specify default widget fonts to be used by IDL, as per your preference: set the value of the `font_w` variable to the name of a valid IDL widget font for your site. In addition, you can tell IMD how to display the angstrom symbol and the greek "mu" symbol for the font you specify.

- You can add additional optical constant directories to the default IMD optical constants search path (so that you don't have to add them using the IMD menu option described in Section A.2.) The variable `imd_nkpath` in `imdsiteconfig.pro` is a string array containing the list of optical constant directories to be searched by IMD.

- The `sp_max_array_size` and `ns_max_array_size` parameters can be adjusted according to the memory limitations of your computer. That is, you might be able to avoid the 'Not enough memory to make array' error message when trying to calculate large arrays, under certain conditions:

For specular optical functions, the largest arrays that IMD will attempt to create to perform the actual computation are proportional to (number of wavelengths) x (number of angles) x (number of layers). So if you get the 'Not enough memory' message when computing specular optical functions as a function of multiple wavelengths, you can try DECREASING the `sp_max_array_size` parameter.

For non-specular reflected intensities, the 'Not enough memory' error is most likely to occur when using the Omega/Nu/N PSD model, if you have defined large Nu values or Omega values equal to zero. In this case, IMD will need to create arrays that are proportional to (number of angles) x (number of layers) x (number of layers), where (number of angles) is equal to the number of incidence angles for Rocking and Offset scans, and the number of scattering angles for Detector scans. So if you get the 'Not enough memory' message when computing non-specular reflected intensities as a function of multiple angles using the Omega/Nu/N PSD model under the circumstances just mentioned, you can try DECREASING the`ns_max_array_size` parameter.

Also, these parameters can be decreased if you find that your computer is using a lot of virtual memory (i.e., spending a lot of time swapping to disk). Note, however, that decreasing `sp_max_array_size` or `ns_max_array_size` too low will result in a large speed penalty.

### CONSERVING DISK SPACE

If you need to conserve disk space, there are a number of files that are included in the imd distribution that are optional, and can be safely deleted. Specifically, the `examples.dir` directory contains many examples files, all of which can be deleted. Also, three versions of the IMD binary file are shipped: one to be used with IDL version 5.0, called `imd_50`, another to be used with IDL version 5.1, called `imd_51,` and another to be used with IDL version 5.2, called `imd_52`. If you are sure you will only use one version of IDL (V5.0, V5.1, or V5.2), then you can delete whichever IMD binary files are not going to be used. Finally, this hypertext documentation is non-essential, and so the entire `docs.dir` directory can also be removed.

Back | Contents | Next