Tools to read and process Mars Climate Sounder data.
Download or clone the repo:
$ git clone https://github.com/cloudspotting-on-mars/mcstools
Setup a virtual environment with python3 -m venv env
and install with pip install -e .
See https://pds-atmospheres.nmsu.edu/data_and_services/atmospheres_data/MARS/atmosphere_temp_prof.html
To read in an L1B file as a DataFrame:
from mcstools import L1BReader
reader = L1BReader()
reader.read(path_to_file)
To load data from PDS:
from mcstools import L1BLoader
loader = L1BLoader(pds=True)
loader.load_date_range("2016-01-01", "2016-01-02")
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"])
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.
To preprocess L1B data and reduce to standard in-track limb views:
from mcstools.preprocess.l1b import L1BStandardInTrack
preprocesser = L1BStandardInTrack()
df = preprocesser.process(df)