gnssrefl.gnssir_cl module
- gnssrefl.gnssir_cl.gnssir(station: str, year: int, doy: int, snr: int = 66, plt: bool = False, fr: list = [], ampl: float = None, sat: int = None, doy_end: int = None, year_end: int = None, azim1: int = 0, azim2: int = 360, nooverwrite: bool = False, extension: str = '', compress: bool = False, screenstats: bool = False, delTmax: int = None, e1: float = None, e2: float = None, mmdd: bool = False, gzip: bool = True, dec: int = 1, newarcs: bool = True, par: int = None)
gnssir is the main driver for estimating reflector heights. The user is required to have set up an analysis strategy using gnssir_input.
beta version of parallel processing is now onine. If you set -par to an integer between 2 and 10, it should substantially speed up your processing. Big thank you to AaryanRampal for getting this up and running.
Examples
- gnssir p041 2021 15
analyzes the data for station p041, year 2021 and day of year 15.
- gnssir p041 2021 1 -doy_end 100 -par 10
analyze 100 days of data - but spawn 10 processes at a time. Big cpu time savings.
- gnssir p041 2021 15 -snr 99
uses SNR files with a 99 suffix
- gnssir p041 2021 15 -plt T
plots of SNR data and periodograms come to the screen. Each frequency gets its own plot.
- gnssir p041 2021 15 -screenstats T
sends debugging information to the screen
- gnssir p041 2021 15 -nooverwrite T
only runs gnssir if there isn’t a previous solution
- gnssir p041 2021 15 -extension strategy1
runs gnssir using json file called p041.strategy1.json
- gnssir p041 2021 15 -doy_end 20
Analyzes data from day of year 15 to day of year 20
- gnssir p041 2021 15 -dec 5
before computing periodograms, decimates the SNR file contents to 5 seconds
- gnssir p041 2021 15 -gzip T
gzips the SNR file after you run the code. Big space saver (now the default)
- gnssir p041 2021 15 -fr 1 101
ignore frequency list in your json and use frequencies 1 and 101
- Parameters:
station (str) – lowercase 4 character ID of the station
year (int) – full Year
doy (integer) – Day of year
snr (int, optional) –
SNR format. This tells the code what elevation angles to save data for. Input is the snr file ending. Value options:
66 (default) : saves all data with elevation angles less than 30 degress
99 : saves all data with elevation angles between 5 and 30 degrees
88 : saves all data
50 : saves all data with elevation angles less than 10 degrees
plt (bool, optional) – Send plots to screen or not. Default is False.
fr (int, optional) –
As of version 3.5.9 you are allowed to enter more than one GNSS frequency. It overrides whatever was stored in your json. This is entered into a list so do not use commas, i.e. 1 101 102 allowed frequency names:
1,2,20,5 : GPS L1, L2, L2C, L5
101,102 : GLONASS L1, L2
201, 205,206,207,208 : GALILEO E1, E5a,E6,E5b,E5
302,306,307 : BEIDOU B1, B3, B2 (not sure we do 307)
ampl (float, optional) – minimum spectral peak amplitude. default is None
sat (int, optional) – satellite number to only look at that single satellite. default is None.
doy_end (int, optional) – end day of year. This is to create a range from doy to doy_end of days. If year_end parameter is used - then day_end will end in the day of the year_end. Default is None. (meaning only a single day using the doy parameter)
year_end (int, optional) – end year. This is to create a range from year to year_end to get the snr files for more than one year. doy_end will be for year_end. Default is None.
azim1 (int, optional) – lower limit azimuth. If the azimuth angles are changed in the json (using ‘azval2’ key) and not here, then the json overrides these. If changed here, then it overrides what you requested in the json. default is 0.
azim2 (int, optional) – upper limit azimuth. If the azimuth angles are changed in the json (using ‘azval2’ key) and not changed here, then the json overrides these. If changed here, then it overrides what you requested in the json. default is 360.
nooverwrite (bool, optional) – Use to overwrite lomb scargle result files or not. Default is False, i.e., it will overwrite.
extension (string, optional) – extension for result file, useful for testing strategies. default is empty string
compress (boolean, optional) – xz compress SNR files after use. default is False.
screenstats (bool, optional) – whether to print stats to the screen or not. default is True.
delTmax (int, optional) – maximum satellite arc length in minutes. found in the json
e1 (float, optional) – use to override the minimum elevation angle.
e2 (float, optional) – use to override the maximum elevation angle.
mmdd (boolean, optional) – adds columns in results for month, day, hour, and minute. default is False.
gzip (boolean, optional) – gzip compress SNR files after use. default is True (as of 2023 Sep 17).
dec (int, optional) – decimate SNR file to this sampling period before the periodograms are computed. 1 sec is default (i.e. no decimating)
newarcs (bool, optional) – this input no longer has any meaning
par (int, optional) – number of parallel processing jobs.
- gnssrefl.gnssir_cl.main()
- gnssrefl.gnssir_cl.parse_arguments()
- gnssrefl.gnssir_cl.process_year(year, year_end, doy, doy_end, args, error_queue)
Code that does the processing for a specific year. Refactored to separate function to allow for parallel processes
- Parameters:
year (int) – the start year
year_end (int) – end year. This was the last year you plan to analyze
doy (integer) – Day of year to start processing
doy_end (int) – end day of year on the last year you plan to analyze
args (dict) – arguments passed into gnssir through commandline (or python)
- gnssrefl.gnssir_cl.process_year_dictionary(index, args, datelist, error_queue)
Code that does the processing for a specific year. Refactored to separate function to allow for parallel processes
- Parameters:
index (int) – accommodation for parallel processing. It should be a value from 0 to 9, telling the code which part of datelist to use
args (dict) – arguments passed into gnssir through commandline (or python) should have the new arguments for sublists
datelist (dict) – list of dates you want to analyze in pairs of MJD could have up to 10 sets of dates, from 0 to 9, e.g. for two processes dd = { 0: [MJD1, MJD2], 1:[MJD1,MJD2] }
error_queue –