<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.9.1" xml:lang="en-US">
  <compounddef id="indexpage" kind="page">
    <compoundname>index</compoundname>
    <title>lsst::pipe::base; Base package for pipeline tasks</title>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
<sect1 id="index_1pipeBase_contents">
<title>Contents</title>
<para><itemizedlist>
<listitem><para><ref refid="index_1pipeBase_introduction" kindref="member">Introduction</ref></para>
</listitem><listitem><para><ref refid="index_1pipeBase_argumentParser" kindref="member">Running Command-Line Tasks</ref><itemizedlist>
<listitem><para><ref refid="index_1pipeBase_argumentParser_dataIDs" kindref="member">Specifying Data IDs</ref></para>
</listitem><listitem><para><ref refid="index_1pipeBase_argumentParser_rerun" kindref="member">The <ndash/>rerun Option</ref></para>
</listitem><listitem><para><ref refid="index_1pipeBase_argumentParser_argumentFiles" kindref="member">Argument Files</ref></para>
</listitem><listitem><para><ref refid="index_1pipeBase_argumentParser_configOverride" kindref="member">Overriding Configuration Parameters</ref></para>
</listitem><listitem><para><ref refid="index_1pipeBase_argumentParser_retargetSubtasks" kindref="member">Retargeting Subtasks</ref></para>
</listitem><listitem><para><ref refid="index_1pipeBase_argumentParser_debugVariables" kindref="member">Specifying Debug Variables</ref></para>
</listitem></itemizedlist>
</para>
</listitem><listitem><para><ref refid="index_1pipeBase_autoLoadedConfigOverrideFiles" kindref="member">Automatically Loaded Config Override Files</ref></para>
</listitem><listitem><para><ref refid="index_1pipeBase_environmentVariables" kindref="member">Environment Variables</ref></para>
</listitem><listitem><para><ref refid="index_1pipeBase_other" kindref="member">Other Resources</ref></para>
</listitem></itemizedlist>
</para>
</sect1>
<sect1 id="index_1pipeBase_introduction">
<title>Introduction</title>
<para><ref refid="namespacelsst_1_1pipe_1_1base" kindref="compound">lsst::pipe::base</ref> provides a data processing pipeline infrastructure. Data processing is performed by &quot;tasks&quot;, which are instances of <ref refid="classlsst_1_1pipe_1_1base_1_1task_1_1_task" kindref="compound">Task</ref> or <ref refid="classlsst_1_1pipe_1_1base_1_1cmd_line_task_1_1_cmd_line_task" kindref="compound">CmdLineTask</ref>. Tasks perform a wide range of data processing operations, from basic operations such as assembling raw images into CCD images (trimming overscan), fitting a WCS or detecting sources on an image, to complex combinations of such operations.</para>
<para><bold>Tasks</bold> are hierarchical. Each task may may call other tasks to perform some of its data processing; we say that a &quot;parent task&quot; calls a &quot;subtask&quot;. The highest-level task is called the &quot;top-level task&quot;. To call a subtask, the parent task constructs the subtask and then calls methods on it. Thus data transfer between tasks is simply a matter of passing the data as arguments to function calls.</para>
<para><bold>Command-line tasks</bold> are tasks that can be <ref refid="index_1pipeBase_argumentParser" kindref="member">run from the command line</ref>. You might think of them as the LSST equivalent of a data processing pipeline. Despite their extra capabilities, command-line tasks can also be used as ordinary tasks and called as subtasks by other tasks. Command-line tasks are subclasses of <ref refid="classlsst_1_1pipe_1_1base_1_1cmd_line_task_1_1_cmd_line_task" kindref="compound">CmdLineTask</ref>.</para>
<para>Each task is configured using the <ref refid="index_1secConfigIntro" kindref="member" external="/data1/kirg/hscpipe8/stack/miniconda3-py38_4.9.2-0.4.3/Linux64/pex_config/22.0.0+f5e6047307/doc/pex_config.tag">pex_config package</ref>, using a task-specific subclass of <ref refid="classlsst_1_1pex_1_1config_1_1config_1_1Config" kindref="compound" external="/data1/kirg/hscpipe8/stack/miniconda3-py38_4.9.2-0.4.3/Linux64/pex_config/22.0.0+f5e6047307/doc/pex_config.tag">pex.config.config.Config</ref>. The task&apos;s configuration includes all subtasks that the task may call. As a result, it is easy to replace (or &quot;retarget&quot;) one subtask with another. A common use for this is to provide a camera-specific variant of a particular task, e.g. use one version for SDSS imager data and another version for Subaru Hyper Suprime-Cam data).</para>
<para>Tasks may process multiple items of data in parallel, using Python&apos;s <computeroutput>multiprocessing</computeroutput> library. Support for this is built into the <ref refid="classlsst_1_1pipe_1_1base_1_1argument_parser_1_1_argument_parser" kindref="compound">ArgumentParser</ref> and <ref refid="classlsst_1_1pipe_1_1base_1_1cmd_line_task_1_1_task_runner" kindref="compound">TaskRunner</ref>.</para>
<para>Most tasks have a <computeroutput>run</computeroutput> method that performs the primary data processing. Each task&apos;s <computeroutput>run</computeroutput> method should return a <ref refid="classlsst_1_1pipe_1_1base_1_1struct_1_1_struct" kindref="compound">Struct</ref>. This allows named access to returned data, which provides safer evolution than relying on the order of returned values. All task methods that return more than one or two items of data should return the data in a <ref refid="classlsst_1_1pipe_1_1base_1_1struct_1_1_struct" kindref="compound">Struct</ref>.</para>
<para>Many tasks are found in the <computeroutput>pipe_tasks</computeroutput> package, especially tasks that use many different packages and don&apos;t seem to belong in any one of them. Tasks that are associated with a particular package should be in that package; for example the instrument signature removal task ip.isr.isrTask.IsrTask is in the ip_isr package.</para>
<para><computeroutput>pipe_base</computeroutput> is written purely in Python. The most important contents are:<itemizedlist>
<listitem><para><ref refid="classlsst_1_1pipe_1_1base_1_1cmd_line_task_1_1_cmd_line_task" kindref="compound">CmdLineTask</ref>: base class for pipeline tasks that can be run from the command line.</para>
</listitem><listitem><para><ref refid="classlsst_1_1pipe_1_1base_1_1task_1_1_task" kindref="compound">Task</ref>: base class for subtasks that are not meant to be run from the command line.</para>
</listitem><listitem><para><ref refid="classlsst_1_1pipe_1_1base_1_1struct_1_1_struct" kindref="compound">Struct</ref>: object returned by the run method of a task.</para>
</listitem><listitem><para><ref refid="classlsst_1_1pipe_1_1base_1_1argument_parser_1_1_argument_parser" kindref="compound">ArgumentParser</ref>: command line parser for pipeline tasks.</para>
</listitem><listitem><para><ref refid="namespacelsst_1_1pipe_1_1base_1_1timer_1af758ebfeb5647021d9d4247ed6f76d80" kindref="member">timeMethod</ref>: decorator to log performance information for a <ref refid="classlsst_1_1pipe_1_1base_1_1task_1_1_task" kindref="compound">Task</ref> method.</para>
</listitem><listitem><para><ref refid="classlsst_1_1pipe_1_1base_1_1cmd_line_task_1_1_task_runner" kindref="compound">TaskRunner</ref>: a class that runs command-line tasks, using multiprocessing when requested. This will work &quot;as is&quot; for most command-line tasks, but will need to be be subclassed if, for instance, the task&apos;s run method needs something other than a single data reference.</para>
</listitem></itemizedlist>
</para>
</sect1>
<sect1 id="index_1pipeBase_argumentParser">
<title>Running Command-Line Tasks</title>
<para>Each command-line task typically has a short &quot;task runner script&quot; to run the task in the bin/ directory of whatever package the task is defined in. This section deals with the command-line options of these task runner scripts.</para>
<para>Specify <computeroutput>--help</computeroutput> to print help. When in doubt give this a try.</para>
<para>The first argument to a task must be the path to the input repository (or <computeroutput>--help</computeroutput>). For example:<itemizedlist>
<listitem><para><computeroutput>myTask.py path/to/input --id...</computeroutput> is valid: input path is the first argument</para>
</listitem><listitem><para><computeroutput>myTask.py --id ... path/to/input</computeroutput> is <bold>invalid</bold>: an option comes before the input path</para>
</listitem></itemizedlist>
</para>
<para><computeroutput>--output</computeroutput> specifies the path to the output repository. Some tasks also support <computeroutput>--calib</computeroutput>: the path to input calibration data. To shorten input, output and calib paths see <ref refid="index_1pipeBase_environmentVariables" kindref="member">Environment Variables</ref>.</para>
<para>Data is usually specified by the <computeroutput>--id</computeroutput> argument with <computeroutput>key=value</computeroutput> pairs as the value, where the keys depend on the camera and type of data. If you run the task and specify both an input data repository and <computeroutput>--help</computeroutput> then the printed help will show you valid keys (the input repository tells the task what kind of camera data is being processed). See <ref refid="index_1pipeBase_argumentParser_dataIDs" kindref="member">Specifying Data IDs</ref> for more information about data IDs. A few tasks take more than one kind of data ID, or have renamed the <computeroutput>--id</computeroutput> argument; run the task with <computeroutput>--help</computeroutput> or see the task&apos;s documentation for details.</para>
<para>You may show the config, subtasks and/or data using <computeroutput>--show</computeroutput>. By default <computeroutput>--show</computeroutput> quits after printing the information, but <computeroutput>--show run</computeroutput> allows the task to run. For example:<itemizedlist>
<listitem><para><computeroutput>--show config data tasks</computeroutput> shows the config, data and subtasks, and then quits.</para>
</listitem><listitem><para><computeroutput>--show tasks run</computeroutput> show the subtasks and then runs the task.</para>
</listitem></itemizedlist>
</para>
<para>For long or repetitive command lines you may wish to specify some arguments in separate text files. See <ref refid="index_1pipeBase_argumentParser_argumentFiles" kindref="member">Argument Files</ref> for details.</para>
<sect2 id="index_1pipeBase_argumentParser_dataIDs">
<title>Specifying Data IDs</title>
<para><computeroutput>--id</computeroutput> and other data identifier arguments are used to specify IDs for input and output data. The ID keys depend on the camera and on the kind of data being processed. For example, lsstSim calibrated exposures are identified by the following keys: <computeroutput>visit</computeroutput>, <computeroutput>filter</computeroutput>, <computeroutput>raft</computeroutput> and <computeroutput>sensor</computeroutput> (and a given visit has exactly one filter).</para>
<para>Omit a key to specify all values of that key. For example, for lsstSim calibrated exposures:<itemizedlist>
<listitem><para><computeroutput>--id visit=54123</computeroutput> specifies all rafts and sensors for visit 54123 (and all filters, but there is just one filter per visit).</para>
</listitem><listitem><para><computeroutput>--id visit=54123 raft=1,0</computeroutput> specifies all sensors for visit raft 1,0 of visit 54123</para>
</listitem></itemizedlist>
</para>
<para>To specify multiple data IDs you may separate values with ^ (a character that does not have special meaning to the unix command parser). The result is the outer product (all possible combinations). For example:<itemizedlist>
<listitem><para><computeroutput>--id visit=54123^55523 raft=1,1^2,1</computeroutput> specifies four IDs: visits 54123 and 55523 of rafts 1,1 and 2,1</para>
</listitem></itemizedlist>
</para>
<para>You may specify a data identifier argument as many times as you like. Each one is treated independently. Thus the following example specifies all sensors for four combinations of visit and raft, plus all sensors for one raft of two other visits for calibrated lsstSim data:<itemizedlist>
<listitem><para><computeroutput>--id visit=54123^55523 raft=1,1^2,1 --id visit=623459^293423 raft=0,0</computeroutput></para>
</listitem></itemizedlist>
</para>
</sect2>
<sect2 id="index_1pipeBase_argumentParser_rerun">
<title>The –rerun Option</title>
<para>The <computeroutput>--rerun</computeroutput> option is an alternate way to specify the output and, optionally, input repositories for a command line task. Unlike <computeroutput>--output</computeroutput>, the value supplied to <computeroutput>--rerun</computeroutput> is relative to the <computeroutput>rerun</computeroutput> directory of the root input data repository (i.e. follow the chain of parent repositories—indicated by files in the repository root named <computeroutput>_parent</computeroutput>—all the way back, then add <computeroutput>rerun</computeroutput> to that). <computeroutput>--rerun</computeroutput> saves the user from typing in the input repository twice. For example,</para>
<para><programlisting><codeline><highlight class="normal">processCcd.py<sp/>$root/hsc<sp/>--output<sp/>$root/hsc/rerun/Vishal/aRerun</highlight></codeline>
</programlisting></para>
<para>which (for some semantically insignificant version of <computeroutput>$root</computeroutput>) will run <computeroutput>processCcd.py</computeroutput> on the data in <computeroutput>$root/hsc</computeroutput> and put the output in <computeroutput>$root/hsc/rerun/Vishal/aRerun</computeroutput>, can be shortened by using <computeroutput>--rerun</computeroutput> to</para>
<para><programlisting><codeline><highlight class="normal">processCcd.py<sp/>$root/hsc<sp/>--rerun<sp/>Vishal/aRerun</highlight></codeline>
</programlisting></para>
<para>This is useful because outputs from the pipeline are conventionally placed in a subdirectory of a &quot;rerun&quot; directory present in a per-camera root repository. For example:</para>
<para><itemizedlist>
<listitem><para><computeroutput>$root/hsc/rerun/public</computeroutput> # camera <computeroutput>hsc</computeroutput>; a public rerun useful for many people.</para>
</listitem><listitem><para><computeroutput>$root/hsc/rerun/Jim/aTicket/fixed-psf</computeroutput> # camera <computeroutput>hsc</computeroutput>; one of several private reruns used to debug a single issue.</para>
</listitem><listitem><para><computeroutput>$root/lsstSim/Simon/aTicket/rerun/Jim/anotherTicket</computeroutput> # camera <computeroutput>lsstSim</computeroutput>; simulated by user <computeroutput>Simon</computeroutput>; processed by user <computeroutput>Jim</computeroutput>.</para>
</listitem></itemizedlist>
</para>
<para>Additionally, <computeroutput>--rerun path1:path2</computeroutput> will read from the rerun specified by <computeroutput>path1</computeroutput> and write to the rerun specified by <computeroutput>path2</computeroutput>. This is referred to as &quot;chaining&quot; reruns. For example:</para>
<para><programlisting><codeline><highlight class="normal">processCcd.py<sp/>$root/hsc<sp/>--rerun<sp/>Paul/procCcds<sp/>...<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>#<sp/>Paul<sp/>processes<sp/>some<sp/>CCDs.</highlight></codeline>
<codeline><highlight class="normal">makeCoaddTempExp.py<sp/>$root/hsc<sp/>--rerun<sp/>Paul/procCcds:Jim/coaddRerun<sp/>...<sp/><sp/><sp/>#<sp/>Jim<sp/>uses<sp/>Paul&apos;s<sp/>CCD<sp/>processing</highlight></codeline>
<codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>#<sp/>to<sp/>start<sp/>building<sp/>a<sp/>coadd.</highlight></codeline>
</programlisting></para>
<para>Note that:</para>
<para><itemizedlist>
<listitem><para>If the argument to <computeroutput>--rerun</computeroutput> starts with a <computeroutput>/</computeroutput>, it will be interpreted as an absolute path rather than as being relative to the root input data repository.</para>
</listitem><listitem><para>The argument(s) supplied to <computeroutput>--rerun</computeroutput> may refer to symbolic links to directories; data will be read or written from their targets.</para>
</listitem></itemizedlist>
</para>
</sect2>
<sect2 id="index_1pipeBase_argumentParser_argumentFiles">
<title>Argument Files</title>
<para>You may specify long or repetitive command-line arguments in text files and reference those files using <computeroutput>@</computeroutput><emphasis>path</emphasis>.</para>
<para>The contents of the files are identical to the command line, except that long lines must not have a \ continuation character. For example if the file <computeroutput>foo.txt</computeroutput> contains: <programlisting><codeline><highlight class="normal">--id<sp/>visit=54123^55523<sp/>raft=1,1^2,1</highlight></codeline>
<codeline><highlight class="normal">--config<sp/>someParam=someValue<sp/>--configfile<sp/>configOverrideFilePath</highlight></codeline>
</programlisting></para>
<para>you can then reference it with <computeroutput>@foo.txt</computeroutput> and mix that with other command-line arguments (including <computeroutput>--id</computeroutput> and <computeroutput>--config</computeroutput>): <programlisting><codeline><highlight class="normal">myTask.py<sp/>inputPath<sp/>@foo.txt<sp/>--config<sp/>anotherParam=anotherValue<sp/>--output<sp/>outputPath</highlight></codeline>
</programlisting></para>
</sect2>
<sect2 id="index_1pipeBase_argumentParser_configOverride">
<title>Overriding Configuration Parameters</title>
<para>The argument parser automatically loads specific configuration override files based on the camera name and its obs_ package. See <ref refid="index_1pipeBase_autoLoadedConfigOverrideFiles" kindref="member">Automatically Loaded Config Override Files</ref>. The format of a configuration override file matches the configuration shown using <computeroutput>--show config</computeroutput> (in particular, note that <computeroutput>config</computeroutput> in a configuration override file is the word that matches <computeroutput>self.config</computeroutput> in a task when the task uses its config).</para>
<para>In addition, you can specify configuration override files on the command line using <computeroutput>--configfile</computeroutput> and override some (but not all) configuration parameters directly on the command line using <computeroutput>--config</computeroutput>, as shown in these examples:<itemizedlist>
<listitem><para><computeroutput>--config str1=foo str2=&quot;fancier string&quot; int1=5 intList=2,4,-87 float1=1.53 floatList=3.14,-5.6e7</computeroutput></para>
</listitem><listitem><para><computeroutput>--configfile config.py</computeroutput>, where file <computeroutput>config.py</computeroutput> contains: <programlisting><codeline><highlight class="normal">config.strList<sp/>=<sp/>&quot;first<sp/>string&quot;,<sp/>&quot;second<sp/>string&quot;</highlight></codeline>
</programlisting></para>
</listitem></itemizedlist>
</para>
<para><simplesect kind="note"><para><computeroutput>config</computeroutput> in a configuration override file is equivalent to <computeroutput>self.config</computeroutput> in a task.</para>
</simplesect>
You can use a config file (e.g. as specified by <computeroutput>--configfile</computeroutput>) to override any config parameter, but the simpler <computeroutput>--config</computeroutput> command-line option has significant limitations:<itemizedlist>
<listitem><para>You cannot <ref refid="index_1pipeBase_argumentParser_retargetSubtasks" kindref="member">retarget a subtask</ref> specified by a <ref refid="classlsst_1_1pex_1_1config_1_1configurableField_1_1ConfigurableField" kindref="compound" external="/data1/kirg/hscpipe8/stack/miniconda3-py38_4.9.2-0.4.3/Linux64/pex_config/22.0.0+f5e6047307/doc/pex_config.tag">lsst.pex.config.ConfigurableField</ref> (which is the most common case)</para>
</listitem><listitem><para>For items in registries, you can only specify values for the active (current) item</para>
</listitem><listitem><para>You cannot specify values for lists of strings</para>
</listitem><listitem><para>You cannot specify a subset of list; you must specify all values at once</para>
</listitem></itemizedlist>
</para>
<para>See <ref refid="index_1pipeBase_argumentParser_retargetSubtasks" kindref="member">Retargeting Subtasks</ref> for more information about overriding configuration parmaters in subtasks.</para>
</sect2>
<sect2 id="index_1pipeBase_argumentParser_retargetSubtasks">
<title>Retargeting Subtasks</title>
<para>As a special case of <ref refid="index_1pipeBase_argumentParser_configOverride" kindref="member">overriding configuration parameters</ref>, users may replace one subtask with another; this is called &quot;retargeting&quot; the subtask. One common use case is to use a camera-specific variant of a subtask. Examples include:<itemizedlist>
<listitem><para>lsst.obs.subaru.isr.SuprimeCamIsrTask: a version of instrument signature removal (ISR or detrending) for Suprime-Cam and Hyper Suprime-Cam</para>
</listitem><listitem><para>lsst.obs.sdss.selectSdssImages.SelectSdssImagesTask: an version of the task that selects images for co-addition of SDSS stripe 82 images</para>
</listitem></itemizedlist>
</para>
<para>How you retarget a subtask and override its config parameters depends on whether the task is specified as an <ref refid="classlsst_1_1pex_1_1config_1_1configurableField_1_1ConfigurableField" kindref="compound" external="/data1/kirg/hscpipe8/stack/miniconda3-py38_4.9.2-0.4.3/Linux64/pex_config/22.0.0+f5e6047307/doc/pex_config.tag">lsst.pex.config.ConfigurableField</ref> (the most common case, and the source of the term &quot;retarget&quot;) or as an <ref refid="classlsst_1_1pex_1_1config_1_1registry_1_1RegistryField" kindref="compound" external="/data1/kirg/hscpipe8/stack/miniconda3-py38_4.9.2-0.4.3/Linux64/pex_config/22.0.0+f5e6047307/doc/pex_config.tag">lsst.pex.config.RegistryField</ref>.</para>
<para>To override a subtask specified as an <ref refid="classlsst_1_1pex_1_1config_1_1configurableField_1_1ConfigurableField" kindref="compound" external="/data1/kirg/hscpipe8/stack/miniconda3-py38_4.9.2-0.4.3/Linux64/pex_config/22.0.0+f5e6047307/doc/pex_config.tag">lsst.pex.config.ConfigurableField</ref> use <computeroutput>retarget</computeroutput> method of the field. To override config parameters use simple dotted notation. Here is an example: <preformatted>
    # Example of retargeting a subtask and overriding its configuration
    # for a subtask specified by an lsst.pex.config.ConfigurableField

    # import the task and then retarget it
    from ... import FooTask
    config.configurableSubtask.retarget(FooTask)

    # override a config parameter
    config.configurableSubtask.subtaskParam1 = newValue
