<commit_before># Copyright (C) 2013, <NAME> <<EMAIL>>
# Copyright (C) 2013, <NAME> <<EMAIL>>
# Copyright (C) 2013, <NAME> <<EMAIL>>
# Copyright (C) 2013, <NAME> <<EMAIL>>

# This module contains a dictionary, cfg, containing all the parameters of the
# s2p pipeline. This dictionary is updated at runtime with parameters defined
# by the user in the config.json file. All the optional parameters (that the
# user is not forced to define in config.json) must be defined here, otherwise
# they won't have a default value.

import os.path

cfg = {}

# path to output directory
cfg['out_dir'] = "output"

# path to directory where (many) temporary files will be stored
cfg['temporary_dir'] = "/tmp"

# temporary files are erased when s2p terminates. Switch to False to keep them
cfg['clean_tmp'] = True

# switch to True if you want to process the whole image
cfg['full_img']  = False

# s2p processes the images tile by tile. The tiles are squares cropped from the
# reference image. The width and height of the tiles are given by this param, in pixels.
cfg['tile_size'] = 800

# margins used to increase the footprint of the rectified tiles, to
# account for poor disparity estimation close to the borders
cfg['horizontal_margin'] = 50  # for regularity and occlusions
cfg['vertical_margin'] = 10  # for regularity

# max number of processes launched in parallel. None means the number of available cores
cfg['max_processes'] = None

# max number of OMP threads used by programs compiled with openMP
cfg['omp_num_threads'] = 1

# debug mode: no parallelisation, and more verbose logs
cfg['debug'] = False

# skip tiles for which a file "rectified_disp.tif" already exists
cfg['skip_existing'] = False

# switch to True to translate the planar coordinates of the output point cloud
# around (0, 0)
cfg['offset_ply'] = False

# switch to False to disable cloud colorization
cfg['color_ply'] = True

# resolution of the output digital surface model, in meters per pixel
cfg['dsm_resolution'] = 4

# number of tiles of the output digital surface model
cfg['dsm_nb_tiles'] = 5

# zoom out applied to input images
cfg['subsampling_factor'] = 1

# sift threshold on the first over second best match ratio
cfg['sift_match_thresh'] = 0.6

# disp range expansion facto
cfg['disp_range_extra_margin'] = 0.2

# register the rectified images with a shear estimated from the rpc data
cfg['register_with_shear'] = False

# number of ground control points per axis in matches from rpc generation
cfg['n_gcp_per_axis'] = 5

# max distance allowed for a point to the epipolar line of its match
cfg['epipolar_thresh'] = 0.5

# stereo matching algorithm: 'tvl1', 'msmw', 'hirschmuller08',
# hirschmuller08_laplacian', 'sgbm', 'mgm'
cfg['matching_algorithm'] = 'mgm'

# size of the Census NCC square windows used in mgm
cfg['census_ncc_win'] = 5

# this param is used only if the tiles are bigger than 2MPix, to save time on
# sift calls
cfg['pointing_correction_rois_mode'] = 'automatic'

# set these params if you want to impose the disparity range manually
cfg['disp_min'] = None
cfg['disp_max'] = None

# radius for erosion of valid disparity areas. Ignored if less than 2
cfg['msk_erosion'] = 2

cfg['fusion_operator'] = 'average_if_close'

# threshold (in meters) used for the fusion of two dems in triplet processing
# It should be adapted to the zoom factor
cfg['fusion_thresh'] = 3

# set to True to keep only the pixels were the two height maps have a valid
# height. If False, pixels with a valid height in only one of the two maps will
# be kept.
cfg['fusion_conservative'] = False

cfg['disable_srtm'] = False
cfg['rpc_alt_range_scale_factor'] = 1

# method to compute the disparity range: "sift", "srtm" or "wider_sift_srtm"
cfg['disp_range_method'] = "wider_sift_srtm"
cfg['disp_range_srtm_low_margin'] = -10
cfg['disp_range_srtm_high_margin'] = +100

# url of the srtm database mirror
cfg['srtm_url'] = 'http://172.16.31.10:443/srtm/tiff'
cfg['srtm_url'] = 'ftp://xftp.jrc.it/pub/srtmV4/tiff'
cfg['srtm_url'] = 'http://data_public:GDdci@data.cgiar-csi.org/srtm/tiles/GeoTIFF'

# directory where to store the srtm tiles
current_dir = os.path.dirname(os.path.abspath(__file__))
parent_dir = os.path.dirname(current_dir)
cfg['srtm_dir'] = os.path.join(parent_dir, '.srtm')

# DSM options
cfg['dsm_option'] = 'median'

# clean height maps outliers
cfg['cargarse_basura'] = True

