disco.cli
This module contains the full implementation of the DISCO automated pipeline,
including FITS file discovery, group management, and the five-phase processing
function. It is invoked when disco-start is called without the gui
argument.
- disco.cli.discover_groups(base_dir, mode='file')[source]
Traverse the directory tree rooted at
base_dirand group FITS files.modeisfile(one group per FITS, default),dir(all FITS directly in the same folder), orname(legacyBandNprefix split).
- disco.cli.resolve_geometry_ref(temp_data, ref)[source]
Return the unique index in
temp_datamatching--ref(path, basename, or unique substring). RaisesValueErrorif the match count is not exactly one.
- disco.cli.run_pipeline(files_to_process, group_name, output_dir, args, cnn_model)[source]
Execute the five-phase DISCO pipeline for a single group of FITS files.
- Parameters:
files_to_process (list) – Ordered list of FITS file paths.
group_name (str) – Human-readable group identifier (used in output filenames).
output_dir (str) – Directory where output files are written.
args (argparse.Namespace) – Parsed command-line arguments. Relevant attributes:
rout,rmin,incl,pa,beam,homobeam,csv,debug,yes,group,ref.cnn_model (DiscoNet | None) – Pre-loaded DiscoNet model, or
Noneto use analytical-only geometry.
Writes the following files to
output_dir:RP_<group_name>.PNG— normalised radial profile plotRP_<group_name>_global.csv(if--csv on)RP_<group_name>_bands.csv(if--csv on)RP_<group_name>_profile.csv(if--csv on)debug_pipeline/<group_name>_debug_center_rout.png(if--debug on)
- disco.cli.main()[source]
Parse command-line arguments and orchestrate the full pipeline execution across all matched groups. Before scanning, prints a confirmation prompt (
Are you sure you want to continue? [y/N]); answery/yesto proceed. The prompt is intentional for interactive use. Identifiers may be object name prefixes, directory paths, or direct.fitspaths. Loads the DiscoNet model once before iterating over groups. Groups are processed sequentially with atqdmouter progress bar. Processing failures for individual groups are logged but do not abort the remaining groups.