How molly stores data and headers

Storage of spectra:

Spectra in molly are stored in "slots" ranging from 1 to some number dependent upon the maximum size of spectrum the user wants. These are just positions in a large 1D array, separated by the user defined maximum spectrum size. It is important that the latter quantity is set large enough to do all the work you expect to carry out in a given session. The maximum number available then depends upon the memory capacity of your machine and what the maximum size set inside molly is. The spectra are not stored in a 'stack' -- you have to tell molly where to put spectra and they stay there unless you do something about it.

molly works with milliJansky internal flux units = 10**(-26) W m**-2 Hz**-1 but can accept a variety of units as input and for plotting. It retains three arrays for each spectrum which are raw counts and their errors and fluxes. If no flux cal has been applied, the flux array equals the counts array. The wavelength scale is stored as polynomial coefficients in order to save space. This means that you should normally maintain data taken with different setups in different slots. They can always be plotted on the same plot however.

The use of mJy internally has one important consequence: you should try to keep the mJy values a reasonable size. Not too big or too small otherwise over-/under-flows can occur. Thus normalising flambda to 1 would cause mJy to be of order 10**14 and could cause problems.

Headers:

molly has 4 types of header item C = Character, D = Double precision, I = integer and R = real. This is perhaps crude, but has worked quite well in practice. The molly headers are flexible, and almost any name and amount of header information can be stored, but for convenience some routines do assume standard names and data types for some header parameters which you should look at if you wish to fiddle with headers much. There are several others which are stored since they are useful. Many of these are set by the hfix command, which should routinely be run as the first step in molly analysis.

NB. One condition must be satisfied by header parameter names (you won't be allowed to set ones which violate this restriction in fact): for a given type (C,D,I,R) no header item's name can equal the first part of any other name, otherwise they cannot be reliably distinguished from one another. This could be altered, but at the cost of not being able to specify shortened forms (e.g. "UT" when you mean "UTC").


Tom Marsh, Warwick.