midgard.parsers

Framework for parsers

Description:

To add a new parser, simply create a new .py-file which defines a class inheriting from parsers.Parser. The class needs to be decorated with the midgard.dev.plugins.register decorator as follows:

from midgard.parsers import parser
from midgard.lib import plugins

@plugins.register
class MyNewParser(parser.Parser):
    ...

To use a parser, you will typically use the parse_file-function defined below

from midgard import parsers
my_new_parser = parsers.parse_file('my_new_parser', 'file_name.txt', ...)
my_data = my_new_parser.as_dict()

The name used in parse_file to call the parser is the name of the module (file) containing the parser.

names()

Full name: midgard.parsers.names

Signature: () -> List[str]

List the names of the available parsers

Returns:

Names of the available parsers

parse_file()

Full name: midgard.parsers.parse_file

Signature: (parser_name:str, file_path:Union[str, pathlib.Path], encoding:Union[str, NoneType]=None, timer_logger:Union[Callable[[str], NoneType], NoneType]=None, use_cache:bool=False, **parser_args:Any) -> midgard.parsers._parser.Parser

Use the given parser on a file and return parsed data

Specify parser_name and file_path to the file that should be parsed. The following parsers are available:

{doc_parser_names}

Data can be retrieved either as Dictionaries, Pandas DataFrames or Midgard Datasets by using one of the methods as_dict, as_dataframe or as_dataset.

Example:

>>> df = parse_file('rinex2_obs', 'ande3160.16o').as_dataframe()  # doctest: +SKIP

Args:

Returns:

midgard.parsers._parser

Basic functionality for parsing datafiles, extended by individual parsers

Description:

This module contains functions and classes for parsing datafiles. It should typically be used by calling parsers.parse_file:

Example:

from midgard import parsers
my_new_parser = parsers.parse_file('my_new_parser', 'file_name.txt', ...)
my_data = my_new_parser.as_dict()

Parser

Full name: midgard.parsers._parser.Parser

Signature: (file_path:Union[str, pathlib.Path], encoding:Union[str, NoneType]=None) -> None

An abstract base class that has basic methods for parsing a datafile

This class provides functionality for parsing a file. You should inherit from one of the specific parsers like for instance ChainParser, LineParser, SinexParser etc

Attributes:

file_path (Path): Path to the datafile that will be read. file_encoding (String): Encoding of the datafile. parser_name (String): Name of the parser (as needed to call parsers.parse_...). data_available (Boolean): Indicator of whether data are available. data (Dict): The (observation) data read from file. meta (Dict): Metainformation read from file.

midgard.parsers._parser_chain

Basic functionality for parsing datafiles line by line

Description:

This module contains functions and classes for parsing datafiles.

Example:

from midgard import parsers
my_new_parser = parsers.parse_file('my_new_parser', 'file_name.txt', ...)
my_data = my_new_parser.as_dict()

ChainParser

Full name: midgard.parsers._parser_chain.ChainParser

Signature: (file_path:Union[str, pathlib.Path], encoding:Union[str, NoneType]=None) -> None

An abstract base class that has basic methods for parsing a datafile

This class provides functionality for parsing a file with chained groups of information. You should inherit from this one, and at least specify the necessary parameters in setup_parser.

ParserDef

Full name: midgard.parsers._parser_chain.ParserDef

Signature: (end_marker:Callable[[str, int, str], bool], label:Callable[[str, int], Any], parser_def:Dict[Any, Dict[str, Any]], skip_line:Union[Callable[[str], bool], NoneType]=None, end_callback:Union[Callable[[Dict[str, Any]], NoneType], NoneType]=None)

A convenience class for defining the necessary fields of a parser

A single parser can read and parse one group of datalines, defined through the ParserDef by specifying how to parse each line (parser_def), how to identify each line (label), how to recognize the end of the group of lines (end_marker) and finally what (if anything) should be done after all lines in a group is read (end_callback).

The end_marker, label, skip_line and end_callback parameters should all be functions with the following signatures:

end_marker   = func(line, line_num, next_line)
label        = func(line, line_num)
skip_line    = func(line)
end_callback = func(cache)

