ATLAS ACTRIS Command-Line Interface¶
This page describes the main atlas command during local developer installation.
The package is currently intended to be installed from the local repository with:
After installation, the main workflow is available through atlas. Additional commands are documented separately under Extra tools.
The main command expects an initialization file path:
or:
Current CLI entry point¶
The currently supported console script is defined in pyproject.toml under [project.scripts]:
The command calls the main() function in:
The CLI wrapper then runs:
This design keeps the main ATLAS script runnable in two ways:
- from the terminal as the installed command
atlas, and - directly in Spyder by opening and running
src/atlas_actris/__call_atlas_interactive__.py.
The second workflow is useful for development because variables created by the script remain visible in Spyder's Variable Explorer.
Command: atlas¶
Runs the main ATLAS interactive workflow.
Usage¶
Equivalent long-option form:
Help¶
The parser exposes the following options (the displayed program name and wrapping can vary by launcher and Python version):
usage: atlas [-h] [-i [ini_file]] [-o [output_folder]]
[-s slice_measurement [slice_measurement ...]]
[-e exclude_measurement [exclude_measurement ...]]
[-q process_qck [process_qck ...]]
arguments
options:
-h, --help show this help message and exit
-i [ini_file], --ini_file [ini_file]
The path to the initialization file of the calling
script
-o [output_folder], --output_folder [output_folder]
The path to the output folder. It overrides the
corresponding parameter provided in the initialization
file
-s slice_measurement [slice_measurement ...], --slice_measurement slice_measurement [slice_measurement ...]
Slicing option for the QA tests. It overrides the
corresponding parameter provided in the initialization
file
-e exclude_measurement [exclude_measurement ...], --exclude_measurement exclude_measurement [exclude_measurement ...]
Exclude option for the QA tests. It overrides the
corresponding parameter provided in the initialization
file
-q process_qck [process_qck ...], --process_qck process_qck [process_qck ...]
Select QA test aliases for quicklook generation. It
overrides the corresponding parameter provided in the
initialization file
Arguments¶
| Option | Value | Purpose |
|---|---|---|
-i, --ini_file |
One file path | Initialization file. Required for execution; the path must exist. |
-o, --output_folder |
One folder path | Override output_folder. |
-s, --slice_measurement |
One or more measurement start stop triplets |
Override the time windows selected for processing. |
-e, --exclude_measurement |
One or more measurement start stop triplets |
Override the time windows excluded from processing. |
-q, --process_qck |
One or more quicklook aliases | Override the quicklook selection. |
-h, --help |
No value | Show help and exit. |
Although argparse displays -i as optional, the parser checks that an initialization file was supplied. Always supply a value with -i and -o; do not use them as bare switches.
Only the options listed here are exposed by parse_caller_args.py. Other initialization-schema parameters must still be set in the INI file; schema membership alone does not create a CLI option.
Override precedence¶
ATLAS reads the initialization file, applies supplied CLI overrides, then performs schema conversion and validation. An omitted option leaves the INI setting in effect, subject to the usual defaults and processing rules. The initialization file itself is not modified.
List overrides replace the entire INI value, rather than append to it. For example, -q drk ray replaces the INI's process_qck list. The same replacement rule applies to -s and -e. Supplied overrides are listed in the terminal under Command-line overrides:.
Pass multiple values after a single option. Repeating an option keeps only its last occurrence. Space-separated values are easiest to read; quoted comma- or semicolon-separated lists are also accepted by the initialization parser.
Output folder¶
This overrides the main workflow's output_folder setting; it does not change any other initialization parameters.
Quote paths containing spaces, including on Windows:
Select or exclude time windows¶
Each entry consists of three values: a measurement identifier, a start time, and a stop time.
Select a Rayleigh measurement window:
Select windows for multiple measurements with one -s option:
Exclude a time window:
Selection and exclusion can be used together:
For an interval crossing midnight, explicit dates make the intended interval clear:
Accepted time formats are HHMM, YYYYMMDD, YYYYMMDD_HH, YYYYMMDD_HHMM, and YYYYMMDD_HHMMSS. Date-only values denote midnight; omitted minutes and seconds are zero. With HHMM, the measurement date is assigned later in processing.
Both slicing and exclusion accept individual measurement identifiers:
ray,ray_pcb,trg,dtm,drk;pcb_p45,pcb_m45,pcb_aux_p45,pcb_aux_m45;tlc_north,tlc_east,tlc_south,tlc_west,tlc_inner,tlc_outer;drk_ray,drk_pcb,drk_tlc,drk_tlc_rin,drk_trg,drk_dtm,drk_ray_pcb,drk_pcb_aux.
The following bundle aliases apply the same interval to each listed measurement:
| Alias | Measurements |
|---|---|
pcb |
pcb_p45, pcb_m45 |
pcb_aux |
pcb_aux_p45, pcb_aux_m45 |
tlc |
tlc_north, tlc_east, tlc_south, tlc_west |
tlc_rin |
tlc_inner, tlc_outer |
For example, -s tlc 1200 1300 applies that interval to all four telecover sectors. Bundle expansion here is specific to slicing and exclusion.
Select quicklooks¶
Equivalent comma-separated form:
Accepted aliases are ray, pcb, tlc, tlc_rin, ray_pcb, pcb_aux, trg, dtm, drk, drk_ray, drk_pcb, drk_tlc, drk_tlc_rin, drk_ray_pcb, drk_pcb_aux, drk_trg, and drk_dtm.
To disable quicklooks explicitly:
Use off alone. -q changes process_qck; it does not replace the process selection for the other QA tests. ray and ray_pcb are distinct aliases.
Combine overrides¶
The long-option equivalent is:
atlas --ini_file ./call_atlas.ini --output_folder ./analysis_run --slice_measurement ray 1200 1300 --exclude_measurement ray 1210 1215 --process_qck drk ray
See the initialization file reference for the corresponding schema parameters.
Developer execution from Python¶
The installed command is equivalent in purpose to running the main script from the package source tree.
From Spyder, open and run:
Configure the Spyder run arguments to pass the initialization file:
From the terminal, after editable installation, use:
or run the file directly from the repository if needed:
The recommended terminal command is still atlas -i ..., because it tests the installed package entry point.
Current cli.py wrapper¶
The current CLI wrapper can be written as:
from pathlib import Path
import runpy
import sys
def main():
script_path = Path(__file__).with_name("__call_atlas_interactive__.py")
script_dir = str(script_path.parent.resolve())
if script_dir not in sys.path:
sys.path.insert(0, script_dir)
runpy.run_path(str(script_path), run_name="__main__")
This wrapper exists only to provide a callable target for the installed console script. The main workflow itself remains in __call_atlas_interactive__.py.
Because the wrapper uses runpy.run_path(..., run_name="__main__"), command-line arguments passed to atlas remain available to the underlying script through sys.argv. Therefore:
is passed through to __call_atlas_interactive__.py as the script's command-line input.
Verifying the CLI after installation¶
From the project root, install the package in editable mode:
Then verify that the package imports from the local repository:
The printed path should point under:
Then verify the command help:
Then run the command with an initialization file:
Troubleshooting¶
atlas: command not found¶
The package is probably not installed in the active environment. Activate the correct environment and reinstall:
Then check:
On Windows:
ModuleNotFoundError: No module named 'atlas_actris'¶
Make sure you are using the environment where the package was installed:
If needed, reinstall from the repository root:
The command runs but does not find the initialization file¶
Use an absolute path first to rule out working-directory issues:
If that works, the problem was the relative path being interpreted from a different current working directory than expected.
Imports work in Spyder but not in the terminal, or the reverse¶
Spyder and the terminal are probably using different Python environments.
Start Spyder from the activated ATLAS environment:
Then check the interpreter inside Spyder.