Skip to content

s1_cslc

driver for CSLC workflow in radar/geo

run(run_config_path, grid_type)

Run CSLC with user-defined options.

Parameters:

Name Type Description Default
run_config_path str

File path with user-defined options in yaml format

required
grid_type str

Grid type of the output CSLC

required
Source code in src/compass/s1_cslc.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
def run(run_config_path: str, grid_type: str):
    """
    Run CSLC with user-defined options.

    Parameters
    ----------
    run_config_path: str
        File path with user-defined options in yaml format
    grid_type: str
        Grid type of the output CSLC
    """

    if grid_type == 'radar':
        # CSLC workflow in radar coordinates
        # get a runconfig dict from command line args
        cfg = RunConfig.load_from_yaml(run_config_path, 's1_cslc_radar')

        if cfg.is_reference:
            # reference burst - run rdr2geo and archive it
            s1_rdr2geo.run(cfg)

        else:
            # secondary burst - run geo2rdr + resample
            s1_geo2rdr.run(cfg)
            s1_resample.run(cfg)

    elif grid_type == 'geo':
        # CSLC workflow in geo-coordinates
        # get a runconfig dict from command line arguments
        cfg = GeoRunConfig.load_from_yaml(run_config_path, 's1_cslc_geo')

        # Check if product_type is CSLC-S1, and produce product only
        if cfg.product_type == 'CSLC_S1':
            s1_geocode_slc.run(cfg)
        else:
            s1_static_layers.run(cfg)