Skip to content

cli

Command Line Interface

Command line interface tool for SCT.

Attributes

app module-attribute

Python
app = typer.Typer(help='SCT tool for SAR products quality analysis.', context_settings={'help_option_names': ['-h', '--help'], 'max_content_width': 120})

registered_typer_apps module-attribute

Python
registered_typer_apps = set()

Classes

Functions:

main

Python
main(ctx: Context, config: Path | None = typer.Option(None, '--config', '-cfg', exists=True, dir_okay=False, help='Path to the configuration file with settings.'), version: bool = typer.Option(None, '--version', callback=(lambda v: typer.echo(VERSION) or raise_exit() if v else None), is_eager=True, help='Show CLI version and exit'))

raise_exit

Python
raise_exit()

Common utilities for command line implementations.

Attributes

InputProductOption module-attribute

Python
InputProductOption = Path

InputPointTargetSource module-attribute

Python
InputPointTargetSource = Path | None

OutputDirectoryOption module-attribute

Python
OutputDirectoryOption = Path | None

GraphsOption module-attribute

Python
GraphsOption = bool

RadiometricQuantityOption module-attribute

Python
RadiometricQuantityOption = Literal['beta', 'gamma', 'sigma']

AntennaPatternInputOption module-attribute

Python
AntennaPatternInputOption = Path | None

ExternalOrbitInputOption module-attribute

Python
ExternalOrbitInputOption = Path | None

ExternalCorrectionInputProductOption module-attribute

Python
ExternalCorrectionInputProductOption = Path | None

Functions:

logging_to_file

Python
logging_to_file(path: Path | None)

Context manager to safely add a file handler to sct logger.

Parameters:

Name Type Description Default
path Path | None

path to log file to be used, if None, no file handler is added

required

display_title

Python
display_title(title: str) -> None

Display a title in the CLI.

log_elapsed_time

Python
log_elapsed_time(logged_name: str)

Decorate function to log elapsed time with the given name.

graceful_exit

Python
graceful_exit(name: str)

Decorate function to gracefully log and exit in case of errors.

CLI Utilities

Command Line Interface auxiliary utilities.

Attributes

utilities_app module-attribute

Python
utilities_app = typer.Typer(help='SCT Auxiliary CLI tools.')

DateOption module-attribute

Python
DateOption = datetime

ProductDateOption module-attribute

Python
ProductDateOption = datetime | None

RosamondSourceOption module-attribute

Python
RosamondSourceOption = Path

SARCalNetSourceOption module-attribute

Python
SARCalNetSourceOption = Path

AnalysisCenterOption module-attribute

Python
AnalysisCenterOption = str

EmailOption module-attribute

Python
EmailOption = str

ResolutionOption module-attribute

Python
ResolutionOption = str

Classes

Functions:

convert_rosamond_csv

Python
convert_rosamond_csv(source: RosamondSourceOption, date: DateOption, output_directory: OutputDirectoryOption = None) -> None

Convert downloaded Rosamond Point Targets dataset .csv file to SCT compliant .csv file.

download_ionex_tec_maps

Python
download_ionex_tec_maps(date: DateOption, analysis_center: AnalysisCenterOption, email: EmailOption, output_directory: OutputDirectoryOption) -> None

Download IONEX TEC maps from NASA/CDDIS archive.

download_tropospheric_vmf3_maps

Python
download_tropospheric_vmf3_maps(date: DateOption, resolution: ResolutionOption, output_directory: OutputDirectoryOption) -> None

Download VMF3 Tropospheric Products.

convert_sarcalnet_json_to_csv

Python
convert_sarcalnet_json_to_csv(source: SARCalNetSourceOption, product_date: ProductDateOption = None, output_directory: OutputDirectoryOption = None) -> None

Convert downloaded SARCalNet survey .json file to SCT compliant .csv file. Product date can be provided to select the closest survey available, otherwise the latest survey is selected.