The parser definition parser_def includes the parser, field, strip and delimiter entries. The parser entry points to the parser function and the field entry defines how to separate the line in fields. The separated fields are saved either in a dictionary or in a list. In the last case the line is split on whitespace by default. With the delimiter entry the default definition can be overwritten. Leading and trailing whitespace characters are removed by default before a line is parsed. This default can be overwritten by defining the characters, which should be removed with the 'strip' entry. The parser dictionary is defined like:

parser_def = { <label>: {'fields':    <dict or list of fields>,
                         'parser':    <parser function>,
                         'delimiter': <optional delimiter for splitting line>,
                         'strip':     <optional characters to be removed from beginning and end of line>
             }}

Args:

midgard.parsers._parser_line

Basic functionality for parsing datafiles line by line using Numpy

Description:

This module contains functions and classes for parsing datafiles.

Example:

from midgard import parsers
my_new_parser = parsers.parse_file('my_new_parser', 'file_name.txt', ...)
my_data = my_new_parser.as_dict()

LineParser

Full name: midgard.parsers._parser_line.LineParser

Signature: (file_path:Union[str, pathlib.Path], encoding:Union[str, NoneType]=None) -> None

An abstract base class that has basic methods for parsing a datafile

This class provides functionality for using numpy to parse a file line by line. You should inherit from this one, and at least specify the necessary parameters in setup_parser.

midgard.parsers._parser_rinex

Basic functionality for parsing Rinex files

Description:

This module contains functions and classes for parsing Rinex files.

This file defines the general structure shared by most types of Rinex files, including header information. More specific format details are implemented in subclasses. When calling the parser, you should call the apropriate parser for a given Rinex format.

RinexHeader

Full name: midgard.parsers._parser_rinex.RinexHeader

Signature: (marker:str, fields:Dict[str, Tuple[int, int]], parser:Callable[[Dict[str, str]], Dict[str, Any]])

A convenience class for defining how a Rinex header is parsed

Args:

RinexParser

Full name: midgard.parsers._parser_rinex.RinexParser

Signature: (file_path:Union[str, pathlib.Path], encoding:Union[str, NoneType]=None, logger=<built-in function print>, sampling_rate:Union[int, NoneType]=None, strict:bool=False) -> None

An abstract base class that has basic methods for parsing a datafile

This class provides functionality for reading Rinex header data. You should inherit from this one, and at least implement parse_epochs.

parser_cache()

Full name: midgard.parsers._parser_rinex.parser_cache

Signature: (func:Callable[[_ForwardRef('RinexParser'), Dict[str, str], List[Dict[str, str]]], Dict[str, Any]]) -> Callable[[_ForwardRef('RinexParser'), Dict[str, str]], Dict[str, Any]]

Decorator for adding a cache to parser functions

midgard.parsers._parser_sinex

Basic functionality for parsing Sinex datafiles

Description:

This module contains functions and classes for parsing Sinex datafiles.

References:

SinexBlock

Full name: midgard.parsers._parser_sinex.SinexBlock

Signature: (marker:str, fields:Tuple[midgard.parsers._parser_sinex.SinexField, ...], parser:Callable[[<built-in function array>, Tuple[str, ...]], Dict[str, Any]])

A convenience class for defining a Sinex block

Args:

SinexField

Full name: midgard.parsers._parser_sinex.SinexField

Signature: (name:str, start_col:int, dtype:Union[str, NoneType], converter:Union[str, NoneType]=None)

A convenience class for defining the fields in a Sinex block

Args:

SinexParser

Full name: midgard.parsers._parser_sinex.SinexParser

Signature: (file_path:Union[str, pathlib.Path], encoding:Union[str, NoneType]=None, header:bool=True) -> None

An abstract base class that has basic methods for parsing a Sinex file

This class provides functionality for parsing a sinex file with chained groups of information. You should inherit from this one, and at least specify which Sinex blocks you are interested in by implementing setup_parser, as well as implement methods that parse each block if needed.

parsing_factory()

Full name: midgard.parsers._parser_sinex.parsing_factory

Signature: () -> Callable[..., Dict[str, Any]]

Create a default parsing function for a Sinex block

