geodezyx.files_rw package

Submodules

geodezyx.files_rw.geo_files_converter_lib module

@author: psakic

This sub-module of geodezyx.files_rw deals with file format conversion between different file standards .

it can be imported directly with: from geodezyx import files_rw

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.files_rw.geo_files_converter_lib.Tropsinex_DataFrame(read_sinex_result)
geodezyx.files_rw.geo_files_converter_lib.convert_statinfo2eqfile(statinfoin, eqfileout)
geodezyx.files_rw.geo_files_converter_lib.header_from_ellipsoid(ellipsoid)
geodezyx.files_rw.geo_files_converter_lib.list_stat_in_statinfo(statinfoin)
geodezyx.files_rw.geo_files_converter_lib.plot_nmea(T, E, N, U, Q)

a quick and dirty fct to plot the NMEA

geodezyx.files_rw.geo_files_converter_lib.read_OTPS_tide_file(pathin, print_line=False, return_array=True)
Return :

latlis , lonlis , datlis , hlis

geodezyx.files_rw.geo_files_converter_lib.read_eqfile_as_dico(filein, delGPSfield=False)

for an eqfile return a dico dic[STAT] = [disc1 , disc2 …] where disc are the discont of the FIRST column

delGPSfield manage the elimination of the line of type _GPS which are not regular EDIT : 150817 WHY ???

geodezyx.files_rw.geo_files_converter_lib.read_eqfile_time_solo(filein, stat)

BROUILLON pour une station, donne les startdate et enddate d’une periode SORTIE : 2 x liste de dt

geodezyx.files_rw.geo_files_converter_lib.read_globk_vel_file(velfile_in)
geodezyx.files_rw.geo_files_converter_lib.read_lfile_solo(filein, stat)

WEAK : should be improved with discontinuites management

geodezyx.files_rw.geo_files_converter_lib.read_nmea(file_path, enuout=True, startdate=datetime.datetime(1980, 1, 1, 0, 0), enddate=datetime.datetime(2099, 1, 1, 0, 0), export_path='')

if export_path != ‘’, export a Matlab readable file to this path WARNING !!! la coord de ref est codée en dur, à coriger !!!!

geodezyx.files_rw.geo_files_converter_lib.read_pbo_vel_file_solo(velfilein, stat)

return a LIST of panda dataframe (corrsponding to different discontinuites), where the keywords of the pbo .vel can be used directly

exemple : ftp://data-out.unavco.org/pub/products/velocity/pbo.final_nam08.vel

geodezyx.files_rw.geo_files_converter_lib.read_rinex_2_dataobjts(rinex_path)
geodezyx.files_rw.geo_files_converter_lib.read_rinex_nav(fn, writeh5=None, version=2)

Based on Michael Hirsch readRinexNav function Manage RINEX3 http://gage14.upc.es/gLAB/HTML/GPS_Navigation_Rinex_v2.11.html

geodezyx.files_rw.geo_files_converter_lib.read_sinex(sinex_path_in, keep_sites_as_index=False, drop_nan=False)

Read a coordinate SINEX file as DataFrame

Parameters
  • sinex_path_in (str) – path of the SINEX.

  • keep_sites_as_index (Bool, optional) – use the site names as index. The default is False.

  • drop_nan (bool or str, optional) – remove the NaN in the DataFrame. False: do not remove them ‘all’: remove the row if all values are NaN ‘any’: remove the row if at least one value is NaN (dangerous) The default is False.

Returns

DFout – SINEX DataFrame.

Return type

DataFrame

geodezyx.files_rw.geo_files_converter_lib.read_sinex_bench_antenna(sinex_in)
geodezyx.files_rw.geo_files_converter_lib.read_sinex_discontinuity_solo(snxfile, stat, PorV='P')
geodezyx.files_rw.geo_files_converter_lib.read_sinex_legacy(snxfile, dataframe_output=True)

This function is depreciated !!!!

geodezyx.files_rw.geo_files_converter_lib.read_sinex_versatile(sinex_path_in, id_block, convert_date_2_dt=True, header_line_idx=- 1, improved_header_detection=True, verbose=True)

Read a block from a SINEX and return the data as a DataFrame

Parameters
  • sinex_path_in (str) – Description param1

  • id_block (str) – Name of the block (without “+” or “-“)

  • convert_date_2_dt (bool) – Try to convert a SINEX formated date as a python datetime

  • header_line_idx (int or None) – If the block header contains several lines, use this line index Per default, the last (-1) For the first line, use 0 If no header is properly defined, use None

  • improved_header_detection (bool) – Improved header detection. Works for most cases but sometime the simple version works better. (advenced usage) Default is True

  • verbose (bool) – print the header and its field size Default is True

Returns

DF – Returned DataFrame

Return type

Pandas DataFrame

geodezyx.files_rw.geo_files_converter_lib.read_snx_trop(snxfile, dataframe_output=True)

Read troposphere solutions from Troposphere SINEX

