geodezyx.operational package

Submodules

geodezyx.operational.cluster_gfz module

@author: psakic

This sub-module of geodezyx.operational contains functions to send runs to the GFZ’s cluster in a batch mode.

it can be imported directly with: from geodezyx import operational

The GeodeZYX Toolbox is a software for simple but useful functions for Geodesy and Geophysics under the GNU GPL v3 License

Copyright (C) 2019 Pierre Sakic et al. (GFZ, pierre.sakic@gfz-postdam.de) GitHub repository : https://github.com/GeodeZYX/GeodeZYX-Toolbox_v4

geodezyx.operational.cluster_gfz.cluster_GFZ_run(commands_list, bunch_on_off=True, bunch_job_nbr=10, bunch_wait_time=600, bj_check_on_off=True, bj_check_mini_nbr=2, bj_check_wait_time=120, bj_check_user='auto', add_cjob_cmd_prefix=True, wait_sleeping_before_launch=5)
Parameters
  • commands_list (list of str) – List of commands you want to run (one command per job).

  • bunch_on_off (bool, optional) – If False, send all the jobs to the cluster at once. If True, just send <bunch_job_nbr> of them. See the options below. The default is True.

  • bunch_job_nbr (int, optional) – number of jobs which will be sent to the cluser at once. The default is 10.

  • bunch_wait_time (int, optional) – Minimal time between two bunch runs in sec. The default is 600.

  • bj_check_on_off (bool, optional) – Do a check before a new bunch run, if previous jobs are still running. The default is True.

  • bj_check_mini_nbr (int, optional) – The fuctions will wait <bj_check_wait_time> sec more if <bj_check_mini_nbr> or more jobs are running. The default is 2.

  • bj_check_wait_time (int, optional) – wait time between two checks in sec. The default is 120.

  • bj_check_user (str, optional) – username you want to check in the batchjobs. The default is “auto” i.e. your own username.

  • add_cjob_cmd_prefix (bool, optional) – If, the input commands in command_list do not contain the cjob prefix command, it will be added automatically The default is True.

  • wait_sleeping_before_launch (int, optional) – Waiting time between two successive runs. (To cancel the run if necessary) The default is 5.

Returns

Return type

None.

geodezyx.operational.cluster_gfz.number_job_user(bj_check_user=None, verbose=True)

Internal function for sleep_job_user

geodezyx.operational.cluster_gfz.sleep_job_user(bj_check_user=None, minjob=20, bj_check_wait_time=20)

Internal function for cluster_GFZ_run

geodezyx.operational.gins_runner module

@author: psakic

This sub-module of geodezyx.operational contains functions to run the GNSS processing software GINS.

it can be imported directly with: from geodezyx import operational

The GeodeZYX Toolbox is a software for simple but useful functions for Geodesy and Geophysics under the GNU GPL v3 License

Copyright (C) 2019 Pierre Sakic et al. (GFZ, pierre.sakic@gfz-postdam.de) GitHub repository : https://github.com/GeodeZYX/GeodeZYX-Toolbox_v4

geodezyx.operational.gins_runner.bad_sat_finder(orbfilein, egrep_ready=True)
geodezyx.operational.gins_runner.check_good_exec_of_GINS(streamin, director_name)
geodezyx.operational.gins_runner.check_if_DOMES_in_oceanloadfile(domes, oclofile)
geodezyx.operational.gins_runner.check_if_file_in_gin_folder(a_file_path, gins_path='')
geodezyx.operational.gins_runner.check_if_stat_in_stationfile(stat, stationfile)
geodezyx.operational.gins_runner.clk_2_gins(clk_pathin)
geodezyx.operational.gins_runner.copy_file_in_gin_folder(a_file_path, repository_folder='/home/psakicki/gin/TP/GWADA/RINEX')
geodezyx.operational.gins_runner.dirs_copy_generik_2_working(director_name_prefix, director_generik_path, temp_data_folder=None)
geodezyx.operational.gins_runner.double90_runner(inp_prarie_file, temp_data_folder='')
geodezyx.operational.gins_runner.double_diff_binom(rinex_path_A, rinex_path_B, temp_data_folder='', final_data_folder='')

DISCONTINUED

geodezyx.operational.gins_runner.double_diff_multi(rinex_path_list, temp_data_folder='', final_data_folder='', remove=True, ignore_glo_gal=False)
rinex_path_list :

List of RINEXs paths

temp_data_folder & final_data_folder :

if empty string (‘’), files are saved in pygins_runner “TEMP_DATA” folder and in the specified folder else

