monkey_wrench.input_output.resampler package
- class monkey_wrench.input_output.resampler.RemoteFile(*, fsspec_cache: Literal['filecache'] = 'filecache')[source]
Bases:
FsSpecCache- open(product_id: str, temporary_directory: Path, collection: EumetsatCollection) list[FSFile][source]
Open product files remotely, inside a zip archive using the given product ID.
- Parameters:
product_id – The product ID to open.
temporary_directory – The path where the cache will be stored.
collection – The information about the collection.
- Returns:
A list of file objects of type
FSFile, which can be further used bysatpy.
- class monkey_wrench.input_output.resampler.Resampler(*, fsspec_cache: ~typing.Literal['filecache'] = 'filecache', parent_output_directory_path: ~typing.Annotated[~pathlib.Path, ~pydantic.types.PathType(path_type=dir), ~pydantic.functional_validators.AfterValidator(func=~monkey_wrench.input_output._types.<lambda>)], datetime_format_string: str = '%Y/%m/%d', reset_child_datetime_directory: bool = False, dataset_save_options: dict[str, bool | str | int] = {'include_lonlats': False, 'writer': 'cf'}, collection: ~monkey_wrench.query._types.EumetsatCollection | str, area: ~typing.Annotated[~pathlib.Path, ~pydantic.types.PathType(path_type=file), ~pydantic.functional_validators.AfterValidator(func=~monkey_wrench.input_output._types.<lambda>)] | dict[str, ~typing.Any] | ~pyresample.geometry.AreaDefinition, radius_of_influence: ~typing.Annotated[int, ~annotated_types.Ge(ge=0)] = 20000, remove_file_if_exists: bool = True)[source]
Bases:
Area,Collection,DatasetSaveOptions,DateTimeDirectory,RemoteFile- radius_of_influence: Annotated[int, Ge(ge=0)]
An integer which marks the search radius (in meters) for neighbouring data points. Defaults to
20_000.
- remove_file_if_exists: bool
A boolean to determine whether to removes the output file first if it already exists.
This might save us from some issues regrading files being overwritten and corrupted.
- get_output_filename_generator() Callable[[str], Path][source]
Get the function using which an output filename will be generated from the given input filename.
The generated filename is used to store the resampled file. The generated output filename will be prepended with
output_pathto compose a complete filepath for the output file.