gms_preprocessing.processing package¶
Submodules¶
gms_preprocessing.processing.multiproc module¶
-
gms_preprocessing.processing.multiproc.
MAP
(func, args, CPUs=None, flatten_output=False)[source]¶ Parallelize the execution of the given function. NOTE: if Job.CPUs in config is 1, execution is not parallelized.
- Parameters
- Return type
gms_preprocessing.processing.pipeline module¶
-
gms_preprocessing.processing.pipeline.
L1B_map
(L1A_obj)[source]¶ L1A_obj enthält in Python- (im Gegensatz zur inmem_serialization-) Implementierung KEINE ARRAY-DATEN!, nur die für die ganze Szene gültigen Metadaten
- Return type
-
gms_preprocessing.processing.pipeline.
L1C_map
(L1B_objs)[source]¶ Atmospheric correction.
NOTE: all subsystems (containing all spatial samplings) belonging to the same scene ID are needed
- Parameters
L1B_objs (
Iterable
[L1B_object
]) – list containing one or multiple L1B objects belonging to the same scene ID.- Return type
-
gms_preprocessing.processing.pipeline.
L2A_map
(L1C_objs, block_size=None, return_tiles=True)[source]¶ Geometric homogenization.
Performs correction of geometric displacements, resampling to target grid of the usecase and merges multiple GMS objects belonging to the same scene ID (subsystems) to a single L2A object. NOTE: Output L2A_object must be cut into tiles because L2A_obj size in memory exceeds maximum serialization size.
- Parameters
L1C_objs (
Union
[List
[L1C_object
],Tuple
[L1C_object
]]) – list containing one or multiple L1C objects belonging to the same scene ID.block_size (
Optional
[tuple
]) – X/Y size of output tiles in pixels, e.g. (1024,1024)return_tiles (
bool
) – return computed L2A object in tiles
- Return type
- Returns
list of L2A_object tiles
gms_preprocessing.processing.process_controller module¶
-
class
gms_preprocessing.processing.process_controller.
ProcessController
(job_ID, **config_kwargs)[source]¶ Bases:
object
gms_preprocessing process controller
- Parameters
job_ID – job ID belonging to a valid database record within table ‘jobs’
config_kwargs – keyword arguments to be passed to gms_preprocessing.set_config()
-
property
DB_job_record
¶
-
add_local_availability
(datasets)[source]¶ Check availability of all subsets per scene and processing level.
- NOTE: The processing level of those scenes, where not all subsystems are available in the same processing level
is reset.
- Parameters
datasets (List[OrderedDict]) – List of one OrderedDict per subsystem as generated by CFG.data_list
- Return type
List[OrderedDict]
-
get_DB_objects
(procLvl, prevLvl_objects=None, parallLev=None, blocksize=None)[source]¶ Returns a list of GMS objects for datasets available on disk that have to be processed by the current processor.
- Parameters
procLvl – <str> processing level oof the current processor
prevLvl_objects – <list> of in-mem GMS objects produced by the previous processor
parallLev – <str> parallelization level (‘scenes’ or ‘tiles’) -> defines if full cubes or blocks are to be returned
blocksize – <tuple> block size in case blocks are to be returned, e.g. (2000,2000)
- Returns
-
property
logger
¶
-
run_all_processors
(custom_data_list=None, serialize_after_each_mapper=False)[source]¶ Run all processors at once.
-
property
sceneids_failed
¶