IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 11595


Ignore:
Timestamp:
Feb 2, 2007, 2:11:45 PM (19 years ago)
Author:
eugene
Message:

clarify recipe inheritence

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/config/config.tex

    r11570 r11595  
    1 %%% $Id: config.tex,v 1.6 2007-02-02 04:55:38 price Exp $
     1%%% $Id: config.tex,v 1.7 2007-02-03 00:11:45 eugene Exp $
    22\documentclass[panstarrs,spec]{panstarrs}
    33
     
    124124mean ``look up \code{DIR} in the \code{DATAPATH} to get the
    125125directory''.
     126
     127The \code{DATAPATH(METADATA)} entry supplies a list of directories
     128which may be used as aliases.  Filenames which have the form
     129\code{path://PATH/remainder} will be converted to a UNIX path by
     130stripping the \code{path://} component and replacing PATH with its
     131value from the DATAPATH list.  This allows the database to be moved to
     132a different system (with different directory structure) without having
     133to search and replace all paths.
    126134
    127135\subsubsection{Database setup}
     
    13711379\subsection{Locations}
    13721380
    1373 Recipes may be specified in a number of locations.  Firstly, they may
    1374 be specified on the command line with the \code{-recipe} option,
    1375 giving a symbolic name and a filename or another symbolic name to link
    1376 to.  In addition, they may be specified in the site configuration and
    1377 the camera configuration under the \code{RECIPES} metadata.  Note that
    1378 the \code{PATH} in the site configuration defines the search
    1379 paths for these files.
     1381Recipes may be specified in a number of locations.  The recipe files
     1382are loaded in a sequence, with each new file supplementing the recipes
     1383already defined.  First, the site-wide list of recipes is loaded.
     1384Next, if a camera can be identified, the camera-specific recipes are
     1385loaded.  In both locations, the recipes are identified as named files
     1386under the \code{RECIPES} metadata.  Note that the \code{PATH(STR)} in
     1387the site configuration defines the search paths for these files.
     1388Finally, they may be specified on the command line with the
     1389\code{-recipe} option, giving a symbolic name and a filename or
     1390another symbolic name to link to.  In addition, individual recipe
     1391values may be specified on the command line with one of several
     1392command-line options.
    13801393
    13811394\subsubsection{Recipe combination}
     
    14531466\end{itemize}
    14541467
     1468The priority for recipe sources is:
     1469\begin{enumerate}
     1470\item Site configuration
     1471\item Camera configuration
     1472\item Command-line recipes
     1473\item Command-line options
     1474\end{enumerate}
     1475If multiple recipes have the same name, higher priority entries
     1476over-write the values specified in the lower-priority entries.  Values
     1477which are not defined in the higher-priority entries are inherited
     1478from the lower-priority entries.  This allows the user to override any
     1479recipe values using the command-line, and to specify default values in
     1480the site configuration, while also having camera-specific values in
     1481the camera configurations.  A good practice is for the higher-priority
     1482recipes files to only supply the entries which are different from the
     1483default values. 
     1484
     1485\begin{verbatim}
     1486loading sequence is:
     1487
     1488* in pmConfigRead->pmConfigReadRecipes(config, PM_RECIPE_SOURCE_SITE | PM_RECIPE_SOURCE_CAMERA):
     1489
     1490  config->site:RECIPES:NAME=FILE(STR) -> config->recipes:NAME(MD)
     1491
     1492  config->camera:RECIPES:NAME=FILE(STR) -> config->recipes:NAME(MD)
     1493  (if camera is specified)
     1494
     1495* in pmConfigRead->pmConfigLoadRecipeArguments (config):
     1496
     1497  config->argv:-recipe:NAME=FILE(STR) -> config->arguments:RECIPES:NAME(MD)
     1498
     1499  config->argv:-recipe:NAME=REF(STR) -> config->recipesSource:NAME=REF(STR)
     1500
     1501* in pmConfigRead->pmConfigLoadRecipeOptions (config, "-D"):
     1502
     1503  config->argv:-D:NAME:KEY=VALUE(STR) -> config->arguments:OPTIONS:NAME(MD)
     1504
     1505** file is loaded / camera is identified **
     1506
     1507* in pmConfigCameraFormatFromHeader->pmConfigReadRecipes(config, PM_RECIPE_SOURCE_CAMERA | PM_RECIPE_SOURCE_CL):
     1508
     1509  config->camera:RECIPES:NAME=FILE(STR) -> config->recipes:NAME(MD)
     1510
     1511** at this point, all recipes are loaded as MD in either config->recipes, config->arguments:RECIPES, or config->arguments:OPTIONS
     1512
     1513  config->arguments:RECIPES:NAME(MD) -> config->recipes:NAME(MD)
     1514
     1515** resolve the symbolic names:
     1516
     1517  config->recipesSource:NAME=REF(STR):
     1518  * if REF is in config->recipes, interpolate: config->recipes:REF(MD) -> config->recipes:NAME(MD)
     1519  * else if REF is in config->recipes:NAME, interpolate: config->recipes:NAME:REF(MD) -> config->recipes:NAME(MD)
     1520
     1521** apply the OPTIONS:
     1522
     1523  config->arguments:OPTIONS:NAME(MD) -> config->recipes:NAME(MD)
     1524
     1525--
     1526
     1527Examples:
     1528program -recipe PPIMAGE ppImage.config -recipe PPIMAGE PPIMAGE_BIAS
     1529\end{verbatim}
    14551530
    14561531\subsection{Contents}
Note: See TracChangeset for help on using the changeset viewer.