geodezyx.operational.gins_runner.download_convert_2_gins_orb_clk(centraldate, work_folder='', calc_center='jpl', repro=2, rm_temp_files=True, archive_center='cddis')
geodezyx.operational.gins_runner.export_results_gins_listing(listings_list_in, outpath, static_or_kinematic='kine', outprefix='', coordtype='FLH')
geodezyx.operational.gins_runner.find_DOMESstat_in_stationfile(stat, stationfile)
geodezyx.operational.gins_runner.gen_dirs_from_double_diff(dd_files_paths_in, director_generik_path, director_name_prefix, out_director_folder='', temp_data_folder='', stations_file='', oceanload_file='', auto_staocl=False, perso_orbclk=False, gins_style_orb='GRG', calc_center='igs', repro=2, auto_interval=True, out_coords='NULL')

NEW FCT WHICH CAN MANAGE BOTH ONE RINEX OR A LIST OF RINEX

produce a director from a rinex, and write it in the specific location

Input:

rinex_paths_in : can be a rinex path (a string) or a list of paths

Return :

the path of the produced director as a string

If the rinex is not in a gins style folder, it will be copied in the temp_data_folder

If temp_data_folder is not specified ( == ‘’) rinex will be copied in a ad hoc folder ../gin/TEMP_DATA

If out_director_folder is not specified ( == ‘’), output director will be created in the ../gin/data/directeur folder

auto_staoclTrue or False

create automatically a station file and a ocean loading file with the rinex header auto mode is prioritary upon the manu mode so, if a path for stat file or ocload file is specified and auto_staocl is on, it will be the automatic stat/ocload which will be used

perso_orbclkTrue or False

download and use specifics orbits according to calc_center & repro args (they are useless if perso_orbclk aren’t activated)

auto_intervalTrue or False

find the interval in RINEX and apply it to the director

out_coords‘XYZ’ or ‘FLH’/’PLH’

for geocentrical or geographical coords in output. any other string leaves the type of the generic director.

prairieTrue or False

run prairie externally if True, prairie_kwargs control the arguments of the function prairie_manual (cf above)

geodezyx.operational.gins_runner.gen_dirs_from_rnxs(rinex_paths_in, director_generik_path, director_name_prefix, out_director_folder='', temp_data_folder='', stations_file='', oceanload_file='', auto_staocl=False, perso_orbclk=False, calc_center='igs', repro=2, auto_interval=True, out_coords='NULL', prairie=False, prairie_kwargs={'with_historik': 1, 'with_wsb': 1})

NEW FCT WHICH CAN MANAGE BOTH ONE RINEX OR A LIST OF RINEX

produce a director from a rinex, and write it in the specific location

Input:

rinex_paths_in : can be a rinex path (a string) or a list of paths

Return :

the path of the produced director as a string

If the rinex is not in a gins style folder, it will be copied in the temp_data_folder

If temp_data_folder is not specified ( == ‘’) rinex will be copied in a ad hoc folder ../gin/TEMP_DATA

If out_director_folder is not specified ( == ‘’), output director will be created in the ../gin/data/directeur folder

auto_staoclTrue or False

create automatically a station file and a ocean loading file with the rinex header auto mode is prioritary upon the manu mode so, if a path for stat file or ocload file is specified and auto_staocl is on, it will be the automatic stat/ocload which will be used

perso_orbclkTrue or False

download and use specifics orbits according to calc_center & repro args (they are useless if perso_orbclk aren’t activated)

auto_intervalTrue or False

find the interval in RINEX and apply it to the director

out_coords‘XYZ’ or ‘FLH’/’PLH’

for geocentrical or geographical coords in output. any other string leaves the type of the generic director.

prairieTrue or False

run prairie externally if True, prairie_kwargs control the arguments of the function prairie_manual (cf above)

geodezyx.operational.gins_runner.get_director_list(wildcard_dir)

with a wildcard (e.g. ‘GWADA_MK2*’) and return a list of corresponding directors found in gin/data/directeur folder

geodezyx.operational.gins_runner.get_gins_path(extended=False)
geodezyx.operational.gins_runner.get_rinex_list(parent_folder, specific_stats=[], invert=False, compressed=True, start=datetime.datetime(1980, 1, 1, 0, 0), end=datetime.datetime(2099, 1, 1, 0, 0))
return :

all RINEXs found in a parent folder and his subfolders (compressed or not)

parent_folder :

can be a the path of the partent folder (the rinex archive path) but also a RINEX list already found (modification of 170524 to gain speed)

specific_stats :

MUST BE a list [‘STA1’,’STA2’,’STA3’] So, if only one elt in specific_stats, use a syntax as : [‘STA1’]

invert :

False = keeping the specific stats True = removing the specific stats or for all stations, leave a empty tuple in specific_stats

