Run vhc issuing the command:
vhc path [arg1 [arg2 [...]]]
where path is the directory containing the data vhc should run on and where the output files are located.
The first argument arg1, if given, is interpreted as the name of the path subdirectory from which collect the data. The output files are saved under path. Any other argument is ignored by the default implementation of vhc, but is passed to the function implementing the drivers, to allow for custom behaviours.
The main and only file vhc depends on for running is the configuration file described in VHC configuration.
After loading the configuration file and setting up the logging system, vhc looks for two files in path:
v_recipe.txt
v_driver.txt
If any of them does not exist, they are created.
The recipe file describe the type of files that vhc is going to analyse and consists in one single line. The line is read and the recipe is compared with the list of available recipes, provided in the configuration option recipes in the recipes section of file vhc_setting.cfg.
VHC provides the following recipes:
flat
arc
bias
hetdex_dithers # not yet implemented
If the recipe file is not found, vhc looks for a file matching generic_virus_match and infer the corresponding name comparing it with the expected files names from recipe_match. If it doesn’t find a file or the file do not match set the recipe to unknown and abort.
The driver file contains the list of checks (drivers) to execute. Each entry comes in the form of:
module:function
where module is a python module containing function, the function that implements the driver and that must have the following signature:
Prototype of a function implementing a VHC driver.
Parameters: | vcheck : instance of VCheck
path : string
argv : list of strings
args : list
kwargs : dictionary
|
---|
The module is dynamically loaded and the function executed.
If the driver file is not found, a new one is created using a default set of drivers for the recipe at hand. The default drivers are defined in default_drivers.
For more details see Create and use a drivers for more details.
vhc stores execution information and the results of the drivers in two text files and one html document.
vhc logs into two files:
For every vhc run, an html file recapping the drivers success of failure for every IFU is created.