The data inside CHAMELEON is organized in tables (e.g. ScanTable),
structures (e.g. GenConfig), arrays of structures (e.g. scans), and plain
arrays (e.g. VisSq). Some of the choices made might be different from
what one would make today if one were to write CHAMELEON from scratch,
but obviously can't be changed that easily anymore.
Common blocks exist for the major data groups, i.e.:
All flat array data have a pair of indices per group containing first and last elements for every corresponding scan loaded. Depending on size due to sampling time, some arrays have only data from a single scan, others have all night's data. In particular, point data is meant to be loaded one star at a time, overwriting the previous copy. The scan data is always allocated for the whole night.
Tables are identical to arrays of structures in IDL, but were not in PV-WAVE. Since the latter was the first language for CHAMELEON, we still speak of tables. Two tables accompany the interferometric scan data, the scantable and the bgtable (back ground table). They exist for historical reasons, related to being convenient containers for auxilliary scan related data when reading the point data, but they could have been incorporated into the scan structures. Aside from the flag tables and the station table, the startable is the only other tables worth mentioning, as it contains all stellar data and is subject to the manipulations through the STARBASE procedures.
The interferometric configuration is stored in structures (genconfig, metroconfig, geoparms), and arrays of structures (geninfo, geoinfo). The latter are expansions of single date configurations to multiple day configurations for use in AMOEBA.
In general, any interferometric data from a single night are not buffered. Thus, the two standard procedures to read data into CHAMELEON, get_scandata and get_xdr empty the buffer and only initialize the geoinfo and geninfo structures for use in AMOEBA. Similarly, any procedures creating a CHAMELEON data set from other formats do the same, with the exception of get_oifits because these files may contain multiple data sets. Finally, fakedata, which simulates a data set, also empties the buffer.
Finally, model and image data are contained in two common blocks.