The default parsing function returns a dictionary containing all fields of the block as separated arrays. This will be stored in self.data['{marker}'] with the {marker} of the current block.

Returns:

Simple parsing function for one Sinex block.

parsing_matrix_factory()

Full name: midgard.parsers._parser_sinex.parsing_matrix_factory

Signature: (marker:str, size_marker:str) -> Callable[..., Dict[str, Any]]

Create a parsing function for parsing a matrix within a Sinex block

The default parsing function converts data to a symmetric matrix and stores it inside self.data[marker].

The size of the matrix is set to equal the number of parameters in the size_marker-block. If that block is not parsed/found. The size is set to the last given row index. If some zero elements in the matrix are omitted this might be wrong.

Args:

Returns:

Simple parsing function for one Sinex block.

midgard.parsers.anubis

A parser for reading Anubis xtr-files

AnubisXtrParser

Full name: midgard.parsers.anubis.AnubisXtrParser

Signature: (file_path:Union[str, pathlib.Path], encoding:Union[str, NoneType]=None) -> None

A parser for reading Anubis XTR files

midgard.parsers.bcecmp_sisre

A parser for reading DLR BCEcmp Software SISRE output files

Example:

from midgard import parsers
p = parsers.parse_file(parser_name='bcecmp_sisre', file_path='BCEcmp_GAL_FNAV_E1E5A_com_2018_032.OUT')
data = p.as_dict()

Description:

Reads data from files in the BCEcmp Software output file format. The BCEcmp Software is developed and used by DLR.

BcecmpParser

Full name: midgard.parsers.bcecmp_sisre.BcecmpParser

Signature: (file_path:Union[str, pathlib.Path], encoding:Union[str, NoneType]=None) -> None

A parser for reading DLR BCEcmp Software output files.

The following data are available after reading BCEcmp Software output file:

Key Description
age_min age of ephemeris in [min]
clk_diff_sys Satellite clock correction difference in [m]
dalong_track Along-track orbit difference in [m]
dcross_track Cross-track orbit difference in [m]
dradial Radial orbit difference in [m]
dradial_wul Worst-user-location (wul) SISRE?
satellite Satellite PRN number together with GNSS identifier (e.g. G07)
sisre Signal-in-space range error [m]
time Observation time
used_iodc GPS: IODC (Clock issue of data indicates changes (set equal to IODE))
QZSS: IODC
used_iode Ephemeris issue of data indicates changes to the broadcast ephemeris:
- GPS: Ephemeris issue of data (IODE), which is set equal to IODC
- Galileo: Issue of Data of the NAV batch (IODnav)
- QZSS: Ephemeris issue of data (IODE)
- BeiDou: Age of Data Ephemeris (AODE)
- IRNSS: Issue of Data, Ephemeris and Clock (IODEC)

and meta-data:

Key Description
__data_path__ File path
__parser_name__ Parser name

midgard.parsers.discontinuities_snx

A parser for reading data from discontinuities.snx in SINEX format

Example:

from midgard import parsers
p = parsers.parse_file(parser_name='discontinuities_snx', file_path='discontinuties.snx')
data = p.as_dict()

Description:

Reads discontinuities of GNSS station timeseries in SINEX format .

DiscontinuitiesSnxParser

Full name: midgard.parsers.discontinuities_snx.DiscontinuitiesSnxParser

Signature: (file_path:Union[str, pathlib.Path], encoding:Union[str, NoneType]=None, header:bool=True) -> None

A parser for reading data from discontinuties.snx file in SINEX format

The solution discontinuity dictionary has as keys the site identifiers and as value the 'solution_discontinuity' entry. The dictionary has following strucuture:

self.data[site] = { 'solution_discontinuity': [] } # SOLUTION/DISCONTINUITY SINEX block information

with the 'solution_discontinuity' dictionary entries

solution_discontinuity[ii] = [ 'point_code': point_code, 'soln': soln, 'obs_code': obs_code, 'start_time': start_time, 'end_time': end_time, 'event_code': event_code, 'description': description ]

The counter 'ii' ranges from 0 to n and depends on how many discontinuities exists for a site. Note also, that time entries (e.g. start_time, end_time) are given as 'datetime'. If the time is defined as 00:000:00000 in the SINEX file, then the value is saved as 'None' in the Sinex class.

