Technical overview of FITS processing

A less technical description can be found in the User Manual.

1. Configuration load

  • FITS_HOME environment variable is set up
  • Fits.xml configuration file is loaded
  • Tool wrappers are created
  • Output consolidator is configured.

2. For each tool wrapper:

  • Each tool is executed on the input file creating a ToolOutput object containing a fits xml document
    • For each tool a custom classloader is used to isolate this tool and its dependencies. This is especially important for Java-based tools where 3rd-party classes are invoked which might be different versions of the same classes used by other tools, each of which might have different public API's. For a technical implementation, see the Java class in GitHub.
    • In addtion, each tool is started within its own thread.
    • If necessary, XSLT is applied to tool output to create the FITS-compatible xml
    • FITS mapping file is applied (xml/fits_xml_map.xml)

3. Consolidation

  • Format identities are consolidated
    • the format tree (xml/fits_format_tree.xml) is consulted
  • Output from tools unable to identify the file or those who identified a less specific type are thrown out
  • Fileinfo sections are merged
  • Filestatus sections are merged
  • Metadata sections are merged

4. Output

  • The consolidated fits xml file is written to a file or the console
  • If using the API a FitsOutput object is returned