Index
GPS data sources package providing unified interface to different providers.
BaseGpsSource
Bases: ABC
Base class for GPS data sources providing standardized interface.
Source code in src/geepers/gps_sources/base.py
60 61 62 63 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 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 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 | |
__init__(cache_dir=None)
Initialize the GPS data source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cache_dir
|
PathOrStr
|
Base directory to store cached data.
Default is None, which uses |
None
|
Source code in src/geepers/gps_sources/base.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | |
coordinates(station_id)
Get coordinates for a single station.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
station_id
|
str
|
The station identifier. |
required |
Returns:
| Type | Description |
|---|---|
tuple[float, float, float]
|
Longitude, latitude, and altitude in degrees and meters. |
Source code in src/geepers/gps_sources/base.py
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 | |
read_station_llas(to_geodataframe=True, filename=None)
Read station location information.
.. deprecated::
Use stations() instead.
Source code in src/geepers/gps_sources/base.py
340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 | |
station_lonlat(station_id)
Get longitude and latitude for a station.
.. deprecated::
Use coordinates(station_id)[:2] instead.
Source code in src/geepers/gps_sources/base.py
361 362 363 364 365 366 367 368 369 370 371 372 373 | |
stations(bbox=None, mask=None)
Get GPS stations, optionally filtered by spatial bounds.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bbox
|
tuple[float, float, float, float]
|
Bounding box as (west, south, east, north) in degrees. |
None
|
mask
|
GeoSeries
|
Spatial mask to filter stations. |
None
|
Returns:
| Type | Description |
|---|---|
GeoDataFrame
|
GeoDataFrame with station metadata including lon, lat, alt columns. |
Source code in src/geepers/gps_sources/base.py
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | |
timeseries(station_id, /, frame='ENU', start_date=None, end_date=None, zero_by='mean', download_if_missing=True)
abstractmethod
Load GPS station time series data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
station_id
|
str
|
The station identifier. |
required |
frame
|
('ENU', 'XYZ')
|
Coordinate frame for the data. Default is "ENU". |
"ENU"
|
start_date
|
str
|
Start date for data filtering (ISO format). |
None
|
end_date
|
str
|
End date for data filtering (ISO format). |
None
|
zero_by
|
Literal['mean', 'start']
|
How to zero the data. Either "mean" or "start". |
'mean'
|
download_if_missing
|
bool
|
Whether to download data if not found locally. |
True
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame validated against StationObservationSchema. |
Source code in src/geepers/gps_sources/base.py
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 | |
SideshowSource
Bases: BaseGpsSource
JPL Sideshow GPS data source.
Source code in src/geepers/gps_sources/sideshow.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 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 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 | |
timeseries(station_id, /, frame='ENU', start_date=None, end_date=None, zero_by='mean', download_if_missing=True)
Load GPS station time series data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
station_id
|
str
|
The station identifier. |
required |
frame
|
('ENU', 'XYZ')
|
Coordinate frame for the data. Default is "ENU". |
"ENU"
|
start_date
|
str
|
Start date for data filtering (ISO format). |
None
|
end_date
|
str
|
End date for data filtering (ISO format). |
None
|
zero_by
|
str
|
How to zero the data. Either "mean" or "start". |
'mean'
|
download_if_missing
|
bool
|
Whether to download data if not found locally. |
True
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with ENU time series data validated against schema. |
Source code in src/geepers/gps_sources/sideshow.py
55 56 57 58 59 60 61 62 63 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 92 93 94 95 96 97 98 99 100 101 | |
UnrGridSource
Bases: BaseGpsSource
UNR Grid GPS data source for gridded time series data.
Source code in src/geepers/gps_sources/unr_grid.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 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 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 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 | |
__init__(version=DEFAULT_VERSION, gridded_type='variable', cache_dir=None)
Initialize UNR Grid GPS data source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
version
|
Literal['0.1', '0.3']
|
Version of the UNR grid data to use. Default is "0.3". |
DEFAULT_VERSION
|
gridded_type
|
Literal['constant', 'variable']
|
Whether to use the time-constant or time-variable gridded products. Only available starting with version "0.3"; version "0.1" only has time-variable data. Default is "variable". |
'variable'
|
cache_dir
|
str | Path
|
Directory to cache downloaded data files. |
None
|
Source code in src/geepers/gps_sources/unr_grid.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | |
download_data_files(grid_id_list=None, plate='IGS14', max_workers=8, output_dir=None, version=DEFAULT_VERSION, gridded_type='variable')
Download .tenv8 data files in parallel, showing progress.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
grid_id_list
|
list[str]
|
Specific grid point IDs to download. If None, all grid points are downloaded. |
None
|
plate
|
Literal['NA', 'PA', 'IGS14', 'IGS20']
|
Plate for the data. Default is "IGS14". |
'IGS14'
|
max_workers
|
int
|
Number of threads to use for downloading in parallel. |
8
|
output_dir
|
Path | None
|
Directory to store downloaded data files. If None, the cache directory is used. |
None
|
version
|
Literal['0.1', '0.3']
|
Version of the UNR grid data to download. Default is "0.3". |
DEFAULT_VERSION
|
gridded_type
|
Literal['constant', 'variable']
|
Whether to download the time-constant or time-variable gridded product. Ignored when version is "0.1", since that version only has time-variable data. |
'variable'
|
Returns:
| Type | Description |
|---|---|
list[Path]
|
List of paths to downloaded data files. |
Source code in src/geepers/gps_sources/unr_grid.py
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 | |
parse_data_file(uri)
Parse a .tenv8 time-series data file into a DataFrame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
uri
|
str | Path
|
Path or URL to the .tenv8 file. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with columns validated against GPSUncertaintySchema. |
Source code in src/geepers/gps_sources/unr_grid.py
342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 | |
stations(bbox=None, mask=None)
Get grid points, optionally filtered by spatial bounds.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bbox
|
tuple[float, float, float, float]
|
Bounding box as (west, south, east, north) in degrees. |
None
|
mask
|
GeoSeries
|
Spatial mask to filter grid points. |
None
|
Returns:
| Type | Description |
|---|---|
GeoDataFrame
|
GeoDataFrame with grid point metadata including lon, lat, alt columns. |
Source code in src/geepers/gps_sources/unr_grid.py
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | |
timeseries(station_id, /, frame='ENU', start_date=None, end_date=None, zero_by='mean', download_if_missing=True, *, plate='IGS14')
Load grid point time series data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
station_id
|
str
|
The grid point identifier (6-digit string). |
required |
frame
|
('ENU', 'XYZ')
|
Coordinate frame for the data. Default is "ENU". |
"ENU"
|
start_date
|
str
|
Start date for data filtering (ISO format). Currently not implemented. |
None
|
end_date
|
str
|
End date for data filtering (ISO format). Currently not implemented. |
None
|
zero_by
|
Literal['mean', 'start']
|
How to zero the data. Either "mean" or "start". |
'mean'
|
download_if_missing
|
bool
|
Whether to download data if not found locally. Currently not implemented. |
True
|
plate
|
Literal['NA', 'PA', 'IGS14', 'IGS20']
|
Plate for the data. Default is "IGS14". |
'IGS14'
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with ENU time series data validated against schema. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If XYZ frame is requested (not supported for grid data). |
Source code in src/geepers/gps_sources/unr_grid.py
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 | |
UnrSource
Bases: BaseGpsSource
UNR GPS data source.
Source code in src/geepers/gps_sources/unr.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 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 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 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 | |
download_station_data(station_id, frame='ENU', reference='IGS20', plate_fixed=False, plate=None)
Download GPS station data from the Nevada Geodetic Laboratory.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
station_id
|
str
|
The station identifier. |
required |
frame
|
('ENU', 'XYZ')
|
The coordinate system of the data to download. Default is "ENU". |
"ENU"
|
reference
|
('IGS14', 'IGS20')
|
Geodetic reference of processed data. |
"IGS14"
|
plate_fixed
|
bool
|
Whether to download plate-fixed data. Only applicable for "ENU" frame. |
False
|
plate
|
str
|
If using plate_fixed, specify which plate to use (in the case of a station on multiple plates). If None, uses the first plate from the UNR results. |
None
|
Source code in src/geepers/gps_sources/unr.py
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 | |
get_global_station_list()
Get the list of "processed" stations from UNR.
Source: https://geodesy.unr.edu/NGLStationPages/GlobalStationList
Note that this may be smaller than the lat/lon/alt list at https://geodesy.unr.edu/NGLStationPages/llh.out.
Source code in src/geepers/gps_sources/unr.py
362 363 364 365 366 367 368 369 370 | |
steps(station_ids=None)
Fetch the UNR database of potential step epochs.
Parses https://geodesy.unr.edu/NGLStationPages/steps.txt (format: https://geodesy.unr.edu/NGLStationPages/steps_readme.txt), which lists equipment changes (code 1) and earthquakes near the station (code 2).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
station_ids
|
list of str
|
Only return steps for these stations. |
None
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
Columns: |
Source code in src/geepers/gps_sources/unr.py
296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 | |
timeseries(station_id, /, frame='ENU', start_date=None, end_date=None, zero_by='mean', download_if_missing=True, plate_fixed=False, plate_name=None)
Load GPS station time series data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
station_id
|
str
|
The station identifier. |
required |
frame
|
('ENU', 'XYZ')
|
Coordinate frame for the data. Default is "ENU". |
"ENU"
|
start_date
|
str
|
Start date for data filtering (ISO format). |
None
|
end_date
|
str
|
End date for data filtering (ISO format). |
None
|
download_if_missing
|
bool
|
Whether to download data if not found locally. |
True
|
zero_by
|
Literal['mean', 'start']
|
How to zero the data. Either "mean" or "start". |
'mean'
|
plate_fixed
|
bool
|
Whether to use plate-fixed coordinates. |
False
|
plate_name
|
str
|
If |
None
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame validated against StationObservationSchema. |
Source code in src/geepers/gps_sources/unr.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 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 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 | |