NB : the end date is included

geodezyx.operational.gins_runner.get_temp_data_gins_path()
geodezyx.operational.gins_runner.make_path_ginsstyle(pathin)

input path must be an absolute path with /gin/ inside output will be .temp.gin/<rest of the path>

geodezyx.operational.gins_runner.merge_yaml(yaml1, yaml2, yaml_out=None)
geodezyx.operational.gins_runner.orbit_cleaner(orbfilein, orbfileout)

remove sat of a gins orbit file without a nominal number of epoch

geodezyx.operational.gins_runner.prairie_manual(rinex_paths_in, temp_data_folder='', force=True, with_historik=True, with_wsb=True, argsdict={})
argsdict :

a dictionnary so as argsdict[argument] = val e.g. argsdict[‘-options’] = “/home/psakicki/THESE/SOFTWARES/GINSv2B/gin/data/prairie/options_GPS.dat” argsdict[‘-wsb’] = “/home/psakicki/THESE/SOFTWARES/GINSv2B/gin/data/prairie/WSB_NEW_1996.dat”

argument cc2noncc, wsb, options, and out are automatically managed

geodezyx.operational.gins_runner.run_director_list_wrap(tupinp)
geodezyx.operational.gins_runner.run_director_wrap(intup)
geodezyx.operational.gins_runner.run_directors(dir_paths_in, opts_gins_pc='', opts_gins_90='  ', version='OPERA', fic_mode=False)

NEW FCT WHICH CAN MANAGE BOTH ONE RINEX OR A LIST OF RINEX, OR A FIC file (170613)

geodezyx.operational.gins_runner.run_dirs_multislots(director_lis, slots_lis=['', 'U', 'L', 'R'], opts_gins_pc='', opts_gins_90='', version='OPERA', fic_mode=False)

run a list of dir in parallel (using different ‘slots’)

geodezyx.operational.gins_runner.smart_directors_to_run(wildcard_dir='', full_path_out=True)

smart runner check directors who worked, and thus give a list of directors whitout those who worked

listing and directeur folders are inspected automatically

geodezyx.operational.gins_runner.smart_listing_archive(wildcard_dir, gins_main_archive, gins_anex_archive, prepars_archive, director_archive)

for each listing corresponding to the wildcard : if it’s a prepars => go to the prepars_archive if it’s a gins without duplicate => go to the gins_main_archive if it’s a gins with duplcates => one goes to gins_main_archive

the others in gins_anex_archive

geodezyx.operational.gins_runner.sort_by_stations(archive_path, wildcard, i)

i is the indice of the first character of the station name in eg : i = 18 for filename KARIB_MK3_FLH_v2__bara_22282_2011_003

archive path is ABSOLUTE b.c. it can be outside of the gins folder

geodezyx.operational.gins_runner.sort_orbit_gins(pathin, pathout)
geodezyx.operational.gins_runner.sp3_2_gins(sp3_pathin)
geodezyx.operational.gins_runner.write_oceanload_file(station_file, oceanload_out_file, fes_yyyy=2004)

geodezyx.operational.gnss_downloader module

@author: psakic

This sub-module of geodezyx.operational contains functions to download gnss data and products from distant IGS servers.

it can be imported directly with: from geodezyx import operational

The GeodeZYX Toolbox is a software for simple but useful functions for Geodesy and Geophysics under the GNU GPL v3 License

Copyright (C) 2019 Pierre Sakic et al. (GFZ, pierre.sakic@gfz-postdam.de) GitHub repository : https://github.com/GeodeZYX/GeodeZYX-Toolbox_v4

geodezyx.operational.gnss_downloader.FTP_downloader(ftp_obj, filename, localdir)
geodezyx.operational.gnss_downloader.FTP_downloader_wo_objects(tupin)
geodezyx.operational.gnss_downloader.downloader(url, savedir, force=False, check_if_file_already_exists_uncompressed=True)

general function to download a file

INTERNAL_FUNCTION

geodezyx.operational.gnss_downloader.downloader_wrap(intup)
geodezyx.operational.gnss_downloader.effective_save_dir(parent_archive_dir, stat, date, archtype='stat')

INTERNAL_FUNCTION

archtype =

stat stat/year stat/year/doy year/doy year/stat week/dow OR only ‘/’ for a dirty saving in the parent folder … etc …

geodezyx.operational.gnss_downloader.effective_save_dir_orbit(parent_archive_dir, calc_center, date, archtype='year/doy/')

INTERNAL_FUNCTION

archtype =

stat stat/year stat/year/doy year/doy year/stat week/dow wkwwww : use a GFZ’s CF-ORB wk<wwww> naming OR only ‘/’ for a dirty saving in the parent folder … etc …

