loadGPS() - VicenteYanez/GFA GitHub Wiki
loadGPS()
Set of functions to load and modify GNSS time series
clean_series(serie, err_max=10)
Function that clean the displacement data in a time serie with a error larger than err_max.
Input
serie: [numpy array] with the gnss data. serie[0] is one measuring.
serie[:][0:7] is the time, east displacement, north displacement, vertical displacement,
east error, north error, vertical error. For more detail, see format_csn().
err_max (optionaly) : [int or float] with the maximum allowed error. If is not given, is set at 10.
Output
- series: the same series from input, without the measurements with high error.
select_time(serie, intervalo)
Function that cut the time series by his time data.
Input
serie: [numpy array] with the gnss data. serie[0] is one measuring.
serie[:][0:7] is the time, east displacement, north displacement, vertical displacement,
east error, north error, vertical error. For more detail, see format_csn().
intervalo: [list or numpy array] with the desired time range . Example: [2008, 2010]
Output
- series: the same series from input, without the out of range data.
format_csn(lon, lat, time_range, estac_list, path_series)
Function that load all the time series in a directory. Returns one list with the data and other list with the name of stations and his locations. The method can only load the data if they are in the format giving for the Centro Sismologico Nacional (CSN).
Input
lon : [list] with the min and maximum value of longitude.
lat : [list] with the min and maximun value of latitude.
time_range : with the min and maximun value of time (in years).
estac_list : [str] with the path to a text file with the name and geographic coordinates of each station.
path_series : [str] with the path to a directory that have the time series's file.
Output
data[0] : ['name estation', [0, ..., 6]]
Where 0 to 6:
0. time
1. East desplacement
2. North desplacement
3. Vertical desplacement
4. East Error
5. North Error
6. Vertical Error
example:
list[4][1][2] : north desplacment of station number 4
list[4][0] : name of station number 4
- list_estations: [list] with the name, longitude and latitude for each station.
load_modelo(lon, lat, intervalo, estac_list, path_modelo)
Function that load the trajectory model.
Input
lon : [list or numpy array] [lon min, lon max]
lat : [list or numpy array] [lat min, lat max]
intervalo : [list or numpy array] [tiempo min, tiempo max]
estac_list : [str] with the path to a text file with the name and geographic coordinates of each station.
path_modelo : [str] with the path to the directory with the file of the trajectory model.
Output
data : similar to format_csn
Columna
0. time
1. East desplacement
2. North desplacement
3. Vertical desplacement