geodezyx.files_rw.geo_files_converter_lib.read_station_info_solo(filein, stat, column_type='ulr')
column_typestr

“ulr” or “sopac”

geodezyx.files_rw.geo_files_converter_lib.read_station_info_solo_date(filein, stat, date, column_type='ulr')
geodezyx.files_rw.geo_files_converter_lib.read_station_info_time_solo(filein, stat)

BROUILLON pour une station, donne les startdate et enddate d’une periode SORTIE : 2 x liste de dt

geodezyx.files_rw.geo_files_converter_lib.receptor_gins_corrector(inRec)
geodezyx.files_rw.geo_files_converter_lib.sinex_DataFrame(read_sinex_result)
geodezyx.files_rw.geo_files_converter_lib.smart_elt_list(list_raw, n_elt, replacement='')
geodezyx.files_rw.geo_files_converter_lib.stat_file_GINS_new_fmt(file_out_path, STAT='STAT', xyz=[0.0, 0.0, 0.0], ecc_une=[0.0, 0.0, 0.0], rec='NONE', ant='NONE', radom='NONE', ant_id='0000')
geodezyx.files_rw.geo_files_converter_lib.stat_list_in_station_info(filein)
geodezyx.files_rw.geo_files_converter_lib.statinfo_2_cats(statinfo_path, catsneu_path)
geodezyx.files_rw.geo_files_converter_lib.station_info_2_gins(statinfoin, coordfilein, outfile, coordfile_type='pbovelfile', specific_stats_lis=[], ellipsoid='GRS80', station_info_columns_type='sopac')

Convert a GAMIT station.info to a GINS stations files

Inputs :

statinfoin : path of input station.info coodfilein : path of input coordinates files outfile : path of output GINS station file coordfile_type : GAMIT coordinates files type : ‘lfile’ or ‘pbovelfile’ specific_stats_lis : list of specific stats ellipsoid : ‘GRS80’ station_info_columns_type : it exists different subtypes of station.info …

handles “sopac” or “ulr” yet

Output :

path of GINS outfile

geodezyx.files_rw.geo_files_converter_lib.statname_of_catsfile(catsneu_path)
geodezyx.files_rw.geo_files_converter_lib.unzip_gz_Z(inp_gzip_file, out_gzip_file='', remove_inp=False, force=False)

if out_gzip_file if not precised, file will be extracted in the same folder as inp_gzip_file

.Z decompression is implemented, but is very unstable (avoid .Z, prefer .gz)

geodezyx.files_rw.geo_files_converter_lib.write_eqfile_from_dico(dicoin, outdir, outfilename)
geodezyx.files_rw.geo_files_converter_lib.write_latlontime_file_4_OTPS_tide(outfilepath, lat, lon, strt, end=None, sec_step=1, generate_inp_file=True, tide_model_path='./DATA/Model_atlas', set_relative_path_in_inp_file=True)

strt : start as a datetime end : it can be :

length of the period in sec (integer) OR if None, strt is a list

lat>0 - degrees North, lon>0 - degrees East lat<0 - degrees South, lon<0 - degrees West

lat/lon can be a list, with the same size as dates_lis

geodezyx.files_rw.geo_files_converter_lib.write_lfile_from_datalists(site_lis, location_lis, lfile_out_path)

datalists (period_lis_lis , stat_lis , loc_lis ) are produced by : * mono_logsheet_read * multi_logsheet_read

geodezyx.files_rw.geo_files_converter_lib.write_station_file_gins_from_datalists(period_lis_lis, site_lis, location_lis, station_info_out_path, ellipsoid='GRS80')

datalists (period_lis_lis , stat_lis , loc_lis ) are produced by : * mono_logsheet_read * multi_logsheet_read

geodezyx.files_rw.geo_files_converter_lib.write_station_file_gins_from_rinex(rinex_path, station_file_out, stat_code_filename_prioritary=True)
geodezyx.files_rw.geo_files_converter_lib.write_station_info_from_datalists(period_lis_lis, site_lis, location_lis, station_info_out_path)
datalists (period_lis_lis , stat_lis , loc_lis ) are produced by :
  • mono_logsheet_read do not forget to activate return_lists = True

  • multi_logsheet_read do not forget to activate return_dico = False

geodezyx.files_rw.read_coords_time_series module

@author: psakic

This sub-module of geodezyx.files_rw contains reading functions to import files containing geodetic time series.

it can be imported directly with: from geodezyx import files_rw

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.files_rw.read_coords_time_series.MZB_GINS_2_ATM_GAMIT(listing_in, path_out)
geodezyx.files_rw.read_coords_time_series.convert_sp3_clk_2_GINS_clk(sp3_path_in, clk_gins_out, interpo_30sec=True, return_as_DF=True)
geodezyx.files_rw.read_coords_time_series.gins_readTROPOZ(filein)

Read TROPOZ in a GINS’ listing

geodezyx.files_rw.read_coords_time_series.gins_read_MZB(filein, return_df=False)

Read Mean Zeintal Bias in a GINS’ listing