</preformatted></para>
<para><simplesect kind="warning"><para>when you retarget a task specified by an <ref refid="classlsst_1_1pex_1_1config_1_1configurableField_1_1ConfigurableField" kindref="compound" external="/data1/kirg/hscpipe8/stack/miniconda3-py38_4.9.2-0.4.3/Linux64/pex_config/22.0.0+f5e6047307/doc/pex_config.tag">lsst.pex.config.ConfigurableField</ref> you lose all configuration overrides for both the old and new task. This limitation is not shared by <ref refid="classlsst_1_1pex_1_1config_1_1registry_1_1RegistryField" kindref="compound" external="/data1/kirg/hscpipe8/stack/miniconda3-py38_4.9.2-0.4.3/Linux64/pex_config/22.0.0+f5e6047307/doc/pex_config.tag">lsst.pex.config.RegistryField</ref>.</para>
</simplesect>
To retarget a subtask specified as an <ref refid="classlsst_1_1pex_1_1config_1_1registry_1_1RegistryField" kindref="compound" external="/data1/kirg/hscpipe8/stack/miniconda3-py38_4.9.2-0.4.3/Linux64/pex_config/22.0.0+f5e6047307/doc/pex_config.tag">lsst.pex.config.RegistryField</ref> set the <computeroutput>name</computeroutput> property of the field. There are two ways to override configuration parameters for tasks in a registry: you may set parameters for the active task using the registry field&apos;s <computeroutput>active</computeroutput> parameter, and you may set parameters for any registered task using dictionary notation and the name by which the task is registered. Here is an example that assumes a task <computeroutput>FooTask</computeroutput> is defined in module <computeroutput>.../foo.py</computeroutput> and registered using name &quot;foo&quot;. :</para>
<para><preformatted>
    # Example of retargeting a subtask and overriding its configuration
    # for a subtask specified by an lsst.pex.config.RegistryField

    # Import the task&apos;s module, so the task registers itself,
    # then set the name property of the field to the name by which FooTask is registered:
    import .../foo.py
    config.registrySubtask.name = &quot;foo&quot;

    # You can override the active subtask&apos;s configuration using attribute `active`
    config.registrySubtask.active.subtaskParam1 = newValue

    # Such overrides can also be specified on the command line, e.g.
    # --config registrySubtask.active.subtaskParam1 = newValue

    # You can also override parameters in any subtask in the registry using dictionary access,
    # but this can only be done in a config override file, not on the command line:
    config.registrySubtask[&quot;foo&quot;].subtaskParam1 = newValue
