### Navigate to Example Directory Source: https://pipelines.lsst.io/getting-started/uber-cal.html Start in the top directory of the example git repository to set up your shell session. ```bash cd $RC2_SUBSET_DIR ``` -------------------------------- ### Setup Installed Dataset Source: https://pipelines.lsst.io/modules/lsst.ap.verify/datasets-install.html After installation, set up the dataset for the current session. Use the appropriate command based on how the dataset was installed. ```bash setup ap_verify_ci_cosmos_pdr2 # Installed with rebuild ``` ```bash setup -r /my/path/ap_verify_ci_cosmos_pdr2 # Installed with git clone ``` -------------------------------- ### Install and setup lsst_apps Source: https://pipelines.lsst.io/install/top-level-packages.html Use this command to install only the core frameworks and algorithmic code, which may be convenient when space is limited. Replace `` with the desired release tag. ```bash eups distrib install lsst_apps -t setup lsst_apps ``` -------------------------------- ### Install Gaussian PSF Task Example Source: https://pipelines.lsst.io/modules/lsst.meas.algorithms/tasks/lsst.meas.algorithms.installGaussianPsf.InstallGaussianPsfTask.html Demonstrates how to use InstallGaussianPsfTask to set a Gaussian PSF model on an exposure. The example verifies that the measured FWHM of the created PSF is close to the configured FWHM. ```python from lsst.afw.image import ExposureF from lsst.meas.algorithms.installGaussianPsf import InstallGaussianPsfTask, FwhmPerSigma exposure = ExposureF(100, 100) task = InstallGaussianPsfTask() task.run(exposure=exposure) # This particular exposure had no PSF model to begin with, so the new PSF model # uses the config's FWHM. However, measured FWHM is based on the truncated # PSF image, so it does not exactly match the input center = exposure.getBBox().getCenter() measFwhm = exposure.getPsf().computeShape(center).getDeterminantRadius() * FwhmPerSigma assert abs(measFwhm - task.config.fwhm) < 1e-3 ``` -------------------------------- ### InstallEups Example Source: https://pipelines.lsst.io/py-api/lsst.sconsUtils.installation.SConsUtilsEnvironment.html Installs a ups directory, setting absolute versions as appropriate. Presetup allows overriding versioning behavior. ```python env.InstallEups( os.path.join(env["prefix"], "ups"), presetup={"sconsUtils": env["version"]}, ) ``` -------------------------------- ### Install ctrl_bps_htcondor Plugin Source: https://pipelines.lsst.io/modules/lsst.ctrl.bps.htcondor/userguide.html Clone the repository, navigate to the directory, and use the setup script and scons to install the latest features. ```bash git clone https://github.com/lsst/ctrl_bps_htcondor cd ctrl_bps_htcondor setup -k -r . scons ``` -------------------------------- ### Set Up LSST Science Pipelines Source: https://pipelines.lsst.io/install/lsstsw.html Use the `setup` command to configure your environment with the installed LSST Science Pipelines. ```bash setup lsst_distrib ``` -------------------------------- ### List Set Up Packages Source: https://pipelines.lsst.io/install/setup.html Use 'eups list -s' to view currently set up packages and their versions. Run 'eups list' to see all installed packages, regardless of their setup status. ```bash eups list -s ``` ```bash eups list ``` -------------------------------- ### Install and setup lsst_distrib Source: https://pipelines.lsst.io/install/top-level-packages.html Use this command to install all core Science Pipelines functionality, including measurement algorithms and cluster execution middleware. Replace `` with the desired release tag. ```bash eups distrib install lsst_distrib -t setup lsst_distrib ``` -------------------------------- ### Create and navigate to installation directory Source: https://pipelines.lsst.io/install/lsstinstall.html Create a directory for the LSST Science Pipelines installation and change into it. ```bash mkdir -p lsst_stack cd lsst_stack ``` -------------------------------- ### Navigate to Example Directory Source: https://pipelines.lsst.io/getting-started/multiband-analysis.html Change the current directory to the top directory of the example git repository. ```bash cd $RC2_SUBSET_DIR ``` -------------------------------- ### List Setup Packages Source: https://pipelines.lsst.io/modules/lsst.analysis.tools/getting-started.html Check which packages are currently set up in your environment. This command is useful for verifying that analysis_tools has been correctly installed and is recognized by the stack. ```bash eups list -s ``` -------------------------------- ### Setup and Run the Demo Source: https://pipelines.lsst.io/install/demo.html Set up the processing package and execute the demo script. This will create a Butler data repository and process sample data. ```bash setup -r . ./bin/run_demo.sh ``` -------------------------------- ### Create and Navigate to Demo Directory Source: https://pipelines.lsst.io/install/demo.html Create a directory for the demo data and change into it. ```bash mkdir -p demo_data cd demo_data ``` -------------------------------- ### Install Jupyterlab and Firefly Extension Source: https://pipelines.lsst.io/modules/lsst.display.firefly/using-firefly-standalone.html Installs Jupyterlab, nodejs, ipywidgets, and the Firefly Jupyterlab extension within the Science Pipelines container. This is a one-time setup step. ```bash conda install jupyterlab nodejs ipywidgets npm install —global babel-cli jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyter labextension install jupyter_firefly_extensions pip install jupyter_firefly_extensions jupyter serverextension enable --py jupyter_firefly_extensions ``` -------------------------------- ### Set up the package in EUPS Source: https://pipelines.lsst.io/install/package-development.html From the package's root directory, use the 'setup' command to integrate it into the EUPS stack for the current user. ```bash setup -r . -t $USER ``` -------------------------------- ### Example: runInit Configuration Source: https://pipelines.lsst.io/modules/lsst.ctrl.bps/quickstart.html Illustrates how to configure `runInit` to include `pipetask --init-only` and specifies the `runQuantumCommand` for initialization. Ensure that if both `--output` and `--output-run` are used in `pipetaskInit`, they are also present in other `runQuantumCommand` specifications. ```yaml payload: runInit: true pipetask: pipetaskInit: runQuantumCommand: "${CTRL_MPEXEC_DIR}/bin/pipetask --long-log run -b {butlerConfig} -i {inCollection} --output {output} --output-run {outputRun} --init-only --register-dataset-types --qgraph {qgraphFile} --clobber-outputs" requestMemory: 2048 ``` -------------------------------- ### Set Up Top-Level Package Source: https://pipelines.lsst.io/install/setup.html After loading the environment, set up a top-level package like 'lsst_apps' or 'lsst_distrib' to make its functionality available. ```bash setup ``` ```bash setup lsst_apps ``` ```bash setup lsst_distrib ``` -------------------------------- ### getEnvironmentPackages Source: https://pipelines.lsst.io/py-api/lsst.utils.packages.getEnvironmentPackages.html Retrieves a dictionary of installed products and their versions from the environment. It can optionally include all setup packages, not just locally-setup ones. ```APIDOC ## getEnvironmentPackages ### Description Get products and their versions from the environment. ### Method `getEnvironmentPackages(_include_all : bool = False_)` ### Parameters #### Query Parameters - **include_all** (bool) - Optional - If `False` only returns locally-setup packages. If `True` all set up packages are returned with a version that includes any associated non-current tags. ### Returns - **packages** (dict[str, str]) - A dictionary where keys are product names (str) and values are their versions (str). ### Notes Uses EUPS to determine versions for certain products and to check for uninstalled packages. Only reports product/version for these unless `include_all` is `True`. Assumes no new EUPS packages are set up after the first call. ``` -------------------------------- ### Example Subclass for ObsTests Source: https://pipelines.lsst.io/py-api/lsst.obs.base.tests.ObsTests.html Demonstrates how to create a subclass that inherits from lsst.obs.base.tests.ObsTests and lsst.utils.tests.TestCase, including necessary setup calls. ```python class TestObs( lsst.obs.base.tests.ObsTests, lsst.utils.tests.TestCase ): def setUp(self): self.setUp_tests(...) self.setUp_butler_get(...) self.setUp_camera(...) ``` -------------------------------- ### Graph Degree Examples Source: https://pipelines.lsst.io/py-api/lsst.ctrl.bps.htcondor.HTCDag.html Demonstrates how to get the degree of nodes in a directed graph. Use this to find the number of edges connected to a node. ```python >>> G = nx.DiGraph() # or MultiDiGraph >>> nx.add_path(G, [0, 1, 2, 3]) >>> G.degree(0) # node 0 with degree 1 1 >>> list(G.degree([0, 1, 2])) [(0, 1), (1, 2), (2, 2)] ``` -------------------------------- ### Get Full Task Name Source: https://pipelines.lsst.io/py-api/lsst.ip.isr.IsrTask.html Obtains the hierarchical name of the task, including parent task names, separated by periods. For example, 'top.sub.sub2'. ```python fullName = task.getFullName() ``` -------------------------------- ### Example: Creating and Updating a DemoConfig Source: https://pipelines.lsst.io/py-api/lsst.cp.pipe.PlotPhotonTransferCurveConfig.html Demonstrates how to define a Config subclass with fields, instantiate it, and update its values using the update method. ```python >>> from lsst.pex.config import Config, Field >>> class DemoConfig(Config): ... fieldA = Field(doc="Field A", dtype=int, default=42) ... fieldB = Field(doc="Field B", dtype=bool, default=True) ... fieldC = Field(doc="Field C", dtype=str, default="Hello world") >>> config = DemoConfig() ``` ```python >>> for name, value in config.iteritems(): ... print(f"{name}: {value}") fieldA: 42 fieldB: True fieldC: 'Hello world' ``` ```python >>> config.update(fieldA=13, fieldC="Updated!") ``` ```python >>> for name, value in config.iteritems(): ... print(f"{name}: {value}") fieldA: 13 fieldB: True fieldC: 'Updated!' ``` -------------------------------- ### Get Full Metadata Example Source: https://pipelines.lsst.io/py-api/lsst.pipe.tasks.postprocess.TransformCatalogBaseTask.html Retrieves metadata for all tasks, including timing information and task-specific metadata. Metadata keys are hierarchical task names. ```python metadata = task.getFullMetadata() # metadata is a TaskMetadata object # The keys are the full task name, e.g.: # 'topLevelTaskName:subtaskName:subsubtaskName.itemName' ``` -------------------------------- ### Build Science Pipelines Packages Source: https://pipelines.lsst.io/install/lsstsw.html Use the `rebuild` command to build the `lsst_distrib` package. The `-t current` argument tags the installed packages for automatic setup. ```bash rebuild -t current lsst_distrib ``` -------------------------------- ### List all set up packages Source: https://pipelines.lsst.io/install/package-development.html Display all packages currently set up in the EUPS environment, including development packages. ```bash eups list -s ``` -------------------------------- ### DemoConfig Example: Initialization and Iteration Source: https://pipelines.lsst.io/py-api/lsst.analysis.ap.PlotImageSubtractionCutoutsConfig.html Demonstrates the creation of a custom Config class with fields and iterating over its default values. ```python >>> from lsst.pex.config import Config, Field >>> class DemoConfig(Config): ... fieldA = Field(doc="Field A", dtype=int, default=42) ... fieldB = Field(doc="Field B", dtype=bool, default=True) ... fieldC = Field(doc="Field C", dtype=str, default="Hello world") >>> config = DemoConfig() ``` ```python >>> for name, value in config.iteritems(): ... print(f"{name}: {value}") fieldA: 42 fieldB: True fieldC: 'Hello world' ``` -------------------------------- ### Verify LSST Science Pipelines Installation Source: https://pipelines.lsst.io/getting-started/data-setup.html Run this command in your shell to confirm that the LSST Science Pipelines environment is correctly set up. Look for the word 'setup' in the output. ```bash eups list lsst_distrib ``` -------------------------------- ### Defining and Using a Demo Configuration Source: https://pipelines.lsst.io/py-api/lsst.meas.extensions.shapeHSM.HsmPsfMomentsConfig.html Demonstrates how to define a custom configuration class with fields and their default values. This example shows how to instantiate the config and iterate over its fields. ```python from lsst.pex.config import Config, Field class DemoConfig(Config): fieldA = Field(doc="Field A", dtype=int, default=42) fieldB = Field(doc="Field B", dtype=bool, default=True) fieldC = Field(doc="Field C", dtype=str, default="Hello world") config = DemoConfig() ``` ```python for name, value in config.iteritems(): print(f"{name}: {value}") ``` ```python for name, value in config.iteritems(): print(f"{name}: {value}") ``` -------------------------------- ### Import and Initialize Debug Info Source: https://pipelines.lsst.io/py-api/lsstDebug.Info.html Import the lsstDebug module and create an Info object for the current module. This example shows how to get the 'display' debug flag, which will initially be False. ```python import lsstDebug display = lsstDebug.Info(__name__).display ``` -------------------------------- ### Define a Scalar Action Source: https://pipelines.lsst.io/modules/lsst.analysis.tools/getting-started.html Example of a scalar action that calculates the median of a vector. It defines a configuration option for the vector key and implements methods to get the input schema and perform the calculation. ```python class MedianAction(ScalarAction): vectorKey = Field[str]("Key of Vector to median.") def getInputSchema(self) -> KeyedDataSchema: return ((self.vectorKey, Vector),) def __call__(self, data: KeyedData, **kwargs) -> Scalar: mask = self.getMask(**kwargs) return cast(Scalar, float(np.nanmedian(cast(Vector, data[self.vectorKey.format(**kwargs)])[mask]))) ``` -------------------------------- ### Python Plugin Class Setup for Logging Source: https://pipelines.lsst.io/modules/lsst.meas.base/tasks_and_algorithms.html Example of a Python plugin class configured for internal logging. It requires the hasLogName class attribute to be True and the constructor to accept a logName parameter. ```python class SingleFrameTestPlugin(SingleFramePlugin): ConfigClass = SingleFrameTestConfig hasLogName = True def __init__(self, config, name, schema, metadata, logName=None): SingleFramePlugin.__init__(self, config, name, schema, metadata, logName=logName) ``` -------------------------------- ### Configuration Parameter History Examples Source: https://pipelines.lsst.io/modules/lsst.ctrl.mpexec/configuring-pipetask-tasks.html These examples show the output of querying configuration parameter history, illustrating different values and their origins. ```text [] $CTRL_MPEXEC_DIR/bin/pipetask:29 sys.exit(main()) ctrl/mpexec/cli/pipetask.py:51 daf/butler/cli/utils.py:1069 ctrl/mpexec/cli/cmd/commands.py:106 ctrl/mpexec/cli/script/build.py:89 ctrl/mpexec/showInfo.py:138 ctrl/mpexec/showInfo.py:226 ctrl/mpexec/util.py:143 pipe/base/pipeline.py:668 pipe/base/pipeline.py:691 pex/config/configurableField.py:421 pex/config/configurableField.py:421 ip/isr/assembleCcdTask.py:39 ``` ```text [] $CTRL_MPEXEC_DIR/bin/pipetask:29 sys.exit(main()) ctrl/mpexec/cli/pipetask.py:51 daf/butler/cli/utils.py:1069 ctrl/mpexec/cli/cmd/commands.py:106 ctrl/mpexec/cli/script/build.py:89 ctrl/mpexec/showInfo.py:138 ctrl/mpexec/showInfo.py:226 ctrl/mpexec/util.py:143 pipe/base/pipeline.py:668 pipe/base/pipeline.py:691 pex/config/configurableField.py:421 pex/config/configurableField.py:421 ``` ```text ['PC001001', 'PC001002', 'PC002001', 'PC002002'] $CTRL_MPEXEC_DIR/bin/pipetask:29 sys.exit(main()) ctrl/mpexec/cli/pipetask.py:51 daf/butler/cli/utils.py:1069 ctrl/mpexec/cli/cmd/commands.py:106 ctrl/mpexec/cli/script/build.py:89 ctrl/mpexec/showInfo.py:138 ctrl/mpexec/showInfo.py:226 ctrl/mpexec/util.py:143 pipe/base/pipeline.py:668 pipe/base/pipeline.py:711 pipe/base/configOverrides.py:299 pipe/base/_instrument.py:298 pex/config/config.py:1167 pex/config/config.py:1251 $EUPS_PATH/Darwin/obs_subaru/g56afc215e3+576f275b99/config/isr.py:33 config.assembleCcd.keysToRemove = ["PC001001", "PC001002", "PC002001", "PC002002"] ``` ```text ['A', 'B'] $CTRL_MPEXEC_DIR/bin/pipetask:29 sys.exit(main()) ctrl/mpexec/cli/pipetask.py:51 daf/butler/cli/utils.py:1069 ctrl/mpexec/cli/cmd/commands.py:106 ctrl/mpexec/cli/script/build.py:89 ctrl/mpexec/showInfo.py:138 ctrl/mpexec/showInfo.py:226 ctrl/mpexec/util.py:143 pipe/base/pipeline.py:668 pipe/base/pipeline.py:711 pipe/base/configOverrides.py:285 ``` -------------------------------- ### DemoConfig Example Source: https://pipelines.lsst.io/py-api/lsst.analysis.tools.actions.plot.HistPanel.html Demonstrates the creation and default values of a custom Config class. Shows how to iterate over config fields and their values. ```python from lsst.pex.config import Config, Field class DemoConfig(Config): fieldA = Field(doc="Field A", dtype=int, default=42) fieldB = Field(doc="Field B", dtype=bool, default=True) fieldC = Field(doc="Field C", dtype=str, default="Hello world") config = DemoConfig() ``` ```python for name, value in config.iteritems(): print(f"{name}: {value}") ``` -------------------------------- ### lsst.display.ds9.get() Source: https://pipelines.lsst.io/py-api/lsst.display.ds9.get.html The `get()` function is used to retrieve information from the DS9 display. It takes several arguments to specify what information to get and how to get it. ```APIDOC ## lsst.display.ds9.get() ### Description Retrieves information from the DS9 display. ### Signature `get(_xpa : lsst.display.ds9.xpa.xparec_, _xtemplate : str_, _paramList : str_, _mode : str_) -> str` ### Parameters * `_xpa` (lsst.display.ds9.xpa.xparec_) - The XPA connection object. * `_xtemplate` (str) - The template string for the command. * `_paramList` (str) - A comma-separated list of parameters to retrieve. * `_mode` (str) - The mode of operation (e.g., 'sync', 'async'). ### Returns * `str` - The retrieved information as a string. ``` -------------------------------- ### DemoConfig Example Source: https://pipelines.lsst.io/py-api/lsst.ip.isr.OverscanAmpConfig.html Demonstrates the creation and usage of a custom Config class with fields, showing default values and updates. ```python from lsst.pex.config import Config, Field class DemoConfig(Config): fieldA = Field(doc="Field A", dtype=int, default=42) fieldB = Field(doc="Field B", dtype=bool, default=True) fieldC = Field(doc="Field C", dtype=str, default="Hello world") ``` ```python config = DemoConfig() for name, value in config.iteritems(): print(f"{name}: {value}") ``` ```python config.update(fieldA=13, fieldC="Updated!") for name, value in config.iteritems(): print(f"{name}: {value}") ``` -------------------------------- ### get Source: https://pipelines.lsst.io/py-api/lsst.sconsUtils.installation.SConsUtilsEnvironment.html Emulates dictionary get() method. ```APIDOC ## get ### Description Emulates the get() method of dictionaries. ### Method get ### Parameters * `key`: The key to retrieve. * `default`: The default value to return if the key is not found (optional). ``` -------------------------------- ### ExampleTask __init__ Method Source: https://pipelines.lsst.io/modules/lsst.pipe.base/creating-a-task.html Constructs an ExampleTask by calling the parent constructor and making a 'stats' subtask from a configuration field. ```python def __init__(self, *args, **kwargs): """Construct an ExampleTask Call the parent class constructor and make the "stats" subtask from the config field of the same name. """ super().__init__(self, *args, **kwargs) self.makeSubtask("stats") ``` -------------------------------- ### Set Up Local Faro Package Source: https://pipelines.lsst.io/modules/lsst.faro/using.html Navigates into the cloned faro directory and sets up the local version of the package for development. ```bash cd faro setup -k -r . ``` -------------------------------- ### Install Dataset with rebuild Source: https://pipelines.lsst.io/modules/lsst.ap.verify/datasets-install.html Use the LSST Software Build Tool to install a specific dataset package. This is the recommended method for installing datasets. ```bash rebuild -u ap_verify_ci_cosmos_pdr2 ``` -------------------------------- ### Define and Initialize a DemoConfig Source: https://pipelines.lsst.io/py-api/lsst.afw.cameraGeom.CameraConfig.html Demonstrates how to define a simple configuration class with fields and initialize an instance with default values. ```python from lsst.pex.config import Config, Field class DemoConfig(Config): fieldA = Field(doc="Field A", dtype=int, default=42) fieldB = Field(doc="Field B", dtype=bool, default=True) fieldC = Field(doc="Field C", dtype=str, default="Hello world") config = DemoConfig() ``` -------------------------------- ### SerializedDimensionRecord Configuration Example Source: https://pipelines.lsst.io/py-api/lsst.daf.butler.SerializedDimensionRecord.html This example shows the configuration for the SerializedDimensionRecord model, including an example of its expected JSON schema structure for 'definition' and 'record' fields. ```python model_config: ClassVar[ConfigDict]__ = {'json_schema_extra': {'examples': [{'definition': 'detector', 'record': {'instrument': 'HSC', 'id': 72, 'full_name': '0_01', 'name_in_raft': '01', 'raft': '0', 'purpose': 'SCIENCE'}}]}} ``` -------------------------------- ### Install LSST Science Pipelines Release Source: https://pipelines.lsst.io/install/lsstinstall.html Installs the specified release of the `lsst_distrib` package using EUPS. Ensure the release tag matches your installation needs. ```bash eups distrib install -t v29_2_1 lsst_distrib curl -sSL https://raw.githubusercontent.com/lsst/shebangtron/main/shebangtron | python setup lsst_distrib ``` -------------------------------- ### Setup Sample Data Package Source: https://pipelines.lsst.io/getting-started/data-setup.html Set up the cloned rc2_subset package to add it to the EUPS stack. The -j flag ensures only this package is set up. ```bash setup -j -r rc2_subset ``` -------------------------------- ### Instantiate and Use Packages Object Source: https://pipelines.lsst.io/py-api/lsst.utils.packages.Packages.html Demonstrates how to create a Packages object from the system, read from a file, and compare package sets. Useful for tracking dependencies and changes. ```python from lsst.utils.packages import Packages pkgs = Packages.fromSystem() print("Current packages:", pkgs) old = Packages.read("/path/to/packages.pickle") print("Old packages:", old) print("Missing packages compared to before:", pkgs.missing(old)) print("Extra packages compared to before:", pkgs.extra(old)) print("Different packages: ", pkgs.difference(old)) old.update(pkgs) # Include any new packages in the old old.write("/path/to/packages.pickle") ``` -------------------------------- ### get Source: https://pipelines.lsst.io/py-api/lsst.sconsUtils.installation.SConsUtilsEnvironment.html Emulates the dictionary get() method to retrieve an environment variable. ```APIDOC ## get ### Parameters * **key** (str): The key of the environment variable to retrieve. * **default**: The default value to return if the key is not found (defaults to None). ### Returns The value of the environment variable or the default value. ``` -------------------------------- ### DemoConfig Example Source: https://pipelines.lsst.io/py-api/lsst.analysis.tools.actions.keyedData.AddComputedVector.html Demonstrates creating a Config subclass, accessing default values, and updating specific fields using the 'update' method. ```python >>> from lsst.pex.config import Config, Field >>> class DemoConfig(Config): ... fieldA = Field(doc="Field A", dtype=int, default=42) ... fieldB = Field(doc="Field B", dtype=bool, default=True) ... fieldC = Field(doc="Field C", dtype=str, default="Hello world") >>> config = DemoConfig() ``` ```python >>> for name, value in config.iteritems(): ... print(f"{name}: {value}") fieldA: 42 fieldB: True fieldC: 'Hello world' ``` ```python >>> config.update(fieldA=13, fieldC="Updated!") ``` -------------------------------- ### Example Usage Source: https://pipelines.lsst.io/modules/lsst.meas.algorithms/tasks/lsst.meas.algorithms.readFitsCatalogTask.ReadFitsCatalogTask.html Example of how to use the ReadFitsCatalogTask to read a FITS catalog. ```APIDOC from lsst.meas.algorithms.readFitsCatalogTask import ReadFitsCatalogTask filePath = "tests/data/testReadFitsCatalog.fits" task = ReadFitsCatalogTask() catalogArray = task.run(filePath) ``` -------------------------------- ### Run SourceDetectionTask Example Source: https://pipelines.lsst.io/modules/lsst.meas.algorithms/tasks/lsst.meas.algorithms.SourceDetectionTask.html Command to run the example script for SourceDetectionTask. ```bash examples/measAlgTasks.py --doDisplay ``` -------------------------------- ### DemoConfig Example Source: https://pipelines.lsst.io/py-api/lsst.analysis.tools.tasks.SourceObjectTableAnalysisConfig.html Demonstrates creating a `DemoConfig` with fields, accessing default values using `iteritems`, updating fields using the `update` method, and then re-accessing the updated values. ```python from lsst.pex.config import Config, Field class DemoConfig(Config): fieldA = Field(doc="Field A", dtype=int, default=42) fieldB = Field(doc="Field B", dtype=bool, default=True) fieldC = Field(doc="Field C", dtype=str, default="Hello world") config = DemoConfig() ``` ```python for name, value in config.iteritems(): print(f"{name}: {value}") ``` ```python config.update(fieldA=13, fieldC="Updated!") ``` ```python for name, value in config.iteritems(): print(f"{name}: {value}") ``` -------------------------------- ### Setup and Build analysis_tools Source: https://pipelines.lsst.io/modules/lsst.analysis.tools/getting-started.html Set up the cloned analysis_tools package and build it using scons. The -j flag can be used to parallelize the build process. ```bash setup -j -r repos/analyis_tools ``` ```bash scons repos/analysis_tools ``` -------------------------------- ### InstallEups Source: https://pipelines.lsst.io/py-api/lsst.sconsUtils.installation.SConsUtilsEnvironment.html Installs a UPS directory, setting absolute versions as appropriate, unless installing from the trunk. ```APIDOC ## InstallEups ### Description Install a ups directory, setting absolute versions as appropriate (unless you’re installing from the trunk, in which case no versions are expanded). ### Method InstallEups ### Parameters #### Path Parameters - **dest** (str) - Required - Destination directory. - **files** (collections.abc.Sequence) - Optional - List of files to install. Any build/table files present in './ups' are automatically added to this list. - **presetup** (dict) - Optional - A dictionary with keys product names and values the version that should be installed into the table files, overriding eups expandtable’s usual behaviour. ### Returns - **list** - Commands to execute. ### Notes Sample usage: ``` env.InstallEups( os.path.join(env["prefix"], "ups"), presetup={"sconsUtils": env["version"]}, ) ``` ```