geodezyx.files_rw.read_coords_time_series.gins_read_time(line)
geodezyx.files_rw.read_coords_time_series.interp_sndy_SYS_UTC(time_conv_file_in)
geodezyx.files_rw.read_coords_time_series.prn_int_2_prn_str(prn_int, full_out=False)

for read_combi_sum_full

if full_out : return e.g. “G04”,”G”,4

geodezyx.files_rw.read_coords_time_series.read_IGS_coords(filein, initype='auto')
geodezyx.files_rw.read_coords_time_series.read_all_obs(filein)

selectionne automatiquement le type de fichier brut en entrée INPUT : chemin du fichier brut de observations génériques OUTPUT : Une LISTE de TimeSerieObs

geodezyx.files_rw.read_coords_time_series.read_all_points(filein)

selectionne automatiquement le type de fichier brut en entrée INPUT : chemin du fichier brut de POINTS OUTPUT : Une TimeSeriePoint

geodezyx.files_rw.read_coords_time_series.read_calais(filelist)

filelistin est une liste de 3 fichier E N & U

geodezyx.files_rw.read_coords_time_series.read_combi_REPORT(Path_list)
geodezyx.files_rw.read_coords_time_series.read_combi_clk_rms(sum_file, return_as_df=True, clk_ref_cen_gal='com', index_useful_col=- 4, convert_to_int=True)

based on : read_good_clk_rms_one

geodezyx.files_rw.read_coords_time_series.read_combi_clk_rms_full_table(path_in, with_stats_rms=False, detailed_df=False)

recommended for .out file

detailed_df: the outlier values are more detailled X (excuded) => np.inf - (not proivided) => np.nan >>> (too big for a print, but still kept) => 999999

geodezyx.files_rw.read_coords_time_series.read_combi_sum_exclu(sum_file, return_as_df=True, use_intuitive_bool=True)
geodezyx.files_rw.read_coords_time_series.read_combi_sum_full(sum_full_file, RMS_lines_output=True, set_PRN_as_index=True)
geodezyx.files_rw.read_coords_time_series.read_epos_slv_times(p, convert_to_time=False)

convert_to_time : divide by the speed of light to get time-homogene values. Values in meter instead If convert_to_time : time in sec

geodezyx.files_rw.read_coords_time_series.read_epos_sta_coords_mono(filein, return_df=True)

read an EPOS’s YYYY_DDD_XX_sta_coordinates coordinates files and return a list of Points objects

… TBC …

geodezyx.files_rw.read_coords_time_series.read_epos_sta_coords_multi(filein_list, return_dict=True)
geodezyx.files_rw.read_coords_time_series.read_epos_sta_kinematics(filein)

read an EPOS kinematic solutions

geodezyx.files_rw.read_coords_time_series.read_epos_tim(tim_file_in, convert_to_sec=False)

results in microsec

geodezyx.files_rw.read_coords_time_series.read_gins(filein, kineorstatic='kine', flh_in_rad=True, force_get_convergence=False, kf_result=False)

Static : donne un point Kinematic : donne une TS

force_get_convergence : if there is a bug about ‘COORDONNEES DES STATIONS AJUSTEES EN HAUTE FREQUENCE’ field, it is in the listing but empty … so we force the retreive of the ‘c o n v e r g e n c e’ part

geodezyx.files_rw.read_coords_time_series.read_gins_double_diff(filein)

return a list of Point object for a double diff listing

geodezyx.files_rw.read_coords_time_series.read_gins_double_diff_multi(filelistin)

return a dictionnary with station names as keys and timeseries as values

geodezyx.files_rw.read_coords_time_series.read_gins_multi_extracted(filelistin, flh_in_rad=True)

traite les extractions de listings sous la forme par ex. S<HLP>__ddhhiissxxxxxxxxxyym.HOUE La liste doit contenir exactement 3 fichiers (pour chacune des composantes)

geodezyx.files_rw.read_coords_time_series.read_gins_multi_raw_listings(filelistin, kineorstatic='static', flh_in_rad=True)

traite une liste de listing bruts pour obtenir UNE SEULE timeserie

geodezyx.files_rw.read_coords_time_series.read_gins_solution(filein, mode='cinematic')

mode = cinematic : retrun a TimeSerie mode = static : retrun a point

geodezyx.files_rw.read_coords_time_series.read_gins_solution_multi(filein_list, return_dict=True)
geodezyx.files_rw.read_coords_time_series.read_gins_wrapper(input_list_or_path, flh_in_rad=True)

pour une liste de paths renvoie une liste de timeseries AUTANT DE TIMESERIES QUE DE LISTINGS

INPUT : Une liste de fichiers Un path compatible avec glob

les fichiers sans extensions .gins sont automatiquement exclus

geodezyx.files_rw.read_coords_time_series.read_gipsy_apps(filein)

Read GIPSY APPS (Online tool) File

Parameters

filein (str) – input file path.

Returns

tsout – output TimeSerie.

Return type