</preformatted></para>
</sect2>
<sect2 id="index_1pipeBase_argumentParser_debugVariables">
<title>Specifying Debug Variables</title>
<para>Some tasks support debug variables that can be set, while running from the command line, to display additional information. Each task documents which debug variables it supports. See <ref refid="base_debug" kindref="compound" external="/data1/kirg/hscpipe8/stack/miniconda3-py38_4.9.2-0.4.3/Linux64/base/22.0.0+04719a4bac/doc/base.tag">Using lsstDebug to control debugging output</ref> for information about how to enable specific debug variables while running from the command line.</para>
</sect2>
</sect1>
<sect1 id="index_1pipeBase_autoLoadedConfigOverrideFiles">
<title>Automatically Loaded Config Override Files</title>
<para>When a pipeline task is run, two camera-specific <ref refid="index_1pipeBase_argumentParser_configOverride" kindref="member">configuration override files</ref> are loaded, if found; first one for the obs_ package then one for the camera. (There are two because some obs_ packages contain data for multiple cameras). These files may override configuration parameters or even <ref refid="index_1pipeBase_argumentParser_retargetSubtasks" kindref="member">retarget subtasks</ref> with camera-specific variants (e.g. for instrument signature removal). The configuration override files are, in order:<itemizedlist>
<listitem><para><emphasis>obs_path</emphasis>/config/<emphasis>task_name</emphasis>.py</para>
</listitem><listitem><para><emphasis>obs_path</emphasis>/config/<emphasis>camera_name</emphasis>/<emphasis>task_name</emphasis>.py</para>
</listitem></itemizedlist>
</para>
<para>where the path elements are:<itemizedlist>
<listitem><para><emphasis>task_name</emphasis>: the name of the pipeline task (the value of its <computeroutput>_DefaultName</computeroutput> class variable), e.g. &quot;processCcd&quot; for lsst.pipe.tasks.processCcd.ProcessCcdTask.</para>
</listitem><listitem><para><emphasis>camera_name</emphasis>: the name of the camera, e.g. &quot;lsstSim&quot;</para>
</listitem><listitem><para><emphasis>obs_path</emphasis>: the path to the obs_ package for the camera, e.g. the path to obs_lsstSim</para>
</listitem></itemizedlist>
</para>
<para>Here are two examples:<itemizedlist>
<listitem><para>obs_lsstSim/config/makeCoaddTempExp.py: specifies which version of the image selector task to use for co-adding LSST simulated images</para>
</listitem><listitem><para>obs_subaru/config/hsc/isr.py: provides overrides for the instrument signature removal (aka detrending) task for Hyper Suprime-Cam</para>
</listitem></itemizedlist>
</para>
</sect1>
<sect1 id="index_1pipeBase_environmentVariables">
<title>Environment Variables</title>
<para>The command parser uses environment variables PIPE_INPUT_ROOT, PIPE_CALIB_ROOT, and PIPE_OUTPUT_ROOT, if available, to make it easier to specify the input, calib and output data repositories. Each environment variable is used as a root directory for relative paths and ignored for absolute paths. The default value for each of these environment variables is the current working directory. For example:<itemizedlist>
<listitem><para>mytask foo # use $PIPE_INPUT_ROOT/foo as the input repository (or ./foo if $PIPE_INPUT_ROOT is undefined)</para>
</listitem><listitem><para>mytask . # use $PIPE_INPUT_ROOT (= $PIPE_INPUT_ROOT/.) as the input repository</para>
</listitem><listitem><para>mytask /a/b # use /a/b as the input repository ($PIPE_INPUT_ROOT is ignored for absolute paths)</para>
</listitem></itemizedlist>
</para>
</sect1>
<sect1 id="index_1pipeBase_other">
<title>Other Resources</title>
<para>pipe_tasks introduction includes links to:<itemizedlist>
<listitem><para>A page listing documentation for many tasks</para>
</listitem><listitem><para>A manual on how to write a task</para>
</listitem><listitem><para>A manual on how to write a command-line task </para>
</listitem></itemizedlist>
</para>
</sect1>
    </detaileddescription>
    <location file="doc/main.dox"/>
  </compounddef>
</doxygen>
