gnssrefl.make_meta module
- gnssrefl.make_meta.check_offsets(station, meta_dict)
check GAGE processing offset file for sources of possible gnssrefl timeseries offsets currently only relevant for ~3k stations processed by GAGE
- Parameters:
station (str) – 4 character station ID.
meta_dict (dict) – dictionary of metadata; keys ‘dates’,’current’,’previous’.
- Returns:
meta_dict – dictionary of metadata; keys ‘dates’,’current’,’previous’.
- Return type:
dict
- gnssrefl.make_meta.get_coords(station, lat, lon, height)
initializes metadata dictionary with lat lon ht keys, either from UNR database (default) or user entered
- Parameters:
station (str) – 4 character station ID.
lat (float, optional, default is None) – latitude in deg
lon (float, optional, default is None) – longitude in deg
height (float, optional, default is None) – ellipsoidal height in m
- Returns:
comp_dict – dictionary of metadata; keys ‘lat’,’lon’,’ht’ ‘meta’.
- Return type:
dict
- gnssrefl.make_meta.get_es_sdk_headers()
checks for earthscope-sdk authentication token and refreshes repurposed from gnssrefl/kelly.py
- Returns:
header – dictionary of es-sdk token
- Return type:
dict
- gnssrefl.make_meta.main()
- gnssrefl.make_meta.make_meta(station: str, lat: float = None, lon: float = None, height: float = None, man_input: bool = True, read_offset: bool = False, overwrite: bool = False)
Make a json file that includes equipment metadata information. It saves your inputs to a json file saved in REFL_CODE/input/<station>_meta.json.
If station is in the UNR database, those lat/lon/ht values are used. You may override those values with the optional inputs.
The default is for the user to enter these values; multiple calls will append entries to the metadata array, unless the user sets overwrite to True. The user can attempt to extract some of this information from the GAGE offset file. GAGE file used is https://data.unavco.org/archive/gnss/products/offset/cwu.kalts_nam14.off (requires ES auth) [A caveat: this file is comprehensive for antennas changed by stations included in GAGE processing (n=~3k). Receivers are included, but incomplete.]
Examples
- make_meta p038
makes json meta file for p038; uses UNR coords and will request user manually populate meta info. If meta json already exists for p038, will append to existing file.
- make_meta test -lat 39.7417583 -lon -105.0706972 -height 1655
makes json meta file for test; uses manually input coords and will request ueser manually populate meta info
- make_meta p038 -man_input False -read_offset True -overwrite True
makes json meta file for p038; uses UNR coords, will not request user manually populate meta info but will extract available meta info from GAGE offset file. Will overwrite any existing meta json file for p038
- Parameters:
station (str) – 4 character station ID.
lat (float, optional) – latitude in deg
lon (float, optional) – longitude in deg
height (float, optional) – ellipsoidal height in m
read_offset (bool, optional) – set to True to parse GAGE offset file. default is False.
man_input (bool, optional) – set to True to manually input equipment metadata. default is True.
overwrite (bool, optional) – set to True to overwrite existing metadata file. default is False.
- gnssrefl.make_meta.meta_man_input(meta_dict)
allows user to manually enter metadata information [Rx, Antenna, Dome, FW] at a given YYYY-mm-dd
- Parameters:
meta_dict (dict) – dictionary of metadata; keys ‘dates’,’current’,’previous’.
- Returns:
meta_dict – dictionary of metadata; keys ‘dates’,’current’,’previous’.
- Return type:
dict
- gnssrefl.make_meta.parse_arguments()