TimeSeries Object

geodezyx.files_rw.read_coords_time_series.read_gipsy_bosser(filein)

Read P. Bosser (@ENSTA Brest) File (GIPSY)

Parameters

filein (str) – input file path.

Returns

tsout – output TimeSerie.

Return type

TimeSeries Object

geodezyx.files_rw.read_coords_time_series.read_gipsy_tdp(filein)

Wrapper of read_tdp

geodezyx.files_rw.read_coords_time_series.read_gipsy_tdp_list(filelistin)

Read Several GIPSY TDP (Time Dependent Parameter) Files

Parameters

filelistin (list) – input file paths in a list.

Returns

tsout – output TimeSerie.

Return type

TimeSeries Object

geodezyx.files_rw.read_coords_time_series.read_hector_neu(filein)
geodezyx.files_rw.read_coords_time_series.read_jpl_timeseries_solo(latlonrad_files_list)
geodezyx.files_rw.read_coords_time_series.read_jump_file(filein, returned_events=('S', 'E', 'D'))

From a “Jump” File (P. Sakic internal file) Return a dictionnairy with events

Parameters
  • filein (str) – path of the Jump File

  • returned_events (tuple or list) – contains the inital letter of the event type which will be stored in the dico (See below)

Returns

jump_dico – outputed events, in the form jump_dico[“STAT”][“L”] = datetime where L is the inital letter of the event type

Return type

dict of dict of datetime

Note

A jump file contains infos like this :

>>> STAT S 2000 001
>>> STAT E 2001 001
>>> STAT D 2000 06 01

it can manage YEAR DOY or YEAR MM DD or DECIMAL YEAR

A non-blank 1st column is a commented line

After a #, it is a commentary

event type letters :

S : Start

E : End

D : Discontinuity

geodezyx.files_rw.read_coords_time_series.read_nav_step1_geodesea(filein)
geodezyx.files_rw.read_coords_time_series.read_nevada(filein, input_coords='enu')

input_coords=”enu” or “xyz”

geodezyx.files_rw.read_coords_time_series.read_nrcan_csv(filein, associated_ps_file='', statname='')

associated_ps_file is highly recommanded because of the time managing

WARN : Must be avoided b/c of the weak decimal precision of the angles !!!

geodezyx.files_rw.read_coords_time_series.read_nrcan_pos(filein)

.pos file are more precise than .csv, should be used !

geodezyx.files_rw.read_coords_time_series.read_pbo_pos(filein)
geodezyx.files_rw.read_coords_time_series.read_qinsy(filein, yy, mm, dd)
geodezyx.files_rw.read_coords_time_series.read_renag_synthetic(filein, discont_file_in=None)
geodezyx.files_rw.read_coords_time_series.read_rtklib(filein)

lit un fichier de type RTKLIB INPUT : chemin du fichier brut OUTPUT : Une TimeSeriePoint

geodezyx.files_rw.read_coords_time_series.read_sndy_mat_att(filein, IntSYSUTCin=None)
geodezyx.files_rw.read_coords_time_series.read_sndy_mat_nav(filein, IntSYSUTCin=None)
geodezyx.files_rw.read_coords_time_series.read_sonardyne_attitude(filein)
geodezyx.files_rw.read_coords_time_series.read_sonardyne_posi(filein)
geodezyx.files_rw.read_coords_time_series.read_tdp(filein)

Read GIPSY TDP (Time Dependent Parameter) File

Parameters

filein (str) – input file path.

Returns

tsout – output TimeSerie.

Return type

TimeSeries Object

geodezyx.files_rw.read_coords_time_series.read_track(filein)

Read GAMIT/TRACK File

Parameters

filein (str) – input file path.

Returns

tsout – output TimeSerie.

Return type

TimeSeries Object

geodezyx.files_rw.read_coords_time_series.read_track_2(filein, site_name=None)

Read a kinematic track file

Parameters

filein (str) – path of the file.

Returns

DF

Return type

Pandas DataFrame

geodezyx.files_rw.read_coords_time_series.sorting_a_calais_file(openedfile)
geodezyx.files_rw.read_coords_time_series.write_ATM_GAMIT(Tstk, MZBstk, sMZBstk, namestat, file_out)

geodezyx.files_rw.read_geo_files module

@author: psakic

This sub-module of geodezyx.files_rw contains reading functions to import files containing geodetic observations/products.

it can be imported directly with: from geodezyx import files_rw

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.files_rw.read_geo_files.AC_equiv_vals(AC1, AC2)

Find common values between 2 Orbit DataFrame (from SP3)

Parameters
  • AC1 (DataFrame) – Orbit DataFrame 1.

  • AC2 (DataFrame) – Orbit DataFrame 2.

Returns

  • AC1_ok (DataFrame) – Cleaned Orbit DataFrame 1.

  • AC2_ok (DataFrame) – Cleaned Orbit DataFrame 2.

  • ACmerged (DataFrame) – Merged orbit DataFrame.

