plot_samples
Plot samples logic.
kelp.data_prep.plot_samples.AnalysisConfig
Bases: ConfigBase
A config for plotting samples.
Source code in kelp/data_prep/plot_samples.py
24 25 26 27 28 29 |
|
kelp.data_prep.plot_samples.build_tile_id_and_split_tuples
Builds a list of tile ID and split tuples from specified metadata dataframe.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
metadata |
DataFrame
|
The metadata dataframe. |
required |
Source code in kelp/data_prep/plot_samples.py
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
|
kelp.data_prep.plot_samples.extract_composite
Extracts a band composite from given tile.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
tile_id_split_tuple |
Tuple[str, str]
|
A tuple with Tile ID and split name. |
required |
data_dir |
Path
|
The path to the data directory. |
required |
bands |
Union[int, List[int]]
|
The band index or indices to create the composite. |
required |
name |
str
|
The name of the composite. |
required |
output_dir |
Path
|
The path to the output directory. |
required |
Source code in kelp/data_prep/plot_samples.py
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
|
kelp.data_prep.plot_samples.extract_composites
Extracts composite images from input tiles in the specified directory in parallel using Dask.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_dir |
Path
|
The path to the data directory. |
required |
output_dir |
Path
|
The path to the output directory. |
required |
records |
List[Tuple[str, str]]
|
The list of tile ID and split name tuples. |
required |
Source code in kelp/data_prep/plot_samples.py
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
|
kelp.data_prep.plot_samples.main
The main entrypoint for plotting the input samples.
Source code in kelp/data_prep/plot_samples.py
182 183 184 185 186 187 188 189 190 191 192 |
|
kelp.data_prep.plot_samples.parse_args
Parse command line arguments.
Returns: An instance of AnalysisConfig.
Source code in kelp/data_prep/plot_samples.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
|
kelp.data_prep.plot_samples.plot_samples
Runs sample plotting for files in specified directory in parallel using Dask.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_dir |
Path
|
The path to the data directory. |
required |
output_dir |
Path
|
The path to the output directory. |
required |
records |
List[Tuple[str, str]]
|
The list of tile ID and split name tuples. |
required |
Source code in kelp/data_prep/plot_samples.py
126 127 128 129 130 131 132 133 134 135 136 137 138 |
|
kelp.data_prep.plot_samples.plot_single_image
Plots a single image for visual inspection.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
tile_id_split_tuple |
Tuple[str, str]
|
A tuple containing tile ID and split |
required |
data_dir |
Path
|
|
required |
output_dir |
Path
|
|
required |
Source code in kelp/data_prep/plot_samples.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
|