Skip to main content

Toolset for working with CYGNSS data and downloading CYGNSS data from PODAC

Project description

CYGNSS Library

CYGNSS Library is a Python package for working with CYGNSS data.

Installation

you can install it using pip

$ pip install -U -i https://test.pypi.org/simple/ cygnsslib

or you can clone the repository and install it using the following command

pip install .  

You can then remove the local copy if you wish. Alternatively, if you wish to be able to make changes to your local copy without having to reinstall the package for the changes to take effect (e.g., for development purposes), you can use the following instead:

pip uninstall cygnsslib

To use it with anaconda, install the environment as follows:

conda create -n cygnss  
source activate cygnss  
conda install -c conda-forge python matplotlib simplejson numpy netcdf4 geographiclib lxml setuptools  

How to use the code

Example usage: You can see some examples in the testing folder, also the code below

import cygnsslib 
import os

cygnss_l1_dir = os.environ["CYGNSS_L1_PATH"]  # Default path 

cygnsslib.write_sp_from_kml(cygnss_l1_dir, year=[2019], daylist=[50,51,52], in_kml='salar_poly.kml', out_root='salar_sp',
 thresh_ddm_snr=-9999., thresh_noise=3, out_options=None)
cygnsslib.plot_brcs(cygnss_l1_dir,year=2018,day=52,sc_num=7,ch_num=1,samp_num=38789,tag_png="salar",tag_title="Salar")

To download CYGNSS data see the following example

from getpass import getpass
import cygnsslib
import datetime as dt
import numpy as np
import os


# Download data in the same year and range of days
data_day = np.arange(5, 10)
data_year = 2020
# sc_num = [3]
sc_num = None  # Will download all the 8 spacecrafts 
re_download = False
cyg_data_ver = 'v2.1'
cygnss_l1_path = os.environ["CYGNSS_L1_PATH"]
cygnsslib.download_cyg_files(data_year, data_day, list_sc_num=sc_num, cyg_data_ver=cyg_data_ver,
                   cyg_data_lvl='L1', cygnss_l1_path=cygnss_l1_path, re_download=re_download)

# Downloading data between two dates (including end date)
st_date = dt.date(year=2019, month=1, day=12)
end_date = dt.date(year=2020, month=1, day=3)

cygnsslib.download_cyg_files_between_date(st_date, end_date, list_sc_num=sc_num, cyg_data_ver=cyg_data_ver,
                                cyg_data_lvl='L1', cygnss_l1_path=cygnss_l1_path, re_download=re_download)

where

  • CYGNSS Level 1 data are available in PPODAAC
  • salar_poly.kml file can be generated by drawing a polygon in Google Earth Pro (e.g., inside the Salar de Uyuni in Bolivia) and saving as a KML file.

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

cygnsslib-1.1.6.tar.gz (27.3 kB view details)

Uploaded Source

Built Distribution

cygnsslib-1.1.6-py3-none-any.whl (31.9 kB view details)

Uploaded Python 3

File details

Details for the file cygnsslib-1.1.6.tar.gz.

File metadata

  • Download URL: cygnsslib-1.1.6.tar.gz
  • Upload date:
  • Size: 27.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20210108 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.6

File hashes

Hashes for cygnsslib-1.1.6.tar.gz
Algorithm Hash digest
SHA256 7280cad03d5ff3078a083aa6a1cb0221f19e7b433528955f42c76a2f6aa07265
MD5 03de9dd77aa443d926c3b6f91fbde7bc
BLAKE2b-256 a895732f265abe2460081e06c21364cca009ac1470ad9c3e4caba21a002fc7f9

See more details on using hashes here.

File details

Details for the file cygnsslib-1.1.6-py3-none-any.whl.

File metadata

  • Download URL: cygnsslib-1.1.6-py3-none-any.whl
  • Upload date:
  • Size: 31.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20210108 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.6

File hashes

Hashes for cygnsslib-1.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 2a1a9cf8e979f85c1b846be66ac521652c23c39f971cc9b89257dd8710304ee0
MD5 2e79be48fa893acd5b6e082234c6da0f
BLAKE2b-256 60c48be3f7c1909360f5c840fce54def5113e83f9f8b59e8c78c12cbd13aa392

See more details on using hashes here.

Supported by

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