geodezyx.files_rw.read_geo_files.Tropsinex_DataFrame(read_sinex_result)

General description

read_sinex_result :

List values from read_snx_trop function

DF_Sinex :

troposphere information from SINEX in Dataframe

geodezyx.files_rw.read_geo_files.clk_decimate(file_in, file_out, step=300)

Decimate a .clk file

Parameters
  • file_in (str) – path of the input clk file.

  • file_out (str) – path of the output clk file.

  • step (int, optional) – decimation step in sec. The default is 300.

Returns

file_out – path of the output clk file.

Return type

str

geodezyx.files_rw.read_geo_files.clk_diff(file_1, file_2)

Compute the clock differences between two .clk file

Parameters
  • file_1 (str) – file 1 path.

  • file_2 (str) – file 2 path.

Returns

DFdiff – clock differences epoch byx epoch between the two files.

Return type

DataFrame

geodezyx.files_rw.read_geo_files.list_files(dire, file=None)

written for MGEX combi by GM should be discontinued

geodezyx.files_rw.read_geo_files.read_IERS(file_path_in)
geodezyx.files_rw.read_geo_files.read_IERS_info(fil, mjd)
geodezyx.files_rw.read_geo_files.read_bernese_trp(trpfile)

This function reads tropospheric solution in TRP format from Bernese GNSS software

trpfile:

Filename of TRP file from Bernese

Returns

Tropospheric solutions from Bernese in Dataframe

Return type

DF

Notes

Written by Chaiyaporn Kitpracha

geodezyx.files_rw.read_geo_files.read_bull_B(file_path_in)

Read an Bulletin B file

Parameters

file_path_in (str) – Path of the file in the local machine.

Returns

DFout – Returns a panda table format with the data extracted from the file.

Return type

pandas DataFrame

geodezyx.files_rw.read_geo_files.read_clk(file_path_in, names_4char=False)

Read an IGS clk file

Parameters
  • file_path_in (str) – Path of the file in the local machine. can handle gzip-compressed file (with .gz/.GZ extension)

  • names_4char (bool) – Force the station names to have 4 charaters (new naming convention is longer)

Returns

DFclk – Returns a panda table format with the data extracted from the file.

Return type

pandas DataFrame

Note

Bias is given in seconds

geodezyx.files_rw.read_geo_files.read_clk_from_sp3(file_path_or_DForb_in)

Get the clock values from a SP3 file of an Orbit DataFrame, formated as a Clock DataFrame

Parameters

file_path_or_DForb_in (str or DataFrame) – the input SP3 file path or an Orbit DataFrame.

Returns

DFclk_sp3 – Clock DataFrame.

Return type

DataFrame

geodezyx.files_rw.read_geo_files.read_clk_old(file_path_in, returns_pandas=True, interval=None, old_naming=True)

Read an IGS clk file Slow and complex, use read_clk instead

Parameters
  • file_path_in (str) – Path of the file in the local machine.

  • returns_pandas (bool) – Define if pandas function will be used to put the data on tables

  • interval (int) – Defines which interval should be used in the data tables. The interval is always in minutes unit.

Returns

  • out1 (float or int oandas table) – Returns a panda table format with the data extracted from the file.

  • out2 (list) – In case of the pandas function are not in use, the return will be a list with the data extract from the file.

geodezyx.files_rw.read_geo_files.read_eop_C04(file_path_in)

read EOP C04 file

Parameters

file_path_in (str) – path of the EOP C04 file.

Returns

DF – out DataFrame.

Return type

DataFrame

geodezyx.files_rw.read_geo_files.read_eop_finals(file_path_in, precnut_model=2000, simplified_EOP_DF='mixed')

read EOP finals file

Parameters
  • file_path_in (str) – path of the EOP finals file.

  • precnut_model (int, optional) – IAU Precession-Nutation Model. Valid values are 1980 and 2000. The default is 2000.

Returns

  • DF (DataFrame) – out DataFrame - Complete content of the finals file.

  • DF2 (DataFrame) – out DataFrame - Simplified content of the finals file. Based on C04 EOP DataFrame structure. If no Bulletin-B values provided, use Bulletin-A.

geodezyx.files_rw.read_geo_files.read_erp(file_path_in, ac=None)

Read IGS Analysis Center ERP files

Parameters
  • file_path_in (str) – Path of the file in the local machine.

  • ac (str) – The analysis center that will be used. If not precised, will be the first 3 letters of the input name

Returns

out1 – Returns a panda table format with the data extracted from the file.

Return type

pandas table

Note

Columns name

(‘MJD’,’X-P (arcsec)’, ‘Y-P (arcsec)’, ‘UT1UTC (E-7S)’,’LOD (E-7S/D)’,’S-X (E-6” arcsec)’,’S-Y (E-6” arcsec)’, ‘S-UT (E-7S)’,’S-LD (E-7S/D)’,’NR (E-6” arcsec)’, ‘NF (E-6” arcsec)’, ‘NT (E-6” arcsec)’, ‘X-RT (arcsec/D)’,’Y-RT (arcsec/D)’,’S-XR (E-6” arcsec/D)’,’S-YR (E-6” arcsec/D)’, ‘C-XY’, ‘C-XT’, ‘C-YT’, ‘DPSI’, ‘DEPS’,’S-DP’,’S-DE’)

geodezyx.files_rw.read_geo_files.read_erp_bad(path, return_array=False)

This function is discontinued, use read_erp1 instead

geodezyx.files_rw.read_geo_files.read_erp_multi(path_list, return_array=False, smart_mode=True, ac=None)
Input :

path_list : a list of ERP files smart_mode : keep only the latest value (True is recommended)

geodezyx.files_rw.read_geo_files.read_erp_snx(snx_in)

Read ERP in SINEX Format

Parameters

snx_in (TYPE) – DESCRIPTION.

Returns

Return type

None.

geodezyx.files_rw.read_geo_files.read_gfz_trop(trpfile)

This function is reading GFZ troposphere sinex into Pandas DataFrame

Parameters

trpfile (Str) – File name of GFZ troposphere sinex.

Returns

DF – Pandas Dataframe of GFZ troposphere sinex.

Return type

Pandas DataFrame

geodezyx.files_rw.read_geo_files.read_pdm_res_slr_mono(res_file_in, sol='sol')

Read a PDM7 res(idual) file for SLR Validation

Parameters
  • res_file_in (str) – path of the input res file.

  • sol (str or lambda fct) – solution name if it is a lambda fct, it will grab the sol name from the full residual path e.g. : solnam = lambda x: x.split(“/”)[-5][4:]

Returns

DFout – output DataFrame.

Return type

Pandas DataFrame

geodezyx.files_rw.read_geo_files.read_pdm_res_slr_multi(Res_file_list_in, sol='sol')

Read a PDM7 res(idual) file for SLR Validation

Parameters
  • Res_file_list_in (list of str) – List of path of the input res files.

  • sol (str or lambda fct) – solution name if it is a lambda fct, it will grab the sol name from the full residual path e.g. : solnam = lambda x: x.split(“/”)[-5][4:]

Returns

DFout – output DataFrame

Return type

Pandas DataFrame

geodezyx.files_rw.read_geo_files.read_rinex_met(metfile)

This function reads RINEX Meteorological files and convert to Pandas DataFrame

metfile:

Path of RINEX Meteorological file in List/String (e.g. made with glob)

Returns

Meteorological data in DataFrame

Return type

DF

Notes

Written by Chaiyaporn Kitpracha

geodezyx.files_rw.read_geo_files.read_rinex_met_2(metfile)
geodezyx.files_rw.read_geo_files.read_snx_trop(snxfile, dataframe_output=True, version=2)

Read troposphere solutions from Troposphere SINEX

geodezyx.files_rw.read_geo_files.read_sp3(file_path_in, returns_pandas=True, name='', epoch_as_pd_index=False, km_conv_coef=1, skip_null_epoch=True)

Read a SP3 file (GNSS Orbits standard file) and return X,Y,Z coordinates for each satellite and for each epoch

Parameters
  • file_path_in (str) – path of the SP3 file can handle gzip-compressed file (with .gz/.GZ extension)

  • returns_pandas (bool) – if True, return a Pandas DataFrame. if False, return separated lists.

  • name (str) – a manual name for the file

  • epoch_as_pd_index (bool) – if True, the index of the output dataframe contains if False, it contains generic integer indexs

  • km_conv_coef (float) – a conversion coefficient to change the units to get meters : 10**3 to get milimeters : 10**6

  • skip_null_epoch (bool) – Do not write an epoch if all sats are null (filtering)

Returns

  • df (Pandas DataFrame) – if returns_pandas == True

  • epoch_stk , Xstk , Ystk , Zstk , Clkstk (lists) – if returns_pandas == False

geodezyx.files_rw.read_geo_files.read_sp3_header(sp3_in, ac_name_in=None)

Read a SP3 file header and return a Pandas DataFrame with sat. PRNs and sigmas contained in the header

Parameters
  • sp3_in (str or list) –

    path of the SP3 file can handle gzip-compressed file (with .gz/.GZ extension)

    can also handle the sp3 content as a list of strings (useful when read_sp3_header is used as a subfunction of read_sp3)

  • ac_name_in (str) – force the AC name (necessary when read_sp3_header is used as a subfunction of read_sp3)

Returns

Header_DF – 2 columns “sat”, “sigma”

Return type

Pandas DataFrame

Note

More infos about the sigma http://acc.igs.org/orbacc.txt

geodezyx.files_rw.read_geo_files.sinex_bench_antenna_DF_2_disconts(DFantenna_in, stat, return_full=False)
geodezyx.files_rw.read_geo_files.sp3_DataFrame_zero_epoch_filter(DFsp3)

Filter an Orbit DataFrame (from a SP3) by removing the null epochs

Parameters

DFsp3 (DataFrame) – Orbit DataFrame (from a SP3).

