cars.pipelines.parameters.sensor_inputs ======================================= .. py:module:: cars.pipelines.parameters.sensor_inputs .. autoapi-nested-parse:: CARS containing inputs checking for sensor input data Used for full_res and low_res pipelines Attributes ---------- .. autoapisummary:: cars.pipelines.parameters.sensor_inputs.CARS_GEOID_PATH Functions --------- .. autoapisummary:: cars.pipelines.parameters.sensor_inputs.sensors_check_inputs cars.pipelines.parameters.sensor_inputs.check_sensors cars.pipelines.parameters.sensor_inputs.check_loaders cars.pipelines.parameters.sensor_inputs.check_filling cars.pipelines.parameters.sensor_inputs.get_sensor_resolution cars.pipelines.parameters.sensor_inputs.check_geometry_plugin cars.pipelines.parameters.sensor_inputs.generate_geometry_plugin_with_dem cars.pipelines.parameters.sensor_inputs.modify_to_absolute_path cars.pipelines.parameters.sensor_inputs.check_srtm cars.pipelines.parameters.sensor_inputs.check_input_data cars.pipelines.parameters.sensor_inputs.get_initial_elevation cars.pipelines.parameters.sensor_inputs.check_input_size cars.pipelines.parameters.sensor_inputs.check_nbits cars.pipelines.parameters.sensor_inputs.compare_image_type cars.pipelines.parameters.sensor_inputs.check_classification_values cars.pipelines.parameters.sensor_inputs.check_all_nbits_equal_one cars.pipelines.parameters.sensor_inputs.load_geomodels cars.pipelines.parameters.sensor_inputs.generate_pairs cars.pipelines.parameters.sensor_inputs.check_dsm_to_fill Module Contents --------------- .. py:data:: CARS_GEOID_PATH :value: 'geoid/egm96.grd' .. py:function:: sensors_check_inputs(conf, config_dir=None) Check the inputs given :param conf: configuration of inputs :type conf: dict :param config_dir: path to dir containing json :type config_dir: str .. py:function:: check_sensors(conf, overloaded_conf, config_dir=None) Check sensors .. py:function:: check_loaders(conf) Check loaders section :param conf: loaders section of input conf :type conf: dict .. py:function:: check_filling(conf, classif_loader) Check filling section :param conf: filling section of input conf :type conf: dict .. py:function:: get_sensor_resolution(geom_plugin, sensor_path, geomodel, target_epsg=32631) Estimate the sensor image resolution in meters per pixel using geolocation of 3 corners of the image. :param geom_plugin: geometry plugin instance :param sensor_path: path to the sensor image :type sensor_path: dict :param geomodel: geometric model for the sensor image :param target_epsg: target EPSG code for projection :type target_epsg: int :return: average resolution in meters/pixel along x and y :rtype: float .. py:function:: check_geometry_plugin(conf_inputs, conf_geom_plugin, output_dem_dir) Check the geometry plugin with inputs :param conf_inputs: checked configuration of inputs :type conf_inputs: type :param conf_advanced: checked configuration of advanced :type conf_advanced: type :param conf_geom_plugin: name of geometry plugin :type conf_geom_plugin: str :return: overload inputs conf overloaded geometry plugin conf geometry plugin without dem geometry plugin with dem .. py:function:: generate_geometry_plugin_with_dem(conf_geom_plugin, conf_inputs, dem=None, crop_dem=True, output_dem_dir=None, scaling_coeff=1) Generate geometry plugin with dem and geoid :param conf_geom_plugin: plugin configuration :param conf_inputs: inputs configuration :param dem: dem to overide the one in inputs :param scaling_coeff: scaling factor for resolution :type scaling_coeff: float :return: geometry plugin object, with a dem .. py:function:: modify_to_absolute_path(config_dir, overloaded_conf) Modify input file path to absolute path :param config_dir: directory of the json configuration :type config_dir: str :param overloaded_conf: overloaded configuration json :dict overloaded_conf: dict .. py:function:: check_srtm(srtm_dir) Check srtm data :param srtm_dir: directory of srtm :type srtm_dir: str .. py:function:: check_input_data(image, color) Check data of the image and color :param image: image path :type image: str :param color: color path :type color: str .. py:function:: get_initial_elevation(config) Return initial elevation parameters (dem and geoid paths) from input configuration. :param config: input initial elevation :type config: str, dict or None .. py:function:: check_input_size(image, mask, classif, edges) Check image, mask, classif and color given Images must have same size :param image: image path :type image: str :param mask: mask path :type mask: str :param color: color path :type color: str :param classif: classif path :type classif: str :param edges: edges dict :type edges: dict .. py:function:: check_nbits(mask) Check the bits number of the mask, classif mask and classification are limited to 1 bits per band :param mask: mask path :type mask: str :param classif: classif path :type classif: str .. py:function:: compare_image_type(sensors, sensor_type, key1, key2) Compare the data type between a pair of images :param sensors: list of sensor paths :type sensors: str :param sensor_type: type of cardataset image (IMG, MASK, CLASSIF...) :type sensor_type: int :param key1: key of the images pair :type key1: str :param key2: other key of the images pair :type key2: str .. py:function:: check_classification_values(sensors, sensor_type, key1, key2, filling) Compare the classification values between a pair of images :param imgs: list of image paths :type imgs: str :param classif_type: type of cardataset image (IMG, MASK, CLASSIF...) :type classif_type: int :param key1: key of the images pair :type key1: str :param key2: other key of the images pair :type key2: str .. py:function:: check_all_nbits_equal_one(nbits) Check if all the nbits = 1 :param nbits: list of the nbits :return: True if all the nbits = 1 .. py:function:: load_geomodels(conf, geometry_plugin) Load geomodels directly on conf object :param conf: input conf :type conf: dict .. py:function:: generate_pairs(conf) Generate sensors inputs form inputs conf : a list of (sensor_left, sensor_right) :param conf: input conf :type conf: dict :return: list of sensors pairs :rtype: list(tuple(dict, dict)) .. py:function:: check_dsm_to_fill(conf) Check dsm to fill section :param conf: conf :return: checked conf