Download
el_paso.download.download
download
Download satellite data files within a specified time range and cadence.
Examples can be found in the 'examples' and 'tutorials' folder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_time
|
datetime
|
The start of the time range for downloading files. Must be timezone-aware (UTC). |
required |
end_time
|
datetime
|
The end of the time range for downloading files. Must be timezone-aware (UTC). |
required |
save_path
|
str | Path
|
Directory path where downloaded files will be saved. |
required |
file_cadence
|
Literal['daily', 'monthly', 'single_file']
|
Frequency of file downloads. - "daily": Download files for each day in the range. - "monthly": Download files for each month in the range. - "single_file": Download a single file. |
required |
download_url
|
str
|
Base URL for downloading files. |
required |
file_name_stem
|
str
|
Stem for the file name to be downloaded. |
required |
download_arguments_prefixes
|
str
|
Additional arguments to prefix to the download command (used with wget). Defaults to "". |
''
|
download_arguments_suffixes
|
str
|
Additional arguments to suffix to the download command (used with wget). Defaults to "". |
''
|
method
|
Literal['request', 'wget']
|
Download method to use. Either "request" (Python requests) or "wget" (system wget). Defaults to "request". |
'request'
|
authentication_info
|
tuple[str, str]
|
Tuple of (username, password) for authentication. Defaults to ("", ""). |
('', '')
|
rename_file_name_stem
|
str | None
|
If provided, rename the downloaded file to this stem. Defaults to None. |
None
|
skip_existing
|
bool
|
If True, skip downloading files that already exist. Defaults to True. |
True
|
sort_raw_files_by_time
|
bool
|
|
False
|
max_threads
|
int
|
Maximum number of threads used for downloading. Defaults to 4. |
4
|
Raises:
| Type | Description |
|---|---|
NotImplementedError
|
If "monthly" cadence or an unsupported cadence is specified. |
Returns:
| Type | Description |
|---|---|
None
|
None |
Source code in el_paso/download.py
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 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 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | |