Clip & crop (clipcrop
/ std
)¶
Description¶
The transform clipcrop
clips or crops a dataset given a rectangle area.
Cropping means setting all values to 0, except inside the area of interest. Clipping is the opposite, keeping all values the same, except the ones in the area of interest.
Pixels matching the area of interest are pixels for which the center coordinates are inside the area to clip/crop. The borders of each grid cells are not accounted for.
Yaml arguments¶
The following arguments are used to configure the plugin. pyCIF will return an exception at the initialization if mandatory arguments are not specified, or if any argument does not fit accepted values or type:
Mandatory arguments¶
parameter: (mandatory)
Tracer of the input to be clipped or cropped
accepted type: str
component: (mandatory)
Component of the input to be clipped or cropped
accepted type: str
mode: (mandatory)
Clip/crop mode to apply
accepted values: [‘clip’, ‘crop’]
xmin: (mandatory)
West longitude of the rectangle to clip/crop
accepted type: float
xmax: (mandatory)
East longitude of the rectangle to clip/crop
accepted type: float
ymin: (mandatory)
South latitude of the rectangle to clip/crop
accepted type: float
ymax: (mandatory)
North latitude of the rectangle to clip/crop
accepted type: float
Optional arguments¶
orig_parameter_plg: (optional)
Plugin object on which the transform works on
accepted type: Plugin
orig_component_plg: (optional)
Corresponding component object on which the transform works on
accepted type: Plugin
successor: (optional)
Name of the successor transform
accepted type: str
precursor: (optional)
Name of the precursor transform
accepted type: str
Yaml template¶
Please find below a template for a Yaml configuration:
1transform:
2 plugin:
3 name: clipcrop
4 version: std
5 type: transform
6
7 # Mandatory arguments
8 parameter: XXXXX # str
9 component: XXXXX # str
10 mode: XXXXX # clip|crop
11 xmin: XXXXX # float
12 xmax: XXXXX # float
13 ymin: XXXXX # float
14 ymax: XXXXX # float
15
16 # Optional arguments
17 orig_parameter_plg: XXXXX # Plugin
18 orig_component_plg: XXXXX # Plugin
19 successor: XXXXX # str
20 precursor: XXXXX # str