midgard.parsers.galileo_constellation_html

A parser for reading Galileo constellation info from a web page

See https://www.gsc-europa.eu/system-status/Constellation-Information for an example

GalileoConstellationHTMLParser

Full name: midgard.parsers.galileo_constellation_html.GalileoConstellationHTMLParser

Signature: (file_path:Union[str, pathlib.Path], encoding:Union[str, NoneType]=None, logger:Union[Callable[[str], NoneType], NoneType]=<built-in function print>, url:Union[str, NoneType]=None) -> None

A parser for reading Galileo constellation info from a web page

See https://www.gsc-europa.eu/system-status/Constellation-Information for an example

midgard.parsers.gipsy_tdp

A parser for reading NASA JPL Gipsy time dependent parameter (TDP) file

Example:

from midgard import parsers
p = parsers.parse_file(parser_name='gipsy_tdp', file_path='final.tdp')
data = p.as_dict()

Description:

Reads data from files in Gipsy time dependent parameter (TDP) format.

GipsyTdpParser

Full name: midgard.parsers.gipsy_tdp.GipsyTdpParser

Signature: (file_path:Union[str, pathlib.Path], encoding:Union[str, NoneType]=None) -> None

A parser for reading Gipsy time dependent parameter (TDP) file

Following data are available after reading Gipsy TDP output file:

Key Description
apriori_value Nominal value. This field contains the last value used by the model.
name Parameter name.
sigma The sigma associated with the value of the parameter. A negative value indicates it
should be used for interpolation by the file reader read_time_variation in
$GOA/libsrc/time_variation. If no sigmas are computed by the smapper, a 1.0 will be
placed here.
time_past_j2000 Time given in GPS seconds past J2000.
value Accumulated value of the parameter at time and includes any nominal, or iterative
correction. This is the only entry used by the model.

and meta-data:

Key Description
__data_path__ File path
__parser_name__ Parser name

midgard.parsers.gnss_antex

A parser for reading ANTEX format 1.4 data

Example:

from midgard import parsers
p = parsers.parse_file(parser_name='gnss_antex', file_path='igs14.atx')
data = p.as_dict()

Description:

Reads data from files in the GNSS Antenna Exchange (ANTEX) file format version 1.4 (see :cite:antex).

AntexParser

Full name: midgard.parsers.gnss_antex.AntexParser

Signature: (file_path:Union[str, pathlib.Path], encoding:Union[str, NoneType]=None) -> None

A parser for reading ANTEX file

The parser reads GNSS ANTEX format 1.4 (see :cite:antex).

The 'data' attribute is a dictionary with GNSS satellite PRN or receiver antenna as key. The GNSS satellite antenna corrections are time dependent and saved with "valid from" datetime object entry. The dictionary looks like:

dout = { <prn> : { <valid from>: { cospar_id:   <value>,
                                   sat_code:    <value>,
                                   sat_type:    <value>,
                                   valid_until: <value>,
                                   azimuth:     <list with azimuth values>,
                                   elevation:   <list with elevation values>,
                                   <frequency>: { azi: [<list with azimuth-elevation dependent corrections>],
                                                  neu: [north, east, up],
                                                  noazi: [<list with elevation dependent corrections>] }}},

         <receiver antenna> : { azimuth:     <list with azimuth values>,
                                elevation:   <list with elevation values>,
                                <frequency>: { azi: [<array with azimuth-elevation dependent corrections>],
                                               neu: [north, east, up],
                                               noazi: [<list with elevation dependent corrections>] }}}

with following entries:

Value Type Description
azi numpy.ndarray Array with azimuth-elevation dependent antenna correction in [mm] with
the shape: number of azimuth values x number of elevation values.
azimuth numpy.ndarray List with azimuth values in [rad] corresponding to antenna corrections
given in azi.
cospar_id str COSPAR ID : yyyy -> year when the satellite was put in
orbit, xxx -> sequential satellite number for that year, a -> alpha
numeric sequence number within a launch
elevation numpy.ndarray List with elevation values in [rad] corresponding to antenna
corrections given in azi or noazi.
str Frequency identifier (e.g. G01 - GPS L1)
neu list North, East and Up eccentricities in [m]. The eccentricities of the
mean antenna phase center is given relative to the antenna reference
point (ARP) for receiver antennas or to the center of mass of the
satellite in X-, Y- and Z-direction.
noazi numpy.ndarray List with elevation dependent (non-azimuth-dependent) antenna
correction in [mm].
str Satellite code e.g. GPS PRN, GLONASS slot or Galileo SVID number
str Receiver antenna name together with radome code
sat_code str Satellite code e.g. GPS SVN, GLONASS number or Galileo GSAT number
sat_type str Satellite type (e.g. BLOCK IIA)
valid_from datetime.datetime Start of validity period of satellite in GPS time
valid_until datetime.datetime End of validity period of satellite in GPS time

The 'meta' attribute is a dictionary with following entries:

Value Type Description
comment list Header commments given in list line by line
pcv_type str Phase center variation type
ref_antenna str Reference antenna type for relative antenna
ref_serial_num str Serial number of the reference antenna
sat_sys str Satellite system
version str Format version

Attributes:

midgard.parsers.gnss_sinex_igs

A parser for reading data from igs.snx file based on IGS sitelog files in SINEX format

Example:

from midgard import parsers
p = parsers.parse_file(parser_name='gnss_sinex_igs', file_path='igs.snx')
data = p.as_dict()

Description:

Reads station information (e.g. approximated station coordinates, receiver and antenna type, station eccentricities, ...) igs.snx file in SINEX format.

IgsSnxParser

Full name: midgard.parsers.gnss_sinex_igs.IgsSnxParser

Signature: (file_path:Union[str, pathlib.Path], encoding:Union[str, NoneType]=None, header:bool=True) -> None

A parser for reading data from igs.snx file based on IGS sitelog files in SINEX format