geodezyx.operational.gnss_downloader.find_IGS_products_files(parent_dir, File_type, ACs, date_start, date_end=None, recursive_search=True, severe=True, compressed='incl', regex_old_naming=True, regex_new_naming=True, regex_igs_tfcc_naming=True, add_weekly_file=False)

Find all product files in a parent folder which correspond to file type(s), AC(s) and date(s)

Parameters

parent_dir (str or list of str) – The parent directory (i.e. the archive) where files are stored can be a string (path of the archive) or a list of file paths (given by the function utils.find_recursive) in order to gain time

File_typestr or list of str

File type(s) researched (sp3, erp, clk …) can be a list of string for several file type paths or a string like ‘sp3’ if only one file type is researched

ACs‘all’ or str or list of str

AC(s) researched can be a list of string for several ACs or a string like ‘gfz’ if only one AC is researched if ‘all’, search for all the ACs

date_startdt.datetime or 2-tuple list of int

begining of the time period researched can be a datetime or a 2-tuple (wwww,d) e.g. (1990,0)

date_endNone or dt.datetime or 2-tuple list of int

end of the time period researched can be a datetime or a 2-tuple (wwww,d) e.g. (1990,0) if None, then only date_start is researched

severebool

If True, raises an exception if something goes wrong

compressedstr

How the compressed files are handled “incl”: include the compressed files “only”: only consider the compressed files “excl”: exclude the compressed files

regex_old_namingbool

Handle old naming format

regex_new_namingbool

Handle new naming format

regex_igs_tfcc_namingbool

Handle TFCC specific format (for SINEX files)

add_weekly_filebool

Also handle the weekly file (day 7) Implemented only for the old naming format (for the moment)

Returns

Files_select_cumul_list – List of files found

Return type

list

geodezyx.operational.gnss_downloader.force_weekly_file_fct(force_weekly_file, sp3clk, day_in)
geodezyx.operational.gnss_downloader.geoaus_server(stat, date)

Geosciences Australia ex : ftp://ftp.ga.gov.au/geodesy-outgoing/gnss/data/daily/2010/10063/

geodezyx.operational.gnss_downloader.igs_cddis_nav_server(stat, date)
geodezyx.operational.gnss_downloader.igs_cddis_server(stat, date)
geodezyx.operational.gnss_downloader.igs_garner_server(stat, date)
geodezyx.operational.gnss_downloader.multi_archiver_rinex(rinex_lis, parent_archive_dir, archtype='stat', move=True, force_mv_or_cp=True)

from rinex_lis, a list of rinex (generated by the function multi_finder_rinex)

move (if move=True) of copy (if move=False) those rinexs in the parent_archive_dir according to the archtype, string describing how the archive directory is structured, e.g :

stat

stat/year

stat/year/doy

year/doy

year/stat

week/dow/stat

… etc …

geodezyx.operational.gnss_downloader.multi_downloader_orbs_clks(archive_dir, startdate, enddate, calc_center='igs', sp3clk='sp3', archtype='year/doy', parallel_download=4, archive_center='ign', repro=0, sorted_mode=False, force_weekly_file=False, return_also_uncompressed_files=True)

Download IGS products. Can manage MGEX products too (see archive_center argument)

Parameters
  • archive_dir (str) – Parent archive directory where files will be stored

  • & enddate (startdate) – Start and End of the wished period

  • calc_center (str or list of str) – calc_center can be a string or a list, describing the calc center e.g. ‘igs’,’grg’,’cod’,’jpl’ …

  • sp3clk (str) –

    Product type, can handle :

    ’clk’

    ’clk_30s’

    ’sp3’

    ’snx’

    ’sum’

    ’erp’

    ’bia’

  • archive_center (str) –

    server of download, “regular” IGS or MGEX, can handle :

    ’cddis’

    ’cddis_mgex’

    ’cddis_mgex_longname’

    ’ign’

    ’ign_mgex’

    ’ign_mgex_longname’

    ’gfz_local’

  • archtype (str) –

    string describing how the archive directory is structured, e.g :

    stat

    stat/year

    stat/year/doy

    year/doy

    year/stat

    week/dow/stat

    … etc …

  • repro (int) – number of the IGS reprocessing (0 = routine processing)

  • sorted_mode (bool) –

    if False:

    using the map multiprocess fct so the download order will be scrambled

    if True:

    using the apply multiprocess fct so the download order will be in the chrono. order

    The scrambled (False) is better, bc. it doesn’t create zombies processes

Returns

localfiles_lis – list of downloaded products paths

Return type

list of str

