next up previous
Next: Database Memes Up: History of Development (keywords/memes) Previous: FITS keywords attributes

Producing Fake Data

Having succeeded in producing accurate formatted documentation of our keywords, we were anxious to prove that we could produce sample data, that is, fake FITS headers, from our database. To do this, we had to establish values for all counter memes in the target header, generate the correct number and format of instances of indexed keywords; this might well expand the apparent length of the header considerably.

For each keyword of the expanded list, we had then to generate acceptable fake data. Acceptable in this case meant that the data must be formatted according to the FORTRAN format, properly quoted (or not), and randomly generated to fall between the minimum and maximum legitimate value for each keyword - or, in the case of enumerated keywords, to be chosen at random from the menu of legitimate values.

This proved to be a challenging piece of code, but after several iterations we were able to produce strangely real looking headers. These were not yet real FITS; they were human-readable, with embedded newlines; but we were only a couple of small steps away from producing FITS headers which could be read by FITSIO routines. Meanwhile...

De Clarke
Mon Sep 9 16:46:16 PDT 1996