Returns

DFsp3_out – Filtered Orbit DataFrame.

Return type

DataFrame

geodezyx.files_rw.read_geo_files.sp3_decimate(file_in, file_out, step=15)

Decimate a SP3 file

Parameters
  • file_in (str) – path of the input SP3 file.

  • file_out (str) – path of the output SP3 file.

  • step (int, optional) – decimation step in minutes. The default is 15.

Returns

file_out – path of the output SP3 file.

Return type

str

geodezyx.files_rw.read_geo_files.stations_in_EPOS_sta_coords_file_mono(coords_file_path)

Gives stations in a EPOS coords. file (YYYY_DDD_sta_coordinates)

Parameters

coords_file_path (str) – path of the EPOS coords. file.

Returns

  • epoch (datetime) – the main mean epoch in the EPOS coords. file.

  • stats_list (list) – list of 4 char station list.

geodezyx.files_rw.read_geo_files.stations_in_coords_file_multi(files_path_list, files_type='sinex')

Gives stations list in a SINEX or EPOS coords. file

Parameters
  • files_path_list (iterable (list)) – path of the SINEX/coords files list (e.g. made with glob).

  • files_type (str, optional) – “sinex” or “EPOS_sta_coords” depending on the type. The default is “sinex”.

Returns

datadico – a dico with stat 4 char. code as key and epoch list as values (for timeline_plotter)

Return type

dict.

geodezyx.files_rw.read_geo_files.stations_in_sinex_mono(sinex_path)

Gives stations list in a SINEX file

Parameters

sinex_path (str) – path of the SINEX file.

Returns

  • epoch (datetime) – the main mean epoch in the SINEX.

  • stats_list (list) – list of 4 char station list.

geodezyx.files_rw.read_geo_files.stations_in_sinex_multi(sinex_path_list)

Gives stations list in a SINEX

Just a wrapper of stations_in_sinex_or_EPOS_sta_coords_file_multi !!! This other function should be used !!!

Args :

sinex_path_list : path of the SINEX files list (e.g. made with glob)

Returns :

datadico : a dico with stat 4 char. code as key and epoch list as values (for timeline_plotter)

geodezyx.files_rw.read_logsheets module

@author: psakic

This sub-module of geodezyx.files_rw contains reading functions to import GNSS logsheets/sitelogs.

it can be imported directly with: from geodezyx import files_rw

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

class geodezyx.files_rw.read_logsheets.Antenna

Bases: geodezyx.files_rw.read_logsheets.Event

ARPSmart()
AntTypSmart()
property Antenna_Radome_Type
class geodezyx.files_rw.read_logsheets.Event

Bases: object

property Date_Installed
property Date_Removed
class geodezyx.files_rw.read_logsheets.Location

Bases: object

export_as_string()
class geodezyx.files_rw.read_logsheets.Reciever

Bases: geodezyx.files_rw.read_logsheets.Event

FirmwareSmart()
class geodezyx.files_rw.read_logsheets.Site

Bases: object

property IERS_DOMES_Number
geodezyx.files_rw.read_logsheets.mono_logsheet_read(logsheet_path, return_lists=False)

Read a sigle LogSheet File to Logsheet block objects

Parameters
  • logsheet_path (str) – Logsheet path.

  • return_lists (Bool, optional) – The default is False. each Logsheet Block object is returned in a list, so each of them can be managed immediatly by write_station_info_from_datalists function

Returns

  • period_lis (List of Period Block Object) – Period description in Period Block Object.

  • sit (Site Block Object) – Site description in Site Block Object.

  • loc (Location Block Object) – Location description in Site Block Object.

geodezyx.files_rw.read_logsheets.multi_logsheet_read(pathin, wildcardin='*log', return_dico=True, legacy_mode=False)

Read multiple logsheets

Parameters
  • pathin (list or str.) – If list: list of the Logsheet paths. If str: path of the directory containing the Logsheets.

  • wildcardin (str, optional) – a wildcard describing the logsheet pattern. used only for pathin in a string path. The default is ‘*log’.

  • return_dico (bool, optional) – If False, returns period_lis_lis , stat_lis , loc_lis this mode is useful for station.info generation The default is True.

  • legacy_mode (bool, optional) – if True, it will return in the dico period_lis_lis , stat_lis , loc_lis else it will return period_lis , stat , loc should not be used anymore The default is False.

Returns

stations_dico – a dictionnary like stations_dico[‘STAT’] = (period_lis_lis, station_lis, loc_lis).

Return type

dict

geodezyx.files_rw.read_logsheets.read_blocks_logsheet(input_file, block_id)

Read a Logsheet Block

Parameters
  • input_file (str) – Logsheet path.

  • block_id (int) – the ID of the wished block. 1. Site Identification of the GNSS Monument 2. Site Location Information 3. GNSS Receiver Information 4. GNSS Antenna Information 5. Surveyed Local Ties 6. Frequency Standard 7. Collocation Information 8. Meteorological Instrumentation etc. etc. …

