Skip to main content

Code calculating TEC from RINEX information

Project description

ionotec

Python library for Total Electron Content computing from GNSS Rinex files

Requirements

Tested on Python 3.9.2

Installation

pip install ionotec

Known Errors

Incompatible xarray module version with georinex

Georinex has some specific dependencies that we have observed could be broken. In particular latest versions of the "xarray" module are not compatible with georinex and might make the georinex "load" method fail.

A known solution is to force a working version of "xarray":

pip3 install xarray=0.20.1

Other problems

Please report problems you find to install ionotec to sylvain.blunier@gmail.com

Code

Loading module

To load the ionotec module, do:

from ionotec import tec

Defining input data

Computing VTEC requires having the following elements:

  1. A list Rinex observation file This is the file list where the code and phase data will be extracted. The files will be concatenated in the process. They should come in continuous and chronological order. Also important, they should correspond to only one station; a further version will be able to process several stations at a time.
  • Format: List of strings
  • Example: f_obs=["/home/me/ionotec/amtc1200.21o","/home/me/ionotec/amtc1210.21o","/home/me/ionotec/amtc1220.21o"]
  1. List of Rinex navigation files This is the file list from which the positions of the satellites will be extracted, usually using a few well-chosen files, and the positions of all satellites can then be calculated. Of course, they should correspond to the observation periods in the files.
  • Format: List of strings
  • Example: f_nav=["/home/me/ionotec/amtc1201.21n","/home/me/ionotec/amtc1211.21n","/home/me/ionotec/amtc1221.21n"]
  1. File containing satellites DCB, which can be retrieved from https://cddis.nasa.gov/archive/gnss/products/bias/ File containing the bias of satellites corresponding to the month of observation files
  • Format: string pointing to DCB file, only one for the process.
  • Example: f_bias="/home/me/ionotec/CAS0MGXRAP_20203450000_01D_01D_DCB.bsx"

We recommend informing one day before and after the period of interest to avoid border effects.

Computing VTEC

Once these elements are defined, an instance of ionotec can be created:

station_tec = tec.tec(f_obs,f_nav,f_bias)

And VTEC can be computed with default parameters:

station_tec.compute_vtec()

This will create one file in feather format in the same path as the second item of f_obs, or the first one in case f_obs is a one-item list, so in the case of the variables defined upper the files should be found at /home/me/ionotec/amtc121-tec.feather. This will create a folder structure in the same place where the script is run. The tree will look like:

    output/
      |__ stations.csv
      |-- GNSS/
            |- 2020/
                |__ G01.feather
                |__      ...
                |__ R24.feather
            |_ record_processing.csv                
      |-- TEC/
            |- 2020/
                |__ sta1.feather
                |__      ...
                |__ staN.feather
                |__ receiver_bias.csv
  • GNSS contains essentially the GNSS position of the satellites (X,Y,Z) for the timeframes informed in the f_nav list. The purpose of the file record_processing is to keep track of the days that were processed, for each constellation and inform the best time resolution processed so far. This avoids reprocessing.

  • TEC contains the produced TEC information with a naming format XXXX.feather, where XXXX corresponds to the 4 characters labelling the receiver. It will contain the following information:

  • time (string): YYYY-MM-DD HH:mm:ss format

  • sv (string): satellite from which the VTEC is calculated

  • lat (float): latitude of calculated piercing point

  • lon (float): longitude of calculated piercing point

  • elevation (float): elevation of satellite in Radians

  • STEC_slp (float): slant TEC in TEC Units calculated with pseudo range (P1 and C1 in rinex observation files)

  • STEC_sl (float): slant TEC in TEC Units calculated with code phases (L1 and L2 in rinex observation files)

  • VTEC (float): Vertical TEC in TEC Units, corrected with baseline, satellite bias, receiver bias.

The pandas DataFrame of this data can be directly accessed in the instanciated object through: station_tec.df_obs. They can be loaded as posteriori using df_station = pd.read_feather("output/TEC/YYYY/stat.feather")

The file receiver_bias.csv contains the bias information for each processed station.

  • stations.csv contains the information on the position of each processed station (should probably be merged with receiver_bias.csv in the future)

Plots

Quick PNGs of data can be directly produced using the ionotec.graph submodule:

from ionotec import graph

All satellites in one graph

graph.plot_station(station_tec.df_obs)

or 8 satellites per graph in a mosaic fashion

graph.plot_station(station_tec.df_obs,mozaic=True)

These graphs will be generated in output/TEC/Figs/.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ionotec-0.0.14.tar.gz (30.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ionotec-0.0.14-py3-none-any.whl (29.2 kB view details)

Uploaded Python 3

File details

Details for the file ionotec-0.0.14.tar.gz.

File metadata

  • Download URL: ionotec-0.0.14.tar.gz
  • Upload date:
  • Size: 30.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for ionotec-0.0.14.tar.gz
Algorithm Hash digest
SHA256 10563baaa13a820a705eac173b681cd9e2185f0d77f89907027c060ec6daa001
MD5 a0cfe2e0406c224348ce91e2ae8f1870
BLAKE2b-256 0513ae83c008e4c7cd4b233ce499b0981f7fa9a97598559c028a07562a13a1a7

See more details on using hashes here.

File details

Details for the file ionotec-0.0.14-py3-none-any.whl.

File metadata

  • Download URL: ionotec-0.0.14-py3-none-any.whl
  • Upload date:
  • Size: 29.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for ionotec-0.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 c518e03795b310327d0db69741f82a2f9e18486283ebbec0a54fc66802b513f5
MD5 6ff17ad6911b41df2ed7fd56a36f1c55
BLAKE2b-256 c18c233de04b0fee8ee3fbd6c24d05182e760f8a6294f6b851a0440052616b70

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page