geodezyx.operational.gnss_downloader.multi_downloader_orbs_clks_2(archive_dir, startdate, enddate, AC_names=('wum', 'cod'), prod_types=('sp3', 'clk'), remove_patterns=('ULA'), archtype='week', new_name_conv=True, parallel_download=4, archive_center='ign', mgex=True, repro=0, sorted_mode=False, return_also_uncompressed_files=True, ftp_download=False, dow_manu=False)

dow_manu = False, no dow manu, consider the converted dow from the time span, regular case dow_manu = None, no dow in the REGEX, the crawler will search only for the week dow_manu = 0 or 7: the dow in question

geodezyx.operational.gnss_downloader.multi_downloader_rinex(statdico, archive_dir, startdate, enddate, archtype='stat', parallel_download=4, sorted_mode=False, user='', passwd='')
Parameters

statdico (dict) –

a statdico is a dictionary associating Archives Centers to list of stations

Exemple:
>>> statdico['archive center 1'] = ['STA1','STA2','STA3', ...]
>>> statdico['archive center 2'] = ['STA2','STA1','STA4', ...]
the supported archive center are (july 2015):

igs (cddis center)

igs_garner (for the garner center, but not very reliable)

rgp (St Mandé center)

rgp_1Hz (all the 24 hourly rinex for the day will be downloaded)

renag

ovsg

unavco

sonel

geoaus (Geosciences Australia)

nav or brdc as archive center allows to download nav files (using ‘BRDC’ as station name) from the CDDIS server

archtypestr

string describing how the archive directory is structured, e.g :

stat

stat/year

stat/year/doy

year/doy

year/stat

week/dow/stat

… etc …

sorted_modebool
if False:

using the map multiprocess fct so the download order will be scrambled

if True:

using the apply multiprocess fct so the download order will be in the chrono. order

The scrambled (False) is better, bc. it doesn’t create zombies processes

user & passwdstr

user & password for a locked server

Returns

  • url_list (list of str) – list of URLs

  • savedir_list (list of str) – list of downloaded products paths

geodezyx.operational.gnss_downloader.multi_finder_rinex(main_dir, rinex_types=('o', 'd', 'd.Z', 'd.z'), specific_stats=[])

from a main_dir, find all the rinexs in this folder and his subfolder

(corresponding to the rinex_types)

and return a list of the found rinexs

is very similar with geodetik.rinex_lister and gins_runner.get_rinex_list

But this one is the most elaborated , must be used in priority !!!

geodezyx.operational.gnss_downloader.orbclk_cddis_server(date, center='igs', sp3clk='sp3', repro=0, mgex=False, longname=False, force_weekly_file=False)

longname is experimental and only for MGEX yet !! (180426)

geodezyx.operational.gnss_downloader.orbclk_gfz_local_server(date, center='gfz', sp3clk='sp3', repro=0)
geodezyx.operational.gnss_downloader.orbclk_ign_server(date, center='igs', sp3clk='sp3', repro=0, mgex=False, longname=False, force_weekly_file=False)

longname is experimental and only for MGEX yet !! (180426) Must be merged with orbclk_cddis_server to make a big equivalent fct (180523)

geodezyx.operational.gnss_downloader.orbclk_igscb_server(date, center='gfz', sp3clk='sp3', repro=0)
geodezyx.operational.gnss_downloader.orbclk_long2short_name(longname_filepath_in, rm_longname_file=False, center_id_last_letter=None, center_manual_short_name=None, force=False, dryrun=False, output_dirname=None)

Rename a long naming new convention IGS product file to the short old convention Naming will be done automaticcaly based on the 3 first charaters of the long AC id e.g. CODE => cod, GRGS => grg, NOAA => noa …

Parameters
  • longname_filepath_in (str) – Full path of the long name product file

  • rm_longname_file (bool) – Remove the original long name product file

  • center_id_last_letter (str) – replace the last letter of the short AC id by another letter (see note below)

  • center_manual_short_name (str) – replace completely the long name with this one overrides center_id_last_letter

  • force (bool) – if False, skip if the file already exsists

  • dryrun (bool) – if True, don’t rename effectively, just output the new name

  • output_dirname (str) – directory where the output shortname will be created if None, will be created in the same folder as the input longname

Returns

shortname_filepath – Path of the short old-named product file

Return type

str

Note

if you rename MGEX orbits, we advise to set center_id_last_letter=”m” the AC code name will be changed to keep a MGEX convention (but any other caracter can be used too)

e.g. for Bern’s products, the long id is CODE

if center_id_last_letter=None, it will become cod, if center_id_last_letter=m, it will become com