Returns

ObjList – List of Block Objects. Warning: if the Block contains only one sub-block Then the output is a 1-item List

Return type

List of Block Objects

geodezyx.files_rw.write_geo_files module

@author: psakic

This sub-module of geodezyx.files_rw contains functions to write misc. geodetic data in dedicated files.

it can be imported directly with: from geodezyx import files_rw

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.files_rw.write_geo_files.ine_block_mono(sat, dt_in, extra_intrvl_strt=0.1, extra_intrvl_end=0.4, step=300)

Write an EPOS INE block

geodezyx.files_rw.write_geo_files.sp3_overlap_creator(ac_list, dir_in, dir_out, suffix_out_input=None, overlap_size=7200, force=False, manage_missing_sats='common_sats_only', eliminate_null_sat=True, severe=False, separated_systems_export=False, first_date=None)

Generate an SP3 Orbit file with overlap based on the SP3s of the days before and after

Parameters
  • ac_list (list) – 3-character codes of the ACs.

  • dir_in (str) – where the input sp3 are.

  • dir_out (str) – where the output sp3 will be outputed.

  • suffix_out_input (str, optional) – last char of the 3-char. code. if None, then it is the same as input.

  • overlap_size (int, optional) – Overlapsize. The default is 7200.

  • force (True, optional) – force overwrite. The default is False.

  • manage_missing_sats (str, optional) – ‘exclude’ : generate a file with only the common sat between the 3 days. Thus, exclude the missing sats ‘extrapolate’ : extrapolate the missing sats based on the first/last epoch The default is ‘common_sats_only’.

  • eliminate_null_sat (bool, optional) – eliminate null sat. The default is True.

  • severe (bool, optional) – raise an exception if problem. The default is False.

  • separated_systems_export (bool, optional) – export different sp3 for different system. The default is False.

  • first_date (datetime, optional) – exclude SP3 before this epoch

Returns

Return type

None.

Note

start/end date are not implemented the force option skips existing files

geodezyx.files_rw.write_geo_files.write_clk(DFclk_in, outpath, outname=None, prefix='orb', header='', output_std_values=False)

Write a SP3 Clock file from an Clock DataFrame

Parameters
  • DFclk_in (DataFrame) – Input Clock DataFrame.

  • outpath (str) – The output path of the file (see also outname).

  • outname (None or str, optional) – None = outpath is the full path (directory + filename) of the output. A string = a manual name for the file. ‘auto_old_cnv’ = automatically generate the filename (old convention) ‘auto_new_cnv’ = automatically generate the filename (new convention) The default is None.

  • prefix (str, optional) – the output 3-char. name of the AC. The default is ‘orb’.

  • header (str, optional) – A string describing the clk file header. The default is “”.

  • output_std_values (bool, optional) – Add observation sigmas as the last column. The default is False.

Returns

Return type

The string containing the formatted clock data.

geodezyx.files_rw.write_geo_files.write_epos_sta_coords(DF_in, file_out, sort_wrt='site', no_time_limit_for_first_period=True, no_time_limit_for_last_period=True, soln_in_DF=True)

Write an EPOS coordinate file

Parameters
  • DF_in (DataFrame) – Input Orbit DataFrame.

  • file_out (str) – The output path of the file.

  • sort_wrt (bool, optional) – Sort the values with respect to a DF column. The default is “site”.

  • no_time_limit_for_first_period (bool, optional) – No time limit for the first period. The default is True.

  • no_time_limit_for_last_period (bool, optional) – No time limit for the last period. The default is True.

  • soln_in_DF (bool, optional) – Soln in DF. The default is True.

Returns

Return type

None.

geodezyx.files_rw.write_geo_files.write_ine_dummy_file(Sat_list, dt_in, extra_intrvl_strt=0.1, extra_intrvl_end=0.4, step=300, out_file_path=None)

Write an EPOS INE dummy (empty values) file

geodezyx.files_rw.write_geo_files.write_sndy_light_dat(ts_in, outdir, outprefix)

Not properly implemented

geodezyx.files_rw.write_geo_files.write_sp3(SP3_DF_in, outpath, outname=None, prefix='orb', skip_null_epoch=True, force_format_c=False)

Write a SP3 file from an Orbit DataFrame

Parameters
  • SP3_DF_in (DataFrame) – Input Orbit DataFrame.

  • outpath (str) – The output path of the file (see also outname).

  • outname (None or str, optional) – None = outpath is the full path (directory + filename) of the output. A string = a manual name for the file. ‘auto_old_cnv’ = automatically generate the filename (old convention) ‘auto_new_cnv’ = automatically generate the filename (new convention) The default is None.

  • prefix (str, optional) – the output 3-char. name of the AC. The default is ‘orb’.

  • skip_null_epoch (bool, optional) – Do not write an epoch if all sats are null (filtering). The default is True.

  • force_format_c (bool, optional) – DESCRIPTION. The default is False.

Returns

Return type

The string containing the formatted SP3 data.