site - Site dictionary, whereby keys are the site identifiers and values are a site entry dictionary with the keys 'site_antenna', 'site_eccentricity', 'site_id' and 'site_receiver'. The site dictionary has following strucuture:

      self.site[site] = { 'site_antenna':          [],  # SITE/ANTENNA SINEX block information
                          'site_eccentricity':     [],  # SITE/ECCENTRICITY block information
                          'site_id':               {},  # SITE/ID block information
                          'site_receiver':         [],  # SITE/RECEIVER block information }

   with the site entry dictionary entries

      site_antenna[ii]      = { 'point_code':         point_code,
                                'soln':               soln,
                                'obs_code':           obs_code,
                                'start_time':         start_time,
                                'end_time':           end_time,
                                'antenna_type':       antenna_type,
                                'radome_type':        radome_type,
                                'serial_number':      serial_number }

      site_eccentricity[ii] = { 'point_code':         point_code,
                                'soln':               soln,
                                'obs_code':           obs_code,
                                'start_time':         start_time,
                                'end_time':           end_time,
                                'reference_system':   reference_system,
                                'vector_1':           vector_1,
                                'vector_2':           vector_2,
                                'vector_3':           vector_3,
                                'vector_type':        UNE }

      site_id               = { 'point_code':         point_code,
                                'domes':              domes,
                                'marker':             marker,
                                'obs_code':           obs_code,
                                'description':        description,
                                'approx_lon':         approx_lon,
                                'approx_lat':         approx_lat,
                                'approx_height':      approx_height }

      site_receiver[ii]     = { 'point_code':         point_code,
                                'soln':               soln,
                                'obs_code':           obs_code,
                                'start_time':         start_time,
                                'end_time':           end_time,
                                'receiver_type':      receiver_type,
                                'serial_number':      serial_number,
                                'firmware':           firmware }

   The counter 'ii' ranges from 0 to n and depends on how many antenna type, receiver type and
   antenna monument changes were done at each site. Note also, that time entries (e.g. start_time,
   end_time) are given in Modified Julian Date. If the time is defined as 00:000:00000 in the SINEX
   file, then the value is saved as 'None' in the Sinex class.

midgard.parsers.rinex2_nav_header

RINEX navigation header classes for file format version 2.xx

Rinex2NavHeaderMixin

Full name: midgard.parsers.rinex2_nav_header.Rinex2NavHeaderMixin

Signature: ()

A mixin defining which RINEX navigation headers are mandatory and optional in RINEX version 2.xx

Rinex2NavHeaderParser

Full name: midgard.parsers.rinex2_nav_header.Rinex2NavHeaderParser

Signature: (file_path:Union[str, pathlib.Path], encoding:Union[str, NoneType]=None, logger=<built-in function print>, sampling_rate:Union[int, NoneType]=None, strict:bool=False) -> None

A parser for reading just the RINEX version 2.xx navigation header

The data in the rinex file will not be parsed.

midgard.parsers.rinex2_obs_header

RINEX observation header classes for file format version 3.xx

Rinex2ObsHeaderMixin

Full name: midgard.parsers.rinex2_obs_header.Rinex2ObsHeaderMixin

Signature: ()

A mixin defining which RINEX observation headers are mandatory and optional in RINEX version 2.xx

Rinex2ObsHeaderParser

Full name: midgard.parsers.rinex2_obs_header.Rinex2ObsHeaderParser

Signature: (file_path:Union[str, pathlib.Path], encoding:Union[str, NoneType]=None, logger=<built-in function print>, sampling_rate:Union[int, NoneType]=None, strict:bool=False) -> None

A parser for reading just the RINEX version 2.xx observation header

The data in the rinex file will not be parsed.

midgard.parsers.rinex3_clk

A parser for reading RINEX clock files with version 3.xx

Rinex3ClkParser

Full name: midgard.parsers.rinex3_clk.Rinex3ClkParser

Signature: (file_path:Union[str, pathlib.Path], encoding:Union[str, NoneType]=None, logger=<built-in function print>, sampling_rate:Union[int, NoneType]=None, strict:bool=False) -> None

A parser for reading RINEX clock files with version 3.xx

midgard.parsers.rinex3_clk_header

RINEX clock header classes for file format version 3.xx

Rinex3ClkHeaderMixin

Full name: midgard.parsers.rinex3_clk_header.Rinex3ClkHeaderMixin

Signature: ()

A mixin defining which RINEX clock headers are mandatory and optional in RINEX version 3.xx

Rinex3ClkHeaderParser

Full name: midgard.parsers.rinex3_clk_header.Rinex3ClkHeaderParser

Signature: (file_path:Union[str, pathlib.Path], encoding:Union[str, NoneType]=None, logger=<built-in function print>, sampling_rate:Union[int, NoneType]=None, strict:bool=False) -> None

A parser for reading just the RINEX version 3.xx clock header

The data in the rinex file will not be parsed.

midgard.parsers.rinex3_nav_header

RINEX navigation header classes for file format version 3.xx

Rinex3NavHeaderMixin

Full name: midgard.parsers.rinex3_nav_header.Rinex3NavHeaderMixin

Signature: ()

A mixin defining which RINEX navigation headers are mandatory and optional in RINEX version 3.xx

Rinex3NavHeaderParser

Full name: midgard.parsers.rinex3_nav_header.Rinex3NavHeaderParser

Signature: (file_path:Union[str, pathlib.Path], encoding:Union[str, NoneType]=None, logger=<built-in function print>, sampling_rate:Union[int, NoneType]=None, strict:bool=False) -> None

A parser for reading just the RINEX version 3.xx navigation header

The data in the rinex file will not be parsed.

midgard.parsers.rinex3_obs_header

RINEX observation header classes for file format version 3.xx

Rinex3ObsHeaderMixin

Full name: midgard.parsers.rinex3_obs_header.Rinex3ObsHeaderMixin

Signature: ()

A mixin defining which RINEX observation headers are mandatory and optional in RINEX version 3.xx

Rinex3ObsHeaderParser

Full name: midgard.parsers.rinex3_obs_header.Rinex3ObsHeaderParser

Signature: (file_path:Union[str, pathlib.Path], encoding:Union[str, NoneType]=None, logger=<built-in function print>, sampling_rate:Union[int, NoneType]=None, strict:bool=False) -> None

A parser for reading just the RINEX version 3.xx observation header

The data in the rinex file will not be parsed.

midgard.parsers.terrapos_position

A parser for reading Terrapos position output file

Example:

from midgard import parsers
p = parsers.parse_file(parser_name='terrapos_position', file_path='Gal_C1X_brdc_land_30sec_24hrs_FNAV-file.txt')
data = p.as_dict()

Description:

Reads data from files in Terrapos position output format.

TerraposPositionParser

Full name: midgard.parsers.terrapos_position.TerraposPositionParser

Signature: (file_path:Union[str, pathlib.Path], encoding:Union[str, NoneType]=None) -> None

A parser for reading Terrapos position output file

Following data are available after reading Terrapos position file:

Key Description
gpsweek GPS week
gpssec Seconds of GPS week
head Head in [deg]
height Ellipsoidal height in [m]
lat Latitude in [deg]
lon Longitude in [deg]
num_sat Number of satellites
pdop Position Dilution of Precision (PDOP)
pitch Pitch in [deg]
reliability_east East position external reliability in [m] #TODO: Is that correct?
reliability_height Height position external reliability in [m] #TODO: Is that correct?
reliability_north North position external reliability in [m] #TODO: Is that correct?
roll Roll in [deg]
sigma_east Standard deviation of East position in [m] #TODO: Is that correct?
sigma_height Standard deviation of Height position in [m] #TODO: Is that correct?
sigma_north Standard deviation of North position in [m] #TODO: Is that correct?

and meta-data:

Key Description
__data_path__ File path
__parser_name__ Parser name

midgard.parsers.terrapos_residual

A parser for reading Terrapos residual file

Example:

from midgard import parsers
p = parsers.parse_file(parser_name='terrapos_residual', file_path='PPP-residuals.txt')
data = p.as_dict()

Description:

Reads data from files in Terrapos residual format.

TerraposResidualParser

Full name: midgard.parsers.terrapos_residual.TerraposResidualParser

Signature: (file_path:Union[str, pathlib.Path], encoding:Union[str, NoneType]=None) -> None

A parser for reading Terrapos residual file

Following data are available after reading Terrapos residual file:

Parameter Description
azimuth Azimuth of satellites in [deg]
elevation Elevation of satellites in [deg]
gpsweek GPS week
gpssec Seconds of GPS week
residual_code Code (pseudorange) residuals in [m]
residual_doppler Doppler residuals in [m]
residual_phase Carrier-phase residuals in [m]
satellite Satellite PRN number together with GNSS identifier (e.g. G07)
system GNSS identifier

and meta-data:

Key Description
__data_path__ File path
__parser_name__ Parser name

midgard.parsers.timeseries_env

A parser for reading timeseries files in ENV format

Example:

from midgard import parsers
p = parsers.parse_file(parser_name='timeseries_env', file_path='stas.env')
data = p.as_dict()

Description:

Reads data from files timeseries files in ENV (east, north, vertical) format

TimeseriesEnvParser

Full name: midgard.parsers.timeseries_env.TimeseriesEnvParser

Signature: (file_path:Union[str, pathlib.Path], encoding:Union[str, NoneType]=None) -> None

A parser for reading timeseries files in ENV format

Following data are available after reading timeseries ENV file:

Key Description
date Date in format yyMMMdd (e.g. 18MAY10).
year Date in unit year.
east East coordinate in [mm].
east_sigma Standard devication of east coordinate in [mm].
north North coordinate in [mm].
north_sigma Standard devication of north coordinate in [mm].
vertical Vertical coordinate in [mm].
vertical_sigma Standard devication of vertical coordinate in [mm].

and meta-data:

Key Description
__data_path__ File path
__params__ np.genfromtxt parameters
__parser_name__ Parser name

midgard.parsers.vlbi_source_names

A parser for reading IVS source names translation table

VlbiSourceNamesParser

Full name: midgard.parsers.vlbi_source_names.VlbiSourceNamesParser

Signature: (file_path:Union[str, pathlib.Path], encoding:Union[str, NoneType]=None) -> None

A parser for reading IVS source names translation table

See https://vlbi.gsfc.nasa.gov/output for an example of a IVS source name file

midgard.parsers.wip_rinex

A parser for reading Rinex files

rinex()

Full name: midgard.parsers.wip_rinex.rinex

Signature: (**parser_args:Any) -> midgard.parsers._parser_rinex.RinexParser

Dispatch to correct subclass based on Rinex file type

midgard.parsers.wip_rinex2_nav

A parser for reading RINEX navigation files with version 2.xx

Rinex2NavParser

Full name: midgard.parsers.wip_rinex2_nav.Rinex2NavParser

Signature: (file_path:Union[str, pathlib.Path], encoding:Union[str, NoneType]=None, logger=<built-in function print>, sampling_rate:Union[int, NoneType]=None, strict:bool=False) -> None

A parser for reading RINEX navigation files with version 2.xx

midgard.parsers.wip_rinex2_obs

A parser for reading RINEX observation files with version 2.xx

Rinex2ObsParser

Full name: midgard.parsers.wip_rinex2_obs.Rinex2ObsParser

Signature: (file_path:Union[str, pathlib.Path], encoding:Union[str, NoneType]=None, logger=<built-in function print>, sampling_rate:Union[int, NoneType]=None, strict:bool=False) -> None

A parser for reading RINEX observation files with version 2.xx

midgard.parsers.wip_rinex3_nav

A parser for reading RINEX navigation files with version 3.xx

Rinex3NavParser

Full name: midgard.parsers.wip_rinex3_nav.Rinex3NavParser

Signature: (file_path:Union[str, pathlib.Path], encoding:Union[str, NoneType]=None, logger=<built-in function print>, sampling_rate:Union[int, NoneType]=None, strict:bool=False) -> None

A parser for reading RINEX navigation files with version 3.xx

midgard.parsers.wip_rinex3_obs

A parser for reading RINEX observation files with version 3.xx

Rinex3ObsParser

Full name: midgard.parsers.wip_rinex3_obs.Rinex3ObsParser

Signature: (file_path:Union[str, pathlib.Path], encoding:Union[str, NoneType]=None, logger=<built-in function print>, sampling_rate:Union[int, NoneType]=None, strict:bool=False) -> None

A parser for reading RINEX observation files with version 3.xx

midgard.parsers.wip_rinex_clk

A parser for reading Rinex navigation files

RinexClkParser

Full name: midgard.parsers.wip_rinex_clk.RinexClkParser

Signature: (file_path:Union[str, pathlib.Path], encoding:Union[str, NoneType]=None, logger=<built-in function print>, sampling_rate:Union[int, NoneType]=None, strict:bool=False) -> None

Class for defining common methods for RINEX clock parsers.

rinex_clk()

Full name: midgard.parsers.wip_rinex_clk.rinex_clk

Signature: (**parser_args:Any) -> midgard.parsers._parser_rinex.RinexParser

Dispatch to correct subclass based on version in Rinex file

midgard.parsers.wip_rinex_nav

A parser for reading Rinex navigation files

RinexNavParser

Full name: midgard.parsers.wip_rinex_nav.RinexNavParser

Signature: (file_path:Union[str, pathlib.Path], encoding:Union[str, NoneType]=None, logger=<built-in function print>, sampling_rate:Union[int, NoneType]=None, strict:bool=False) -> None

Class for defining common methods for RINEX navigation parsers.

rinex_nav()

Full name: midgard.parsers.wip_rinex_nav.rinex_nav

Signature: (**parser_args:Any) -> midgard.parsers._parser_rinex.RinexParser

Dispatch to correct subclass based on version in Rinex file

midgard.parsers.wip_rinex_obs

A parser for reading Rinex observation files

RinexObsParser

Full name: midgard.parsers.wip_rinex_obs.RinexObsParser

Signature: (file_path:Union[str, pathlib.Path], encoding:Union[str, NoneType]=None, logger=<built-in function print>, sampling_rate:Union[int, NoneType]=None, strict:bool=False) -> None

Class for defining common methods for RINEX observation parsers.

rinex_obs()

Full name: midgard.parsers.wip_rinex_obs.rinex_obs

Signature: (**parser_args:Any) -> midgard.parsers._parser_rinex.RinexParser

Dispatch to correct subclass based on version in Rinex file