Skip to main content

Read, load, and process Mars Climate Sounder data

Project description

mcstools

Tools to read and process Mars Climate Sounder data.

Setup

Setup a virtual environment with python3[>3.10] -m venv env.

Then, either pip install: pip install mcstools

Or download or clone the repo:

$ git clone https://github.com/cloudspotting-on-mars/mcstools

and install with pip install -e .

Download data

See https://pds-atmospheres.nmsu.edu/data_and_services/atmospheres_data/MARS/atmosphere_temp_prof.html

Read a single file

To read in an L1B file as a DataFrame:

from mcstools import L1BReader
reader = L1BReader()
reader.read(path_to_file)

Load Data from PDS

To load data from PDS:

from mcstools import L1BLoader
loader = L1BLoader(pds=True)
loader.load_date_range("2016-01-01", "2016-01-02")

Find and load subset of L2 profiles

from mcstools import L2Loader
loader = L2Loader(pds=True)
ddr1_df = loader.load_date_range("2018-04-18", "2018-04-19", "DDR1")
ddr1_subset = ddr1[ddr1["Profile_lat"].between(-10, 10)]
ddr2 = loader.load("DDR2", profiles=ddr1_subset["Profile_identifier"])

Plot L1B radiances

To view the radiances for a single 4-hour L1B file, run

python mcstools/plotting/l1b_panel.py

That should bring up a dashboard in a browser allowing you to choose a 4-hour file at the top (enter the date in YYMMDDHH0000 format). You can switch between channels using the tabs. The slider on the right allows you to set the colorbar limits (radiance units). There are also tools to zoom in and out, pan, etc.

Preprocess data

To preprocess L1B data and reduce to standard in-track limb views:

from mcstools.preprocess.l1b import L1BStandardInTrack
preprocesser = L1BStandardInTrack()
df = preprocesser.process(df)

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

mcstools-0.1.0.tar.gz (289.5 kB view details)

Uploaded Source

Built Distribution

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

mcstools-0.1.0-py3-none-any.whl (202.8 kB view details)

Uploaded Python 3

File details

Details for the file mcstools-0.1.0.tar.gz.

File metadata

  • Download URL: mcstools-0.1.0.tar.gz
  • Upload date:
  • Size: 289.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.13

File hashes

Hashes for mcstools-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9fdd77c3a5a28230188e00844e94076bae72a0aa2f386f898449d68f94ba6ea1
MD5 cffc8e1570b7bf664f127571410ebd04
BLAKE2b-256 44b36a34485d563da3ff2c5027196f002559b7dbc27242aee7cf421c31b56ced

See more details on using hashes here.

File details

Details for the file mcstools-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mcstools-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 202.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.13

File hashes

Hashes for mcstools-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f10c5d92fb1bf513c3023f5c37f04825ef983ff6306d02101559c8fc0ce7c0da
MD5 0158cce1269c8ac59492cf8c84ebe2e8
BLAKE2b-256 83a7f0744664d277c645a6d84acadc769bc4ada6bbd36dd9b344cef19ae82b03

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