slrfield


Nameslrfield JSON
Version 0.2.1 PyPI version JSON
download
home_pagehttps://github.com/lcx366/SLRfield
SummaryA package to handle the SLR(Satellite Laser Ranging) data
upload_time2023-07-16 15:44:27
maintainer
docs_urlNone
authorChunxiao Li
requires_python>=3.8
licenseMIT
keywords slr cpf
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Welcome to the SLRfield package

[![PyPI version shields.io](https://img.shields.io/pypi/v/slrfield.svg)](https://pypi.python.org/pypi/slrfield/) [![PyPI pyversions](https://img.shields.io/pypi/pyversions/slrfield.svg)](https://pypi.python.org/pypi/slrfield/) [![PyPI status](https://img.shields.io/pypi/status/slrfield.svg)](https://pypi.python.org/pypi/slrfield/) [![GitHub contributors](https://img.shields.io/github/contributors/lcx366/SLRfield.svg)](https://GitHub.com/lcx366/SLRfield/graphs/contributors/) [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/lcx366/SLRfield/graphs/commit-activity) [![GitHub license](https://img.shields.io/github/license/lcx366/SLRfield.svg)](https://github.com/lcx366/SLRfield/blob/master/LICENSE) [![Documentation Status](https://readthedocs.org/projects/pystmos/badge/?version=latest)](http://slrfield.readthedocs.io/?badge=latest) [![Build Status](https://travis-ci.org/lcx366/SLRfield.svg?branch=master)](https://travis-ci.org/lcx366/SLRfield)

This package is an archive of scientific routines for data processing related to SLR(Satellite Laser Ranging). 
Currently, operations on SLR data include:

1. Download CPF(Consolidated Prediction Format) ephemeris files automatically from **CDDIS**(Crustal Dynamics Data Information System) or **EDC**(EUROLAS Data Center);
2. Parse the CPF ephemeris files;
3. Predict the positions of targets in topocentric reference frame, and compute the time of flight for laser pulse;
4. Calculate the position of targets in GCRF;

## How to Install

On Linux, macOS and Windows architectures, the binary wheels can be installed using pip by executing one of the following commands:

```
pip install slrfield
pip install slrfield --upgrade # to upgrade a pre-existing installation
```

## How to use

### Download the latest CPF ephemeris files at the current moment

If the ephemeris release center is not provided, the CPF ephemeris files are downloaded from **CDDIS** by default.

#### Download all currently available targets

```python
>>> from slrfield import cpf_download
>>> cpf_dir_cddis,cpf_files_cddis = cpf_download() # From CDDIS by default;
>>> print(cpf_dir,cpf_files)
```

A directory where CPF files are stored, such as *CPF/CDDIS/2020-10-02/*, will be automatically created.

#### Download a set of targets which are specified by user

```python
>>> sat_lists = ['ajisai','lageos1','etalon2','jason3']
>>> cpf_dir_edc,cpf_files_edc = cpf_download(sat_lists,source = 'EDC',keep=False) # From EDC
```

Note: by setting `keep = False`, the cpf files storage directory will be automatically ***emptied*** beforehand.

### Download the latest CPF ephemeris files before a specific date and time

```python
>>> sat_lists = ['starlette','lageos1']
>>> date = '2017-01-01 11:30:00'
>>> cpf_dir_cddis,cpf_files_cddis = cpf_download(sat_lists,date)
```

### Parse the CPF ephemeris files and read the data

Information from the parsed CPF ephemeris files includes the following contents:

- Format
- Format Version
- Ephemeris Source
- Date and time of ephemeris production
- Ephemeris Sequence number
- Target name
- COSPAR ID
- SIC
- NORAD ID
- Starting date and time of ephemeris
- Ending date and time of ephemeris
- Time between table entries (UTC seconds)
- Target type
- Reference frame
- Rotational angle type
- Center of mass correction
- Direction type
- Modified Julian Date
- Second of Day 
- Leap Second
- Time moment in UTC 
- Target positions in meters

#### Parse CPF ephemeris files

```python
>>> from slrfield import CPF
>>> cpf_data_cddis = CPF.from_files(cpf_dir_cddis)
>>> print(cpf_data_cddis.info)
```

### Make predictions w.r.t. a site

The azimuth, altitude, distance of a target w.r.t. a given site, and the time of flight for laser pulse etc. can be easily predicted by calling a method `pred_azalt`. The output prediction files named with target names are generated by default. 

- There are two modes for the prediction. If the mode is set to ***geometric***, then the transmitting direction of the laser will coincide with the receiving direction at a certain moment. In this case, the output prediction file will not contain the difference between the receiving direction and the transmitting direction. If the mode is set to ***apparent***, then the transmitting direction of the laser is inconsistent with the receiving direction at a certain moment. In this case, the output prediction file will contain the difference between the receiving direction and the transmitting direction. The default mode is set to ***apparent***.
- The 10-point(degree 9) Lagrange polynomial interpolation method is used to interpolate the CPF ephemeris.
- Effects of leap second have been considered in the prediction generation.

Coordinates of station can either be ***geocentric***(x, y, z) in meters or ***geodetic***(lon, lat, height) in degrees and meters. The default coordinates type is set to ***geodetic***.

#### For geodetic(lon, lat, height) site coordinates

```python
t_start = '2017-01-02 17:06:40'
t_end = '2017-01-03 09:06:40'
t_increment = 0.5 # second

station = [46.877230,7.465222,951.33] # geodetic(lon, lat, height) coordinates in degrees and meters by default
cpf_data_cddis.pred_azalt(station,t_start,t_end,t_increment)
```

#### For geocentric(x, y, z) site coordinates

```python
t_start = '2017-01-02 17:06:40'
t_end = '2017-01-03 09:06:40'
t_increment = 2 # second

station = [4331283.557, 567549.902,4633140.353] # geocentric(x, y, z) coordinates in meters
cpf_data_cddis.pred_azalt(station,t_start,t_end,t_increment,coord_type = 'geocentric',mode='geometric')
```

### Make predictions in GCRF

The cartesian coordinates of targets in GCRF(Geocentric Celestial Reference Frame) can be easily predicted by calling a method `pred_xyz`.

```python
t_start = '2017-01-02 17:06:40'
t_end = '2017-01-03 09:06:40'
t_increment = 5 # second

cpf_data_cddis.pred_xyz(t_start,t_end,t_increment)
```

## Change log

- **0.2.1 — jul 16, 2023**
  - Added time system for loading/updating the EOP file and Leap Second file from IERS

- **0.2.0 — Feb 24, 2022**
  
  - Added support for calculating the cartesian coordinates of targets in GCRF
  
  - Added support for quickly computing the passing-site prediction 
  
  - Removed the module related to TLE data
  
  - Removed the module related to satellite catalog querying 

- **0.1.17 — Nov 04,  2021**
  
  - Fixed the problem of response failure caused by accessing a large amount of data from discos remote server using API
  - Fixed the problem that requested URL's length exceeds the capacity limit of the space-track server.
  - Change the process printing style of query from static to dynamic with color
  - Added support for orbital eccentricity in celestrak_query and target_query, including options of filtering and sorting
  - Added support for output of standard(intrinsic) magnitudes of targets in target_query

- **0.1.14 — Jun 18,  2021**
  
  Fixed the problem that EOP could not be downloaded normally from IERS.

- **0.1.13 — Jun 05,  2021**
  
  Now you may inject the NORAD IDs of a large number of targets by an input file such as *noradids.txt* to  `target_query`.

- **0.1.11 — Oct 03,  2020**
  
  The CDDIS will discontinue anonymous ftp access to its archive in October 2020, therefore, this package implements the transition from ftp to EARTHDATA for downloading CPF files.

- **0.1.9 — Jul 26,  2020**
  
  Added progress bar for downloading data

- **0.1.5 — Jun 9,  2020**
  
  Expanded the following functions:
  
  - Automatically download TLE/3LE data from [SPACETRACK](https://www.space-track.org)
  - Pick out space targets that meets specific demands from [DISCOS](https://discosweb.esoc.esa.int)(Database and Information System Characterising Objects in Space) and [CELESTRAK](https://celestrak.com) database by setting a series of parameters, such as mass, shape, RCS(Radar Cross Section), and orbit altitude etc.
  - Calculate one-day prediction and multiple-day visible passes for space targets based on TLE/3LE data

- **0.0.2 — Apr 21,  2020**
  
  - The ***slrfield*** package was released.

## Next release

- Add functions to download and parse the CRD(**Consolidated Laser Ranging Data Format**) observations

## Reference

- [Python package for satellite laser ranging file formats](https://github.com/dronir/SLRdata)
- [Consolidated Laser Ranging Prediction Format Version 1.01](https://ilrs.gsfc.nasa.gov/docs/2006/cpf_1.01.pdf)
- [sample code](https://ilrs.gsfc.nasa.gov/docs/2017/cpf_sample_code_v1.01d.tgz) on [ILRS](https://ilrs.gsfc.nasa.gov/data_and_products/formats/cpf.html)
  
  

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/lcx366/SLRfield",
    "name": "slrfield",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "SLR,CPF",
    "author": "Chunxiao Li",
    "author_email": "lcx366@126.com",
    "download_url": "",
    "platform": null,
    "description": "# Welcome to the SLRfield package\n\n[![PyPI version shields.io](https://img.shields.io/pypi/v/slrfield.svg)](https://pypi.python.org/pypi/slrfield/) [![PyPI pyversions](https://img.shields.io/pypi/pyversions/slrfield.svg)](https://pypi.python.org/pypi/slrfield/) [![PyPI status](https://img.shields.io/pypi/status/slrfield.svg)](https://pypi.python.org/pypi/slrfield/) [![GitHub contributors](https://img.shields.io/github/contributors/lcx366/SLRfield.svg)](https://GitHub.com/lcx366/SLRfield/graphs/contributors/) [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/lcx366/SLRfield/graphs/commit-activity) [![GitHub license](https://img.shields.io/github/license/lcx366/SLRfield.svg)](https://github.com/lcx366/SLRfield/blob/master/LICENSE) [![Documentation Status](https://readthedocs.org/projects/pystmos/badge/?version=latest)](http://slrfield.readthedocs.io/?badge=latest) [![Build Status](https://travis-ci.org/lcx366/SLRfield.svg?branch=master)](https://travis-ci.org/lcx366/SLRfield)\n\nThis package is an archive of scientific routines for data processing related to SLR(Satellite Laser Ranging). \nCurrently, operations on SLR data include:\n\n1. Download CPF(Consolidated Prediction Format) ephemeris files automatically from **CDDIS**(Crustal Dynamics Data Information System) or **EDC**(EUROLAS Data Center);\n2. Parse the CPF ephemeris files;\n3. Predict the positions of targets in topocentric reference frame, and compute the time of flight for laser pulse;\n4. Calculate the position of targets in GCRF;\n\n## How to Install\n\nOn Linux, macOS and Windows architectures, the binary wheels can be installed using pip by executing one of the following commands:\n\n```\npip install slrfield\npip install slrfield --upgrade # to upgrade a pre-existing installation\n```\n\n## How to use\n\n### Download the latest CPF ephemeris files at the current moment\n\nIf the ephemeris release center is not provided, the CPF ephemeris files are downloaded from **CDDIS** by default.\n\n#### Download all currently available targets\n\n```python\n>>> from slrfield import cpf_download\n>>> cpf_dir_cddis,cpf_files_cddis = cpf_download() # From CDDIS by default;\n>>> print(cpf_dir,cpf_files)\n```\n\nA directory where CPF files are stored, such as *CPF/CDDIS/2020-10-02/*, will be automatically created.\n\n#### Download a set of targets which are specified by user\n\n```python\n>>> sat_lists = ['ajisai','lageos1','etalon2','jason3']\n>>> cpf_dir_edc,cpf_files_edc = cpf_download(sat_lists,source = 'EDC',keep=False) # From EDC\n```\n\nNote: by setting `keep = False`, the cpf files storage directory will be automatically ***emptied*** beforehand.\n\n### Download the latest CPF ephemeris files before a specific date and time\n\n```python\n>>> sat_lists = ['starlette','lageos1']\n>>> date = '2017-01-01 11:30:00'\n>>> cpf_dir_cddis,cpf_files_cddis = cpf_download(sat_lists,date)\n```\n\n### Parse the CPF ephemeris files and read the data\n\nInformation from the parsed CPF ephemeris files includes the following contents:\n\n- Format\n- Format Version\n- Ephemeris Source\n- Date and time of ephemeris production\n- Ephemeris Sequence number\n- Target name\n- COSPAR ID\n- SIC\n- NORAD ID\n- Starting date and time of ephemeris\n- Ending date and time of ephemeris\n- Time between table entries (UTC seconds)\n- Target type\n- Reference frame\n- Rotational angle type\n- Center of mass correction\n- Direction type\n- Modified Julian Date\n- Second of Day \n- Leap Second\n- Time moment in UTC \n- Target positions in meters\n\n#### Parse CPF ephemeris files\n\n```python\n>>> from slrfield import CPF\n>>> cpf_data_cddis = CPF.from_files(cpf_dir_cddis)\n>>> print(cpf_data_cddis.info)\n```\n\n### Make predictions w.r.t. a site\n\nThe azimuth, altitude, distance of a target w.r.t. a given site, and the time of flight for laser pulse etc. can be easily predicted by calling a method `pred_azalt`. The output prediction files named with target names are generated by default. \n\n- There are two modes for the prediction. If the mode is set to ***geometric***, then the transmitting direction of the laser will coincide with the receiving direction at a certain moment. In this case, the output prediction file will not contain the difference between the receiving direction and the transmitting direction. If the mode is set to ***apparent***, then the transmitting direction of the laser is inconsistent with the receiving direction at a certain moment. In this case, the output prediction file will contain the difference between the receiving direction and the transmitting direction. The default mode is set to ***apparent***.\n- The 10-point(degree 9) Lagrange polynomial interpolation method is used to interpolate the CPF ephemeris.\n- Effects of leap second have been considered in the prediction generation.\n\nCoordinates of station can either be ***geocentric***(x, y, z) in meters or ***geodetic***(lon, lat, height) in degrees and meters. The default coordinates type is set to ***geodetic***.\n\n#### For geodetic(lon, lat, height) site coordinates\n\n```python\nt_start = '2017-01-02 17:06:40'\nt_end = '2017-01-03 09:06:40'\nt_increment = 0.5 # second\n\nstation = [46.877230,7.465222,951.33] # geodetic(lon, lat, height) coordinates in degrees and meters by default\ncpf_data_cddis.pred_azalt(station,t_start,t_end,t_increment)\n```\n\n#### For geocentric(x, y, z) site coordinates\n\n```python\nt_start = '2017-01-02 17:06:40'\nt_end = '2017-01-03 09:06:40'\nt_increment = 2 # second\n\nstation = [4331283.557, 567549.902,4633140.353] # geocentric(x, y, z) coordinates in meters\ncpf_data_cddis.pred_azalt(station,t_start,t_end,t_increment,coord_type = 'geocentric',mode='geometric')\n```\n\n### Make predictions in GCRF\n\nThe cartesian coordinates of targets in GCRF(Geocentric Celestial Reference Frame) can be easily predicted by calling a method `pred_xyz`.\n\n```python\nt_start = '2017-01-02 17:06:40'\nt_end = '2017-01-03 09:06:40'\nt_increment = 5 # second\n\ncpf_data_cddis.pred_xyz(t_start,t_end,t_increment)\n```\n\n## Change log\n\n- **0.2.1 \u2014 jul 16, 2023**\n  - Added time system for loading/updating the EOP file and Leap Second file from IERS\n\n- **0.2.0 \u2014 Feb 24, 2022**\n  \n  - Added support for calculating the cartesian coordinates of targets in GCRF\n  \n  - Added support for quickly computing the passing-site prediction \n  \n  - Removed the module related to TLE data\n  \n  - Removed the module related to satellite catalog querying \n\n- **0.1.17 \u2014 Nov 04,  2021**\n  \n  - Fixed the problem of response failure caused by accessing a large amount of data from discos remote server using API\n  - Fixed the problem that requested URL's length exceeds the capacity limit of the space-track server.\n  - Change the process printing style of query from static to dynamic with color\n  - Added support for orbital eccentricity in celestrak_query and target_query, including options of filtering and sorting\n  - Added support for output of standard(intrinsic) magnitudes of targets in target_query\n\n- **0.1.14 \u2014 Jun 18,  2021**\n  \n  Fixed the problem that EOP could not be downloaded normally from IERS.\n\n- **0.1.13 \u2014 Jun 05,  2021**\n  \n  Now you may inject the NORAD IDs of a large number of targets by an input file such as *noradids.txt* to  `target_query`.\n\n- **0.1.11 \u2014 Oct 03,  2020**\n  \n  The CDDIS will discontinue anonymous ftp access to its archive in October 2020, therefore, this package implements the transition from ftp to EARTHDATA for downloading CPF files.\n\n- **0.1.9 \u2014 Jul 26,  2020**\n  \n  Added progress bar for downloading data\n\n- **0.1.5 \u2014 Jun 9,  2020**\n  \n  Expanded the following functions\uff1a\n  \n  - Automatically download TLE/3LE data from [SPACETRACK](https://www.space-track.org)\n  - Pick out space targets that meets specific demands from [DISCOS](https://discosweb.esoc.esa.int)(Database and Information System Characterising Objects in Space) and [CELESTRAK](https://celestrak.com) database by setting a series of parameters, such as mass, shape, RCS(Radar Cross Section), and orbit altitude etc.\n  - Calculate one-day prediction and multiple-day visible passes for space targets based on TLE/3LE data\n\n- **0.0.2 \u2014 Apr 21,  2020**\n  \n  - The ***slrfield*** package was released.\n\n## Next release\n\n- Add functions to download and parse the CRD(**Consolidated Laser Ranging Data Format**) observations\n\n## Reference\n\n- [Python package for satellite laser ranging file formats](https://github.com/dronir/SLRdata)\n- [Consolidated Laser Ranging Prediction Format Version 1.01](https://ilrs.gsfc.nasa.gov/docs/2006/cpf_1.01.pdf)\n- [sample code](https://ilrs.gsfc.nasa.gov/docs/2017/cpf_sample_code_v1.01d.tgz) on [ILRS](https://ilrs.gsfc.nasa.gov/data_and_products/formats/cpf.html)\n  \n  \n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A package to handle the SLR(Satellite Laser Ranging) data",
    "version": "0.2.1",
    "project_urls": {
        "Homepage": "https://github.com/lcx366/SLRfield"
    },
    "split_keywords": [
        "slr",
        "cpf"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "13d24783922d2566978ea2c36d6c823eae29394824c9062fd32b50b4a286c685",
                "md5": "c192b7dd905a93c5e2dc01f3c930efad",
                "sha256": "6329eb3b6136982c96d97d8b3e51e714efb97d7a92f77a13e5834f99e2ca5b45"
            },
            "downloads": -1,
            "filename": "slrfield-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c192b7dd905a93c5e2dc01f3c930efad",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 19854,
            "upload_time": "2023-07-16T15:44:27",
            "upload_time_iso_8601": "2023-07-16T15:44:27.928867Z",
            "url": "https://files.pythonhosted.org/packages/13/d2/4783922d2566978ea2c36d6c823eae29394824c9062fd32b50b4a286c685/slrfield-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-16 15:44:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lcx366",
    "github_project": "SLRfield",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "slrfield"
}
        
Elapsed time: 0.13099s