# longitude/latitude bounding box
cfg['ll_bbx'] = ("-inf", "inf", "-inf", "inf")

# use srtm to generate a watermask
cfg['use_srtm_for_water'] = False
<commit_msg>remove unused global params<commit_after># Copyright (C) 2013, <NAME> <<EMAIL>>
# Copyright (C) 2013, <NAME> <<EMAIL>>
# Copyright (C) 2013, <NAME> <<EMAIL>>
# Copyright (C) 2013, <NAME> <<EMAIL>>

# This module contains a dictionary, cfg, containing all the parameters of the
# s2p pipeline. This dictionary is updated at runtime with parameters defined
# by the user in the config.json file. All the optional parameters (that the
# user is not forced to define in config.json) must be defined here, otherwise
# they won't have a default value.

import os.path

cfg = {}

# path to output directory
cfg['out_dir'] = "s2p_output"

# path to directory where (many) temporary files will be stored
cfg['temporary_dir'] = "s2p_tmp"

# temporary files are erased when s2p terminates. Switch to False to keep them
cfg['clean_tmp'] = True

# switch to True if you want to process the whole image
cfg['full_img'] = False

# s2p processes the images tile by tile. The tiles are squares cropped from the
# reference image. The width and height of the tiles are given by this param, in pixels.
cfg['tile_size'] = 800

# margins used to increase the footprint of the rectified tiles, to
# account for poor disparity estimation close to the borders
cfg['horizontal_margin'] = 50  # for regularity and occlusions
cfg['vertical_margin'] = 10  # for regularity

# max number of processes launched in parallel. None means the number of available cores
cfg['max_processes'] = None

# max number of OMP threads used by programs compiled with openMP
cfg['omp_num_threads'] = 1

# debug mode (more verbose logs and intermediate results saved)
cfg['debug'] = False

# don't rerun when the output file is already there
cfg['skip_existing'] = False

# resolution of the output digital surface model, in meters per pixel
cfg['dsm_resolution'] = 4

# zoom out applied to input images
cfg['subsampling_factor'] = 1

# sift threshold on the first over second best match ratio
cfg['sift_match_thresh'] = 0.6

# disp range expansion facto
cfg['disp_range_extra_margin'] = 0.2

# register the rectified images with a shear estimated from the rpc data
cfg['register_with_shear'] = False

# number of ground control points per axis in matches from rpc generation
cfg['n_gcp_per_axis'] = 5

# max distance allowed for a point to the epipolar line of its match
cfg['epipolar_thresh'] = 0.5

# stereo matching algorithm: 'tvl1', 'msmw', 'hirschmuller08',
# hirschmuller08_laplacian', 'sgbm', 'mgm'
cfg['matching_algorithm'] = 'mgm'

# size of the Census NCC square windows used in mgm
cfg['census_ncc_win'] = 5

# set these params if you want to impose the disparity range manually
cfg['disp_min'] = None
cfg['disp_max'] = None

# radius for erosion of valid disparity areas. Ignored if less than 2
cfg['msk_erosion'] = 2

cfg['fusion_operator'] = 'average_if_close'

# threshold (in meters) used for the fusion of two dems in triplet processing
# It should be adapted to the zoom factor
cfg['fusion_thresh'] = 3

cfg['disable_srtm'] = False
cfg['rpc_alt_range_scale_factor'] = 1

# method to compute the disparity range: "sift", "srtm" or "wider_sift_srtm"
cfg['disp_range_method'] = "wider_sift_srtm"
cfg['disp_range_srtm_low_margin'] = -10
cfg['disp_range_srtm_high_margin'] = +100

# url of the srtm database mirror
cfg['srtm_url'] = 'http://172.16.31.10:443/srtm/tiff'
cfg['srtm_url'] = 'ftp://xftp.jrc.it/pub/srtmV4/tiff'
cfg['srtm_url'] = 'http://data_public:GD<EMAIL>/srtm/tiles/GeoTIFF'

# directory where to store the srtm tiles
current_dir = os.path.dirname(os.path.abspath(__file__))
parent_dir = os.path.dirname(current_dir)
cfg['srtm_dir'] = os.path.join(parent_dir, '.srtm')

# clean height maps outliers
cfg['cargarse_basura'] = True

# longitude/latitude bounding box
cfg['ll_bbx'] = ("-inf", "inf", "-inf", "inf")

# use srtm to generate a watermask
cfg['use_srtm_for_water'] = False

{'fraction_non_alphanumeric': 0.10384661188519709, 'fraction_numerical': 0.01595808026676194, 'mean_word_length': 5.028715003589375, 'pattern_counts': {'":': 0, '<': 28, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 3, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2683857', 'n_tokens_mistral': 2844, 'n_tokens_neox': 2660, 'n_words': 1032}