geodezyx.operational.gnss_downloader.orpheon_server(stat, date, user='', passwd='')
geodezyx.operational.gnss_downloader.ovsg_server(stat, date, user='', passwd='')
geodezyx.operational.gnss_downloader.renag_server(stat, date)
geodezyx.operational.gnss_downloader.rgp_ign_smn_1Hz_server(stat, date)
geodezyx.operational.gnss_downloader.rgp_ign_smn_server(stat, date)
geodezyx.operational.gnss_downloader.rnx_long2short_name(longname_filepath_in)

MUST BE IMPROVED

geodezyx.operational.gnss_downloader.sonel_server(stat, date)

ex : ftp://ftp.sonel.org/gps/data/2015/001/

geodezyx.operational.gnss_downloader.start_end_date_easy(start_year, start_doy, end_year, end_doy)
geodezyx.operational.gnss_downloader.unavco_server(stat, date)

geodezyx.operational.hector_frontend module

@author: psakic

This sub-module of geodezyx.operational contains functions to run the time series velocities estimation software HECTOR.

it can be imported directly with: from geodezyx import operational

The GeodeZYX Toolbox is a software for simple but useful functions for Geodesy and Geophysics under the GNU GPL v3 License

Copyright (C) 2019 Pierre Sakic et al. (GFZ, pierre.sakic@gfz-postdam.de) GitHub repository : https://github.com/GeodeZYX/GeodeZYX-Toolbox_v4

geodezyx.operational.hector_frontend.MJD2dt(mjd_in)
geodezyx.operational.hector_frontend.get_FLH_from_NEUfile(neufilepath)
geodezyx.operational.hector_frontend.keeping_specific_stats(listoffiles, specific_stats, invert=False)

if invert = True : NOT keeping BUT removing specific stats

geodezyx.operational.hector_frontend.momfile_trend_processing(inp_momfile, generik_conf_file, outdir='', remove_ctl_file=True)
geodezyx.operational.hector_frontend.multi_momfile_trend_processing(inpdir, generik_conf_file, outdir='', extention='pre.mom', remove_ctl_file=True, specific_stats=(), invert_specific=False)
geodezyx.operational.hector_frontend.multi_neufile_outlier_removing(inpdir, generik_conf_file, outdir='', extention='neu', specific_stats=(), invert_specific=False, remove_ctl_file=True)
geodezyx.operational.hector_frontend.multi_sumfiles_trend_extract(inp_dir, out_dir, out_prefix, raw_neu_dir='', specific_stats=(), invert_specific=False, style='epc')

style = globk OR epc make a GLOBK style .vel file or make a dirty velocity file compatible with EPC

geodezyx.operational.hector_frontend.neufile_outlier_removing(inp_neufile, generik_conf_file, outdir='', remove_ctl_file=True)

from a NEU file => removeoutlier preprocessing => 3 MOM files (one per component)

geodezyx.operational.hector_frontend.sumfiles_to_statdico(inpdir, specific_stats=(), invert_specific=False)

this fct search for every sum file in a folder a stat dico contains no data only the paths to the E,N,U sum files statdico[stat] = [path/E.sum,path/N.sum,path/U.sum ]

for each stat getting the 3 ENU sum files

Thoses lists will be send in sumfiles_trend_extract

geodezyx.operational.hector_frontend.sumfiles_trend_extract(listof3ENUsumfile)
geodezyx.operational.hector_frontend.velfile_from_a_list_of_statVsV_tuple(listoftup, out_dir, out_prefix, raw_neu_dir='', style='epc')

geodezyx.operational.midas_frontend module

@author: psakic

This sub-module of geodezyx.operational contains functions to run the time series velocities estimation software MIDAS.

it can be imported directly with: from geodezyx import operational

The GeodeZYX Toolbox is a software for simple but useful functions for Geodesy and Geophysics under the GNU GPL v3 License

Copyright (C) 2019 Pierre Sakic et al. (GFZ, pierre.sakic@gfz-postdam.de) GitHub repository : https://github.com/GeodeZYX/GeodeZYX-Toolbox_v4

geodezyx.operational.midas_frontend.midas_plot(path_tenu, path_vel='', path_step='')

based on a plot for TimeSeriePoint

geodezyx.operational.midas_frontend.midas_run(tenu_file_path, work_dir='', path_midas_soft='', step_file_path='', with_plot=True, keep_plot_open=True)
geodezyx.operational.midas_frontend.midas_vel_files_2_pandas_DF(vel_files_in)

Convert MIDAS Velocity files to a Pandas DataFrame

Parameters

vel_files_in (str or list of str) – if list of str, will consider directly the files inside the list if str, can be the path of a single file, or a generic (wilcard) path to consider several files

Returns

DF

Return type

Pandas DataFrame

geodezyx.operational.rinex_lister_plotter module

@author: psakic

This sub-module of geodezyx.operational generates RINEX timeline plot.

it can be imported directly with: from geodezyx import operational

The GeodeZYX Toolbox is a software for simple but useful functions for Geodesy and Geophysics under the GNU GPL v3 License

Copyright (C) 2019 Pierre Sakic et al. (GFZ, pierre.sakic@gfz-postdam.de) GitHub repository : https://github.com/GeodeZYX/GeodeZYX-Toolbox_v4

geodezyx.operational.rinex_lister_plotter.listing_gins_timeline(path, stat_strt, stat_end, date_strt, date_end, suffix_regex='')

find all gins listings in a folder and his subfolders and plot timeline of the avaiable listings

stat_strt,stat_end,date_strt,stat_end : where to find in the name the statname and the date

geodezyx.operational.rinex_lister_plotter.rinex_check_epochs_availability(rinex_path_list)
Args :

A list of rinex paths

Returns :

T : a table with results

geodezyx.operational.rinex_lister_plotter.rinex_lister(path, add_new_names=True)

find all rinex in a folder and his subfolders path can be a string or a tuple of string => manage multi files :)

is very similar with softs_runner.multi_finder_rinex and gins_runner.get_rinex_list

geodezyx.operational.rinex_lister_plotter.rinex_timeline(inputlist_or_paths, start=datetime.datetime(1980, 1, 1, 0, 0), end=datetime.datetime(2099, 1, 1, 0, 0), use_rinex_lister=True, dots_plot=False, jul_date_plot=False, return_figure=False)

if use_rinex_lister = True : inputlist_or_paths is a path OR a list of path where RINEX can be found (use the subfunction rinex_lister for that) else if use_rinex_lister = False: it’s a list of RINEXs

geodezyx.operational.rinex_lister_plotter.rinex_timeline_datadico(inputlist_or_paths, use_rinex_lister=True, optional_info='')
convention for RINEX datadico :

datadico[stat] = [(rinexname1,optional1,date1) … (rinexnameN,optionalN,dateN)]

geodezyx.operational.rinex_lister_plotter.rinex_timeline_datadico_merge(datadico_list, priority_list=None)

Merge different RINEXs datadico, produced by rinex_timeline_datadico coming from different archives Args :

rinex_timeline_datadico : list of RINEX datadico priority_list : priority list of ‘optional_info’ (archive ID)

it will erase optional_info of lower priority NB : it is not very useful, just sort

datadico_list in the right order …

Returns :

datadico_out : a merged datadico

geodezyx.operational.rinex_lister_plotter.rinex_timeline_datadico_merge_not_very_smart(datadico_list, priority_list)

Merge different RINEXs datadico, produced by rinex_timeline_datadico coming from different archives Args :

rinex_timeline_datadico : list of RINEX datadico priority_list : priority list of ‘optional_info’ (archive ID)

it will erase optional_info of lower priority

Returns :

datadico_out : a merged datadico

geodezyx.operational.rinex_lister_plotter.timeline_plotter(datadico, start=datetime.datetime(1980, 1, 1, 0, 0), end=datetime.datetime(2099, 1, 1, 0, 0), dots_plot=False, jul_date_plot=False, datadico_anex_list=[], use_only_stats_of_main_datadico=False, colordico_for_main_datadico=None)

A simpler version has been commited to geodezyx toolbox for archive on 20180118 15:59A

geodezyx.operational.rinex_utils module

@author: psakic

This sub-module of geodezyx.operational contains functions to manipulate RINEX files (version 2, quite obsolate).

it can be imported directly with: from geodezyx import operational

The GeodeZYX Toolbox is a software for simple but useful functions for Geodesy and Geophysics under the GNU GPL v3 License

Copyright (C) 2019 Pierre Sakic et al. (GFZ, pierre.sakic@gfz-postdam.de) GitHub repository : https://github.com/GeodeZYX/GeodeZYX-Toolbox_v4

geodezyx.operational.rinex_utils.check_if_compressed_rinex(rinex_path)
geodezyx.operational.rinex_utils.crz2rnx(rinex_path, outdir='', force=True, path_of_crz2rnx='CRZ2RNX')

assuming that CRZ2RNX is in the system PATH per default

geodezyx.operational.rinex_utils.crz2rnx_bad(crinex_in_path, outdir='', force=True, path_of_crz2rnx='CRZ2RNX')

assuming that CRZ2RNX is in the system PATH per default

geodezyx.operational.rinex_utils.rinex_read_epoch(input_rinex_path_or_string, interval_out=False, add_tzinfo=False, out_array=True)

input_rinex_path_or_string :

can be the path of a RINEX or directly the RINEX content as a string

161019 : dirty copier coller de rinex start end

geodezyx.operational.rinex_utils.rinex_regex(compressed=True, compiled=False)
geodezyx.operational.rinex_utils.rinex_regex_new_name(compressed=True, compiled=False)
geodezyx.operational.rinex_utils.rinex_renamer(input_rinex_path, output_directory, stat_out_name='', remove=False)
geodezyx.operational.rinex_utils.rinex_session_id(first_epoch, last_epoch, full_mode=False)
full_mode:

gives the letter of the starting session & the length in hour of the session

geodezyx.operational.rinex_utils.rinex_spliter(input_rinex_path, output_directory, stat_out_name='', interval_size=24, compress=False, shift=0, inclusive=False, teqc_cmd='teqc')

if shift != 0: the start/end of a session is shifted of shift minutes

inclusive: delta of exaclty interval_size => add the 1st epoch of the next sess not inclusive: delta of interval_size - 1s

geodezyx.operational.rinex_utils.rinex_start_end(input_rinex_path, interval_out=False, add_tzinfo=False, verbose=True, safety_mode=True)

safety_mode :

if the epoch reading fails (e.g. in case of a compressed RINEX) activate a reading of the header and the file name as backup.

une liste d’epochs en début et fin de fichier => en trouver le min et le max NB : FAIRE UN FONCTION READ EPOCH A L’OCCAZ NBsuite : c’est fait au 161018 mais par contre c’est un dirty copier coller

geodezyx.operational.rinex_utils.rnx2crz(rinex_path, outdir='', force=True, path_of_rnx2crz='RNX2CRZ')

assuming that RNX2CRZ is in the system PATH per default

geodezyx.operational.rinex_utils.same_day_rinex_check(rinex1, rinex2)
geodezyx.operational.rinex_utils.teqc_qc(rinex_path, quick_mode=False, optional_args='')

quick mode : reduced qc and no summary file written

geodezyx.operational.rtklib_frontend module

@author: psakic

This sub-module of geodezyx.operational contains functions to run the GNSS processing software RTKLIB.

it can be imported directly with: from geodezyx import operational

The GeodeZYX Toolbox is a software for simple but useful functions for Geodesy and Geophysics under the GNU GPL v3 License

Copyright (C) 2019 Pierre Sakic et al. (GFZ, pierre.sakic@gfz-postdam.de) GitHub repository : https://github.com/GeodeZYX/GeodeZYX-Toolbox_v4

geodezyx.operational.rtklib_frontend.read_conf_file(filein)
geodezyx.operational.rtklib_frontend.rtklib_run_from_rinex(rnx_rover, rnx_base, generik_conf, working_dir, experience_prefix='', rover_auto_conf=False, base_auto_conf=True, XYZbase=[0, 0, 0], outtype='auto', calc_center='igs')
auto_conf :

read the header of the rinex and write the conf. file according to it if the mode is disabled, the antenna/rec part of the conf. file will be the same as the generic one

NB : RTKLIB “core” have it’s own reading header option. Thus, my advice is to disable the auto mode for the rover and leave ant1-postype=rinexhead in the generic conf file and enable it for the base with a XYZbase vector initialized or the good XYZ in header on the rinex (the XYZbase vector is prioritary over the base RINEX header)

(but in anycase, prepars good rinex’s headers ;) )

outtype :

‘auto’ (as defined in the generic config file) or ‘dms’ ‘deg’ ‘xyz’ ‘enu’ can manage the upper case XYZ or FLH

geodezyx.operational.track_frontend module

@author: psakic

This sub-module of geodezyx.operational contains functions to run the GNSS processing software TRACK.

it can be imported directly with: from geodezyx import operational

The GeodeZYX Toolbox is a software for simple but useful functions for Geodesy and Geophysics under the GNU GPL v3 License

Copyright (C) 2019 Pierre Sakic et al. (GFZ, pierre.sakic@gfz-postdam.de) GitHub repository : https://github.com/GeodeZYX/GeodeZYX-Toolbox_v4

geodezyx.operational.track_frontend.run_track(temp_dir, exp_full_name, out_conf_fil, date, rnx_rover)
geodezyx.operational.track_frontend.track_runner(rnx_rover, rnx_base, working_dir, experience_prefix, XYZbase=[], XYZrover=[], outtype='XYZ', mode='short', interval=None, antmodfile='~/gg/tables/antmod.dat', calc_center='igs', forced_sp3_path='', const='G', silent=False, rinex_full_path=False, run_on_gfz_cluster=False, forced_iono_path='')