pydar

A Python package to access, download, view, and manipulate Cassini RADAR images in one place

https://github.com/unaschneck/pydar

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.3%) to scientific vocabulary

Keywords

astronomy cassini flyby jpl matplotlib nasa observational-data open-science pds planetary planetary-data-system planetary-science python radar titan

Keywords from Contributors

river
Last synced: 4 months ago · JSON representation ·

Repository

A Python package to access, download, view, and manipulate Cassini RADAR images in one place

Basic Info
  • Host: GitHub
  • Owner: unaschneck
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 19.7 MB
Statistics
  • Stars: 8
  • Watchers: 1
  • Forks: 1
  • Open Issues: 0
  • Releases: 15
Topics
astronomy cassini flyby jpl matplotlib nasa observational-data open-science pds planetary planetary-data-system planetary-science python radar titan
Created almost 3 years ago · Last pushed 6 months ago
Metadata Files
Readme License Citation

README.md

PYDAR

PyPi license repo-status NSF-2141064 PyPi-Versions update-dynamic-csv-data-files pytests codecov

A Python package to access, download, view, and manipulate Cassini RADAR images in one place

  • Find relevant flyby observation numbers/IDs based on a feature name, range of latitude/longitudes (or specific latitude/longitude), or a time range (or specific time)
    • idsfromfeature_name()
    • idsfromlatlon()
    • idsfromlatlon_range()
    • featuresfromlatlon()
    • featuresfromlatlon_range()
    • idsfromtime()
    • idsfromtime_range()
  • Use flyby observation numbers/IDs to retrieve flyby observation data (.FMT, .TAB, .LBL, .IMG) from SBDR and BIDR data files by default
    • idtoobservation()
    • observationtoid()
    • extractflybyimages()
  • Access specific observation data from AAREADME and .LBL readme information
    • aareadme_options()
    • read_aareadme()
    • lbl_options()
    • readlblreadme()
  • Display PDS image retrieved for flyby observation
    • displayallimages()

[!Note] This is Beta quality software that is being actively developed, use at your own risk. This project is not supported or endorsed by either JPL, NASA, or NCAR. The code is provided “as is”, use at your own risk.

Install

PyPi pip install at pypi.org/project/pydar/

pip install pydar

Quickstart: PYDAR

Cassini-Huygens was an orbiter around Saturn and its moons, originally launched in 1997. Cassini ran successfully for years before it was purposefully burned up in Saturn's upper atmosphere to avoid potential contamination of Saturn's moons . As the orbiter passed over Titan in dozens of flybys gigabits of data were recorded and sent back

All Cassini data for Titan is organized and retrieved based on flyby observation numbers or ID numbers. Pydar makes it easy to find and view relevant flybys based on a time range, latitude/longitude position, or a feature name

python import pydar feature_name_example = "ontario lacus" flyby_ids = pydar.ids_from_feature_name(feature_name=feature_name_example) Returns a dictionary of flyby IDs (and their relevant segments) that Ontario Lacus could be found from: {'T7': ['S01'], 'T36': ['S03'], 'T39': ['S06', 'S05', 'S01', 'S04'], 'T48': ['S04'], 'T49': ['S01'], 'T50': ['S02'], 'T55': ['S01', 'S03'], 'T56': ['S01'], 'T57': ['S01', 'S02'], 'T58': ['S01'], 'T59': ['S01'], 'T65': ['S04', 'S01', 'S05', 'S02', 'S03'], 'T71': ['S01'], 'T95': ['S03'], 'T98': ['S01', 'S04']}

The relevant data files can be downloaded for any combination of these flyby IDs and segment numbers. For example, flyby ID 'T65' and segment 'S01' at resolution 'D' for 8 pixels/degree ```

Extract Flyby Data Files to pydar_results/ directory

pydar.extractflybyimages(flybyid='T65', resolution='D', segmentnum="S01") ```

[!Important] extractflybyimages() only needs to be run once for each flyby to retrieve new data but will take some time to download ```

Display all Images in pydar_results/ directory

pydar.displayallimages(imagedirectory="pydarresults/CORADR0211V03S01") ```

<img src="https://raw.githubusercontent.com/unaschneck/pydar/main/assets/ontarioexample_output.png" />

Overview and Background

For information on Cassini instrument specifics and acronyms refer to the Cassini Radar User Guide

The Cassini Radar data can be found at the PDS Imaging Node. The directory is organized by PDS standards. The file format are defined in the Small Body Node. The radar echo is stored originally as floating points in LBDR files. The SAR processors turn the LBDR files into BIDR image. The BIDR data is organized as follows: Cassini RADAR Information (CORADR_xxxx_Vxx) where xxxx is the radar data take number and Vxx is the data version number |_ AAREADME.txt Information about observation xxxx (xxxx > 0035 for Titan flybys) |_CALIB/ |_CATALOG/ BIDRDS.CAT: Information about the BIDR dataset |_DATA/ | |_BIDR/ | |_ BIbcdeefggg_Dhhh_Tiii_Vnn.LBL: header information for observation < -------- MAIN DATA OF INTEREST'S LABEL | |_ BIbcdeefggg_Dhhh_Tiii_Vnn.ZIP: IMG file compressed in zip file < -------- MAIN DATA OF INTEREST | | | b = Kind and bit-type of data | | | F = Primary dataset (incidence- | | | angle-corrected sigma0) in | | | 32-bit floating-point format | | | (linear scale, not dB) | | | B = Primary dataset in unsigned | | | byte format (dB, normalized | | | to [0, 255]) | | | U = Sigma0 without incidence angle | | | correction in 32-bit floating- | | | point format (linear scale, | | | not dB) | | | E = Incidence angle map, 32-bit | | | floating-point values in degrees | | | T = Latitude map, 32-bit floating- | | | point values in degrees | | | N = Longitude map, 32-bit floating- | | | point values in degrees | | | M = Beam mask map, 8-bit unsigned | | | byte values | | | L = Number of looks map, 32-bit | | | integer values | | | D = standard deviations of Synthetic Aperture Radar | | | (SAR) normalized backscatter cross-section noise | | | subtracted values w/o incidence angle correction. | | | The values are physical scale (not in dB) | | | S = Synthetic Aperture Radar (SAR) normalized backscatter cross-section values | | | physical scale (not in dB) and have not been corrected for incidence-angle effects. | | | Biases due to thermal and quantization noise have been removed. | | | X = Noise equivalent sigma-0 values associated with Synthetic Aperture Radar (SAR) | | | normalized backscatter cross-section noise subtracted values w/o incidence angle | | | correction. The values are physical scale (not in dB)." | | | c = Map projection | | | Q = Oblique cylindrical | | | d = Map resolution | | | B = 2 pixels/degree | | | D = 8 pixels/degree | | | F = 32 pixels/degree | | | G = 64 pixels/degree | | | H = 128 pixels/degree | | | I = 256 pixels/degree | | | ee = Absolute value of latitude at | | | center of file, rounded to | | | nearest degree | | | f = Hemisphere of center of file | | | N = Northern | | | S = Southern | | | ggg = West longitude at center of | | | file, rounded to nearest degree | | | hhh = 3-digit data take ID | | | (observation counter) from which | | | data are included, left-padded | | | with zeroes as needed | | | iii = 3-digit index of Titan flyby | | | from which data are included, | | | left-padded with zeroes as | | | needed. (Note: the index | | | for the "Ta" flyby is "00A") |_______ |________ | ____________________ nn = 2-digit version number | |_DOCUMENT/ |_ERRATA.txt |_EXTRAS/ |_BIbcdeefggg_Dhhh_Tiii_Vnn.JPG: jpg of IMG files in DATA |_INDEX/ |_SOFTWARE/ |_VOLDESC.CAT <--- VERSION INFORMATION LISTED HERE ('VOLUME_VERSION_ID' = "Version 1", "Version 2", "Version 3") and in filename .IMG files can be viewed using the planetary images library or via pydar.display_all_images()

Download Time

Download time for data files vary when using pydar.extract_flyby_images() and depends on the number and size of files of interest. On average, most single feature downloads take between 1-5 minutes to download, but can be longer for higher resolution files.

image (Cassini Radar Volume SIS, Version 2.1 Table 1, pg. 3)

Cross-Reference Table for Observations and Flybys

The Titan flyby IDs (e.g. 'T65') are not used in the naming convention for the CORADR filenames. Instead, all files are referred to by their observation number (e.g. '0211'). The Titan flyby information is contained in the BIDR filenames and in the VOLDESC.CAT under 'Description' and can be found using the following cross-reference table: cassini_flyby.csv

To convert between a Titan Flyby ID and an observation number use either pydar.id_to_observation(flyby_id) or pydar.observation_to_id(flyby_observation_num)

Observation Information as Filename

The data filename contains a lot of information about the observation

(EXAMPLE) Filename: "BIBQD05S184D065T008S03_V03"

  • BI = BIDR data
  • B = data in dB normalized
  • Q = oblique cylindrical
  • D = 8 pixels/degree
  • 05 = absolute value of latitude at center rounded to nearest degree
  • S = hemisphere of center of file (Southern)
  • 184 = West longitude at center of file rounded to nearest degree
  • D065 = 2-digit data take ID aka observation counter with left-padded zeros
  • T008 = 3-digit Titan flyby with left-padding
  • S03 = 2-digit segment number (00-99)
  • V03 = 2-digit version number (01-99)

Image file from BIBQD05S184D065T008S03_V03.JPG:

BIFQI10S251_D065_T008S01_V03

Volume Version of Data

Some passes have multiple versions of the data, up to 3 different versions currently.

  • Version 1 (V01) was the first archived version of the data and assumed Titan had zero obliquity, which resulted in misregistration between passes
  • Version 2 (V02) used a Titan spin model that reduced misregistration error
  • Version 3 (V03) used a long-term, accurate spin model for Titan along with other improvements

Only some Titan passes produced all of the version numbers.

  • TA-T25 : V01, V02, V03

  • $\gt$ T28: V02, V03

  • T108-T126: labeled only once as V02 but is actually V03

The version number is listed in the filename and in VOLDESC.CAT under the 'VOLUMEVERSIONID'

Example:

Version 1 is named BIFQI48N071D035T00A_V01.IMG

Version 2 is named BIFQI49N071D035T00AS01_V02.IMG

Version 3 is named BIFQI49N071D035T00AS01_V03.IMG

[!Important] Version 3 is currently the latest and preferred version and will be the version included when downloaded

Segment Number of Data

A single flyby can produce multiple image segments (Sxx). S01 is the primary imaging segment with other segments referring to periods in the flyby when the instrument went to/from altimetry/SAR/HiSAR or weird pointing profiles.

image Credit: Cassini Radar User Guide (Wall et al. 2019, pg.16)

Backend Data Files

Dynamically Updated Backend Files

Pydar includes multiple scripts to web scrape from relevant URLs to generate some of the backend data files

Changes in the relevant URLs are checked once a month via Github Actions to keep csv files up to date and any changes found will be bundled into the subsequent release

coradrjploptions.csv

Contains all the CORADR IDs and available data types from planetarydata.jpl.nasa.gov/img/data/cassini/cassini_orbiter/

Headers: ["CORADR ID", "Is a Titan Flyby", "Contains ABDR", "Contains ASUM", "Contains BIDR", "Contains LBDR", "Contains SBDR", "Contains STDR"]

View data file: coradrjploptions.csv

swathcoveragebytimeposition.csv

Contains all the information for .LBL files within all CORADR ID pages (for each segment and resolution file)

Collected from URLs matching: https://planetarydata.jpl.nasa.gov/img/data/cassini/cassini_orbiter/[CORADAR_ID]/DATA/BIDR/

Headers: ["CORADR ID", "FLYBY ID", "SEGMENT NUMBER", "FILENAME", "DATE TYPE SYMBOL", "DATE TYPE", "RESOLUTION (pixels/degrees)", "TARGETNAME", "MAXIMUMLATITUDE (Degrees)", "MINIMUMLATITUDE (Degrees)", "EASTERNMOSTLONGITUDE (Degrees)", "WESTERNMOSTLONGITUDE (Degrees)", "STARTTIME", "STOP_TIME"]

View data file: swathcoveragebytimeposition.csv

featurenamedetails.csv

Contains all named features on Titan with their furthest latitude/longitude position and URL where information was collected from

Collected from the planetarynames.wr.usgs.gov

Headers: ["Feature Name", "Northmost Latitude", "Southmost Latitude", "Eastmost Longitude", "Westmost Longitude", "Center Latitude", "Center Longitude", "URL"]

View data file: featurenamedetails.csv

Static Data Files

cassini_flyby.csv

Reference for converting between a Titan Flyby ID (e.g. "T7") and its Observation Number (e.g. "059") (and back)

Headers: ["Titan flyby id", "Radar Data Take Number", "Sequence number", "Orbit Number/ID"]

View data file: cassini_flyby.csv

sarswathdetails.csv

Currently unused, but will potentially be used in the future for incidence angle, polarization, azimuth, SAR range resolution, SAR azimuth resolution, and number of looks

Converted to a static csv file from the Cassini User Guide (pg. 136-139)

View data file: sarswathdetails.csv

BIDR and SBDR Files

[!Warning] "CORADR0048", "CORADR0186", "CORADR0189", "CORADR0209", "CORADR_0234" do not have associated BIDR values.

[!Caution] There are data gaps and problems from the original downlinking and satellite location

CORADR_0048 (T4) did not have SAR data, only scatterometry and radiometry because of telemetry reasons in the handbook

CORADR_0186 (T52) only have radiometry and compressed scatterometry

CORADR_0189 (T53) only has radiometry and compressed scatterometry because of what appears to be a downlink problem

CORADR_0209 (T63) only has scatterometry and radiometry

CORADR_0234 (T80) only has scatterometry and radiometry

Coming Soon: SBDR Files

Total width of the RADAR swath is created by combining the five individual sub-swaths, where the center beam is the highest gain image (The Cassini Huygens Mission: Orbiter Remote Sensing Observation 2004)

SBDR column descriptions

Retrieve Data from CASSINI Function Calls

To collect flyby information and images for the latitude/longitude range of a named feature on Titan

idsfromfeature_name()

Retrieve a list of flyby IDs with their associated segment numbers based on a feature name from Titan

python ids_from_feature_name(feature_name=None) * [REQUIRED] feature_name (string): Feature name on Titan, not case-sensitive

Feature names are retrieved from featurenamedetails.csv (if the feature has both latitude/longitude coordinates)

List of Valid Feature Names (Click to view all)
['Aaru', 'Abaya Lacus', 'Adiri', 'Afekan', 'Akmena Lacus', 'Albano Lacus', 'Anbus Labyrinthus', 'Angmar Montes', 'Annecy Lacus', 'Antilia Faculae', 'Apanohuaya Flumen', 'Ara Fluctus', 'Arala Lacus', 'Arnar Sinus', 'Arrakis Planitia', 'Arwen Colles', 'Atacama Lacuna', 'Atitlán Lacus', 'Aura Undae', 'Avacha Sinus', 'Aztlan', 'Bacab Virgae', 'Baffin Sinus', 'Balaton Lacus', 'Bayta Fretum', 'Bazaruto Facula', 'Beag', 'Belet', 'Bermoothes Insula', 'Bilbo Colles', 'Bimini Insula', 'Bolsena Lacus', 'Boni Sinus', 'Boreas Undae', 'Bralgu Insulae', 'Brienz Lacus', 'Buada Lacus', 'Buyan Insula', 'Buzzell Planitia', 'Caladan Planitia', 'Cardiel Lacus', 'Cayuga Lacus', 'Celadon Flumina', 'Cerknica Lacuna', 'Chapala Lacus', 'Chilwa Lacus', 'Ching-tu', 'Chusuk Planitia', 'Coats Facula', 'Concordia Regio', 'Corrin Labyrinthus', 'Crete Facula', 'Crveno Lacus', 'Dem Lacus', 'Dilmun', 'Dilolo Lacus', 'Dingle Sinus', 'Dolmed Montes', 'Doom Mons', 'Dridzis Lacus', 'Ecaz Labyrinthus', 'Echoriath Montes', 'Eir Macula', 'Elba Facula', 'Elivagar Flumina', 'Elpis Macula', 'Enriquillo Lacus', 'Erebor Mons', 'Eurus Undae', 'Eyre Lacuna', 'Fagaloa Sinus', 'Faramir Colles', 'Feia Lacus', 'Fena Lacus', 'Fensal', 'Flensborg Sinus', 'Fogo Lacus', 'Forseti', 'Freeman Lacus', 'Fundy Sinus', 'Gabes Sinus', 'Gammu Labyrinthus', 'Gamont Labyrinthus', 'Gandalf Colles', 'Ganesa Macula', 'Gansireed Labyrinthus', 'Garotman Terra', 'Gatun Lacus', 'Genetaska Macula', 'Genova Sinus', 'Giedi Planitia', 'Gihon Flumen', 'Ginaz Labyrinthus', 'Gram Montes', 'Grasmere Lacus', 'Grumman Labyrinthus', 'Guabonito', 'Hagal Planitia', 'Hammar Lacus', 'Handir Colles', 'Hano', 'Hardin Fretum', 'Harmonthep Labyrinthus', 'Hawaiki Insulae', 'Hetpet Regio', 'Hlawga Lacus', 'Hobal Virga', 'Hotei Arcus', 'Hotei Regio', 'Hubur Flumen', 'Hufaidh Insulae', 'Huygens Landing Site', 'Ihi', 'Ihotry Lacus', 'Imogene Lacus', 'Ipyr Labyrinthus', 'Irensaga Montes', 'Jerid Lacuna', 'Jingpo Lacus', 'Junction Labyrinthus', 'Junín Lacus', 'Kaitain Labyrinthus', 'Kalseru Virga', 'Karakul Lacus', 'Karesos Flumen', 'Kayangan Lacus', 'Kerguelen Facula', 'Kivu Lacus', 'Koitere Lacus', 'Kokytos Flumina', 'Kraken Mare', 'Krocylea Insulae', 'Kronin Labyrinthus', 'Ksa', 'Kumbaru Sinus', 'Kutch Lacuna', 'Ladoga Lacus', 'Lagdo Lacus', 'Lampadas Labyrinthus', 'Lanao Lacus', 'Lankiveil Labyrinthus', 'Leilah Fluctus', 'Lernaeus Labyrinthus', 'Letas Lacus', 'Ligeia Mare', 'Lithui Montes', 'Logtak Lacus', 'Luin Montes', 'Lulworth Sinus', 'Mackay Lacus', 'Maizuru Sinus', 'Manza Sinus', 'Maracaibo Lacus', 'Mayda Insula', 'Melrhir Lacuna', 'Menrva', 'Merlock Montes', 'Meropis Insula', 'Mezzoramia', 'Mindanao Facula', 'Mindolluin Montes', 'Misty Montes', 'Mithrim Montes', 'Mohini Fluctus', 'Momoy', 'Montego Sinus', 'Moray Sinus', 'Moria Montes', 'Muritan Labyrinthus', 'Muzhwi Lacus', 'Mweru Lacus', 'Mystis', 'Müggel Lacus', 'Mývatn Lacus', 'Nakuru Lacuna', 'Naraj Labyrinthus', 'Nath', 'Neagh Lacus', 'Negra Lacus', 'Ngami Lacuna', 'Nicobar Faculae', 'Nicoya Sinus', 'Nimloth Colles', 'Niushe Labyrinthus', 'Notus Undae', 'Oahu Facula', 'Ochumare Regio', 'Ohrid Lacus', 'Okahu Sinus', 'Olomega Lacus', 'Omacatl Macula', 'Oneida Lacus', 'Onogoro Insula', 'Ontario Lacus', 'Orog Lacuna', 'Paititi Terra', 'Palma Labyrinthus', 'Patos Sinus', 'Paxsi', 'Penglai Insula', 'Perkunas Virgae', 'Phewa Lacus', 'Pielinen Lacus', 'Planctae Insulae', 'Polaznik Macula', 'Polelya Macula', 'Poritrin Planitia', 'Prespa Lacus', 'Puget Sinus', 'Punga Mare', 'Qinghai Lacus', 'Quilotoa Lacus', 'Quivira', 'Racetrack Lacuna', 'Rannoch Lacus', 'Rerir Montes', 'Richese Labyrinthus', 'Robino Lacus', 'Roca Lacus', 'Rohe Fluctus', 'Rombaken Sinus', 'Romo Planitia', 'Rossak Planitia', 'Royllo Insula', 'Rukwa Lacus', 'Rwegura Lacus', 'Saldanha Sinus', 'Salusa Labyrinthus', 'Sambation Flumina', 'Santorini Facula', 'Saraswati Flumen', 'Sarygamysh Lacus', 'Seldon Fretum', 'Selk', 'Senkyo', 'Sevan Lacus', 'Shangri-La', 'Shikoku Facula', 'Shiwanni Virgae', 'Shoji Lacus', 'Sikun Labyrinthus', 'Sinlap', 'Sionascaig Lacus', 'Skelton Sinus', 'Soi', 'Sotonera Lacus', 'Sotra Patera', 'Sparrow Lacus', 'Suwa Lacus', 'Synevyr Lacus', 'Taniquetil Montes', 'Tasmania Facula', 'Taupo Lacus', 'Tengiz Lacus', 'Texel Facula', 'Tibi Lacus', 'Tishtrya Virgae', 'Tlaloc Virgae', 'Tleilax Labyrinthus', 'Toba Lacus', 'Tollan Terra', 'Tortola Facula', 'Totak Lacus', 'Towada Lacus', 'Trevize Fretum', 'Trichonida Lacus', 'Trold Sinus', 'Tsegihi', 'Tsiipiya Terra', 'Tsomgo Lacus', 'Tui Regio', 'Tumaco Sinus', 'Tunu Sinus', 'Tupile Labyrinthus', 'Uanui Virgae', 'Urmia Lacus', 'Uvs Lacus', 'Uyuni Lacuna', 'Vaca Lacus', 'Van Lacus', 'Veles', 'Veliko Lacuna', 'Vid Flumina', 'Viedma Lacus', 'Vis Facula', 'Vänern Lacus', 'Waikare Lacus', 'Wakasa Sinus', 'Walvis Sinus', 'Weija Lacus', 'Winia Fluctus', 'Winnipeg Lacus', 'Woytchugga Lacuna', 'Xanadu', 'Xanthus Flumen', 'Xolotlán Lacus', 'Xuttah Planitia', 'Yalaing Terra', 'Yessey Lacus', 'Yojoa Lacus', 'Ypoa Lacus', 'Zaza Lacus', 'Zephyrus Undae', 'Zub Lacus']

python import pydar pydar.ids_from_feature_name(feature_name="Ontario Lacus") Output = {'T7': ['S01'], 'T36': ['S03'], 'T39': ['S06', 'S05', 'S01', 'S04'], 'T48': ['S04'], 'T49': ['S01'], 'T50': ['S02'], 'T55': ['S01', 'S03'], 'T56': ['S01'], 'T57': ['S01', 'S02'], 'T58': ['S01'], 'T59': ['S01'], 'T65': ['S04', 'S01', 'S05', 'S02', 'S03'], 'T71': ['S01'], 'T95': ['S03'], 'T98': ['S01', 'S04']}

idsfromlatlon()

Retrieve a list of flyby IDs with their associated segments based on specific latitude and longitude

python ids_from_latlon(latitude=None, longitude=None) * [REQUIRED] latitude (float/int): Latitude (in degrees), range from -90° to 90° * [REQUIRED] longitude (float/int): Longitude (in degrees), range from 0° to 360°

python import pydar pydar.ids_from_latlon(latitude=-80, longitude=170) Output = {'T39': ['S06', 'S05', 'S01'], 'T49': ['S01'], 'T50': ['S02'], 'T55': ['S03'], 'T56': ['S01'], 'T57': ['S01'], 'T58': ['S01'], 'T59': ['S01'], 'T65': ['S01'], 'T95': ['S03'], 'T98': ['S01', 'S04']}

idsfromlatlon_range()

Retrieve a list of flyby IDs with their associated segments based on range of latitudes and longitudes

python ids_from_latlon_range(min_latitude=None, max_latitude=None, min_longitude=None, max_longitude=None) * [REQUIRED] minlatitude (float/int): Latitude (in degrees) where minlatitude must be greater than or equal to the maxlatitude, range from -90° to 90° * [REQUIRED] maxlatitude (float/int): Latitude (in degrees) where maxlatitude must be less than or equal to the minlatitude, range from -90° to 90° * [REQUIRED] minlongitude (float/int): Longitude (in degrees) where minlongitude must be less than or equal to the maxlongitude, range from 0° to 360° * [REQUIRED] maxlongitude (float/int): Longitude (in degrees) where maxlongitude be greater than or equal to the minlongitude, range from 0° to 360°

python import pydar pydar.ids_from_latlon_range(min_latitude=-82, max_latitude=-72, min_longitude=183, max_longitude=185) Output = {'T7': ['S01'], 'T36': ['S03'], 'T39': ['S06', 'S05', 'S01', 'S04'], 'T48': ['S04'], 'T49': ['S01'], 'T50': ['S02'], 'T55': ['S01', 'S03'], 'T56': ['S01'], 'T57': ['S01', 'S02'], 'T58': ['S01'], 'T59': ['S01'], 'T65': ['S04', 'S01', 'S05', 'S02', 'S03'], 'T71': ['S01'], 'T95': ['S03'], 'T98': ['S01', 'S04']}

featuresfromlatlon()

Return a list of features found at a specific latitude/longitude position

features_from_latlon(latitude=None, longitude=None) * [REQUIRED] latitude (float/int): Latitude (in degrees), range from -90° to 90° * [REQUIRED] longitude (float/int): Longitude (in degrees), range from 0° to 360°

python import pydar pydar.features_from_latlon(latitude=-72, longitude=183)

Output = ['Ontario Lacus', 'Rossak Planitia']

featuresfromlatlon_range()

Return a list of features found at a range of latitude/longitude positions

features_from_latlon_range(min_latitude=None, max_latitude=None, min_longitude=None, max_longitude=None) * [REQUIRED] minlatitude (float/int): Latitude (in degrees) where minlatitude must be less than or equal to the maxlatitude, range from -90° to 90° * [REQUIRED] maxlatitude (float/int): Latitude (in degrees) where maxlatitude must be greater than or equal to the minlatitude, range from -90° to 90° * [REQUIRED] minlongitude (float/int): Longitude (in degrees) where minlongitude must be less than or equal to the maxlongitude, range from 0° to 360° * [REQUIRED] maxlongitude (float/int): Longitude (in degrees) where maxlongitude must be greater than or equal to the minlongitude, range from 0° to 360°

python import pydar pydar.features_from_latlon_range(min_latitude=-82, max_latitude=-72, min_longitude=183, max_longitude=190) Output = ['Crveno Lacus', 'Ontario Lacus', 'Romo Planitia', 'Rossak Planitia', 'Saraswati Flumen']

idsfromtime()

Retrieve a dictionary of flyby IDs and segment numbers based on a specific timestamp

ids_from_time(year=None, doy=None, hour=None, minute=None, second=None, millisecond=None) * [REQUIRED] year (int): Year for observation, range from 2004 to 2014 * [REQUIRED] doy (int): Day of the year, from 0 to 365 (where January 10 = 10) (Note: 'doy' not 'day' for days of the year) * [OPTIONAL] hour (int): Hour, from 0 to 23 in UTC, defaults to 0 when undefined * [OPTIONAL] minute (int): Minute, from 0 to 59, defaults to check the all minutes when undefined * [OPTIONAL] second (int): Second, from 0 to 59, defaults to check the all seconds when undefined * [OPTIONAL] millisecond (int): Millisecond, from 0 to 999, defaults to check all milliseconds when undefined

Where 2004 year, 300 doy, 15 hour, 30 minute, 7 second, 789 millisecond becomes 2004-300T15:30:07.789

python import pydar pydar.ids_from_time(year=2004, doy=300, hour=15, minute=30, second=7, millisecond=789) Output = {'Ta': ['S01']}

If hour, minute, second, or millisecond is left undefined, will search the entire range for all possible values and can find more possible ids

For a single day, some flybys have segments that are defined in one large range, but not within a smaller range

python import pydar pydar.ids_from_time(year=2005, doy=301) Output for the entire day of 301 = {'T8': ['S02', 'S03', 'S01']}

python import pydar pydar.ids_from_time(year=2005, doy=301, hour=3) Output for the day 301 but just for hour 3 = {'T8': ['S03', 'S01']} (does not include S02)

idsfromtime_range()

Retrieve a dictionary of flyby IDs and segment numbers based on a start and end datetime

ids_from_time_range(start_year=None, start_doy=None, start_hour=None, start_minute=None, start_second=None, start_millisecond=None, end_year=None, end_doy=None, end_hour=None, end_minute=None, end_second=None, end_millisecond=None)

  • [REQUIRED] startyear (int): Year for observation, range from 2004 to 2014, startyear must be less than/equal to end_year
  • [REQUIRED] endyear (int): Year for observation, range from 2004 to 2014, endyear must be greater than/equal to start_year
  • [REQUIRED] startdoy (int): Day of the year, from 0 to 365 (where January 10 = 10) (Note: 'doy' not 'day' for days of the year), startdoy must be less than/equal to end_doy
  • [REQUIRED] enddoy (int): Day of the year, from 0 to 365 (where January 10 = 10) (Note: 'doy' not 'day' for days of the year), enddoy must be less than/equal to start_doy
  • [OPTIONAL] starthour (int): Hour, from 0 to 23 in UTC, defaults to check all hours when undefined, starthour must be less than/equal to end_hour
  • [OPTIONAL] endhour (int): Hour, from 0 to 23 in UTC, defaults to check all hours when undefined, endhour must be less than/equal to start_hour
  • [OPTIONAL] startminute (int): Minute, from 0 to 59, defaults to check all minutes when undefined, startminute must be less than/equal to end_minute
  • [OPTIONAL] endminute (int): Minute, from 0 to 59, defaults to check all minutes when undefined, endminute must be greater than/equal to start_minute
  • [OPTIONAL] startsecond (int): Second, from 0 to 59, defaults to check all seconds when undefined, startsecond must be less than/equal to end_second
  • [OPTIONAL] endsecond (int): Second, from 0 to 59, defaults to check all seconds when undefined, endsecond must be greater than/equal to start_second
  • [OPTIONAL] startmillisecond (int): Milliscond, from 0 to 999, defaults to check all milliseconds when undefined, startmillisecond must be less than/equal to end_millisecond
  • [OPTIONAL] endmillisecond (int): Milliscond, from 0 to 999, defaults to check all milliseconds when undefined, endmillisecond must be greater than/equal to start_millisecond

python import pydar pydar.ids_from_time_range(start_year=2004, start_doy=299, start_hour=2, start_minute=15, start_second=23, start_millisecond=987, end_year=2005, end_doy=301, end_hour=2, end_minute=15, end_second=23, end_millisecond=987) Output = {'Ta': ['S01'], 'T3': ['S01'], 'T7': ['S01']}

idtoobservation()

Converts a Titan Flyby ID (for example: 'T65') to an observation number with front padding ('T65' -> '0211')

python id_to_observation(flyby_id) * [REQUIRED] flyby_id (string): a valid flyby ID with prefix 'T'

python import pydar observation_number = id_to_observation(flyby_id='T65') Output = 0211

Observation number based on the 'Radar Data Take Number' in the cassini_flyby.csv data file with front padding to ensure that all observation numbers are 4 digits long (0065 and 0211)

observationtoid()

Converts a Titan Observation Number (for example: '211' or '0211') to an flyby id ('0211' -> 'T65')

python observation_to_id(flyby_observation_num) * [REQUIRED] flybyobservationnum (string): a valid observation number

python import pydar flyby_id = pydar.observation_to_id(flyby_observation_num='211') Output = T65

Flyby ids are based on the 'Radar Data Take Number' in the cassini_flyby.csv data file with front padding of 'T'

Requires each Titan flyby ID to be a valid flyby ID in cassini_flyby.csv

extractflybyimages()

Downloads flyby data SBDR for a selected flyby observation number or flyby id: .FMT and .TAB files (for example: SBDR.FMT and SBDR15D087_V03.TAB)

Downloads flyby data BIDR for a selected flyby observation number or flyby id: .LBL and .ZIP files (for example: BIBQH80N051D087T016S01_V03.LBL and BIBQH80N051D087T016S01_V03.ZIP)

extract_flyby_images(flyby_observation_num=None, flyby_id=None, segment_num=None, additional_data_types_to_download=[], resolution='I', top_x_resolutions=None) Either a flybyid (for example: 'T65') or a flybyobservation_num (for example: '0035') is required.

[!Note] A flyby_id will be translated into a flyby_observation_number to access on the backend and the results will be saved under the observation number. For example, 'T65' will become observation number '0211'

  • [REQUIRED/OPTIONAL] flybyobservationnum (string): required if flyby_id not included
  • [REQUIRED/OPTIONAL] flybyid (string): required if flybyobservation_num not included
  • [REQUIRED] segment_num (string): a flyby includes multiple image segments (SXX) where S01 is the primary imaging segment
  • [OPTIONAL] resolution (String): resolution options "B", "D", "F", "H", or "I" (2, 8, 32, 128, 256 pixels/degree), defaults to highest resolution 'I'
  • [OPTIONAL] topxresolutions: Save the top x resolution types (5 total resolutions), will override any default resolution string
  • [OPTIONAL] additionaldatatypestodownload (List of Strings): Possible options "ABDR", "ASUM", "BIDR", "LBDR", "SBDR", "STDR"

python import pydar pydar.extract_flyby_images(flyby_id='T65', resolution='D', segment_num="S01")

extract_flyby_images() will retrieve images from PDS website and saves results in a directory labeled 'pydarresults' with the flyby observation number, version number, and segment number in the title (for example `pydarresults/CORADR0065V03_S01`). Download time depends on file and resolution size but ranges from 1-5 minutes

read_aareadme()

Print AAREADME.TXT to console for viewing

read_aareadme(coradr_results_directory=None, section_to_print=None, print_to_console=True)

  • [REQUIRED] coradrresultsdirectory (string): CORADAR results folder downloaded (example: "pydarresults/CORADR0211V03S01/")
  • [OPTIONAL] sectiontoprint (string): Specify a section to print to console from the AAREADME, defaults to print the entire AAREADME.TXT, not case-sensitive
  • [OPTIONAL] printtoconsole (boolean): Print to console, defaults to true, otherwise function will return output as a string

To see a list of all sectiontoprint options, see: aareadme_options()

python import pydar pydar.read_aareadme(coradr_results_directory="pydar_results/CORADR_0065_V03_S01", section_to_print="Volume") Output = Volume CORADR_0065: Titan Flyby T8, Sequence S15, Oct 27, 2005 python import pydar pydar.aareadme_options()

Output = ['PDS_VERSION_ID', 'RECORD_TYPE', 'INSTRUMENT_HOST_NAME', 'INSTRUMENT_NAME', 'PUBLICATION_DATE', 'NOTE', 'END_OBJECT', 'Volume', 'Introduction', 'Disk Format', 'File Formats', 'Volume Contents', 'Recommended DVD Drives and Driver Software', 'Errata and Disclaimer', 'Version Status', 'Contact Information']

readlblreadme()

Print .LBL README to console for viewing

read_lbl_readme(coradr_results_directory=None, section_to_print=None, print_to_console=True)

  • [REQUIRED] coradrresultsdirectory (string):
  • [OPTIONAL] sectiontoprint (string): Specify a section to print to console from the AAREADME, defaults to print the entire AAREADME.TXT, not case-sensitive
  • [OPTIONAL] printtoconsole (boolean): Print to console, defaults to true, otherwise function will return output as a string

To see a list of all sectiontoprint options, see: lbl_options()

python import pydar pydar.read_lbl_readme(coradr_results_directory="pydar_results/CORADR_0035_S01/", section_to_print="OBLIQUE_PROJ_X_AXIS_VECTOR") Output = (0.13498322,0.00221225,-0.99084542) python import pydar pydar.lbl_options()

Line-By-Line Options (Click to view all)
['PDSVERSIONID', 'DATASETID', 'DATASETNAME', 'PRODUCERINSTITUTIONNAME', 'PRODUCERID', 'PRODUCERFULLNAME', 'PRODUCTID', 'PRODUCTVERSIONID', 'INSTRUMENTHOSTNAME', 'INSTRUMENTHOSTID', 'INSTRUMENTNAME', 'INSTRUMENTID', 'TARGETNAME', 'STARTTIME', 'STOPTIME', 'SPACECRAFTCLOCKSTARTCOUNT', 'SPACECRAFTCLOCKSTOPCOUNT', 'PRODUCTCREATIONTIME', 'SOURCEPRODUCTID', 'MISSIONPHASENAME', 'MISSIONNAME', 'SOFTWAREVERSIONID', 'FILENAME COMPRESSED', 'RECORDTYPE COMPRESSED', 'ENCODINGTYPE', 'INTERCHANGEFORMAT', 'UNCOMPRESSEDFILENAME', 'REQUIREDSTORAGEBYTES', '^DESCRIPTION', 'FILENAME UNCOMPRESSED', 'RECORDTYPE UNCOMPRESSED', 'RECORDBYTES', 'FILERECORDS', 'LABELRECORDS', '^IMAGE', 'LINES', 'LINESAMPLES', 'SAMPLETYPE', 'SAMPLEBITS', 'CHECKSUM', 'SCALINGFACTOR', 'OFFSET', 'MISSINGCONSTANT', 'NOTE', '^DATASETMAPPROJECTION', 'MAPPROJECTIONTYPE', 'FIRSTSTANDARDPARALLEL', 'SECONDSTANDARDPARALLEL', 'AAXISRADIUS', 'BAXISRADIUS', 'CAXISRADIUS', 'POSITIVELONGITUDEDIRECTION', 'CENTERLATITUDE', 'CENTERLONGITUDE', 'REFERENCELATITUDE', 'REFERENCELONGITUDE', 'LINEFIRSTPIXEL', 'LINELASTPIXEL', 'SAMPLEFIRSTPIXEL', 'SAMPLELASTPIXEL', 'MAPPROJECTIONROTATION', 'MAPRESOLUTION', 'MAPSCALE', 'MAXIMUMLATITUDE', 'MINIMUMLATITUDE', 'EASTERNMOSTLONGITUDE', 'WESTERNMOSTLONGITUDE', 'LINEPROJECTIONOFFSET', 'SAMPLEPROJECTIONOFFSET', 'OBLIQUEPROJPOLELATITUDE', 'OBLIQUEPROJPOLELONGITUDE', 'OBLIQUEPROJPOLEROTATION', 'OBLIQUEPROJXAXISVECTOR', 'OBLIQUEPROJYAXISVECTOR', 'OBLIQUEPROJZAXISVECTOR', 'LOOKDIRECTION', 'COORDINATESYSTEMNAME', 'COORDINATESYSTEM_TYPE']
Section Header Options (Click to view all)
['PRODUCT DESCRIPTION', 'DESCRIPTION OF COMPRESSED AND UNCOMPRESSED FILES', 'POINTERS TO START RECORDS OF OBJECTS IN FILE', 'DESCRIPTION OF OBJECTS CONTAINED IN FILE']

Use Downloaded Data

displayallimages()

Displays downloaded image .IMG files (unzipped from within the .ZIP files) and display all images in directory

display_all_images(image_directory=None, fig_title=None, cmap="gray", figsize_n=6, fig_dpi=120)

  • [REQUIRED] image_directory (string): directory containing a .LBL and .IMG file
  • [OPTIONAL] fig_title (str): figure title, defaults to filename
  • [OPTIONAL] cmap (str): optional colormaps (see more options), defaults to 'gray'
  • [OPTIONAL] figsize_n (int): plot dimensions, defaults to 6x6
  • [OPTIONAL] fig_dpi (int): plot dpi, defaults to 120

python import pydar pydar.display_all_images(image_directory="pydar_results/CORADR_0065_V03_S01")

[!Note] display_all_images() will show all images in the saved results directory

COMING SOON: extractMetadata

Extract Metadata from .FMT and .TAB files

COMING SOON: Extract metadata from .TAB file (using .FMT as a reference)

Development Environment

For developers, to run or test against pydar github repo, a development environment can be created via conda

First, install Miniconda

Then, using the existing environment.yml, a new conda environment can be create to run/test scripts against

conda env create --file environment.yml Once the environment has been built, activate the environment: conda activate pydar Set up pre-commit hooks to ensure standard code formatting and spelling: pre-commit install Pre-commit hooks can be manually run before commits: pre-commit run --all-files To run existing and new tests from the root directory: python -m pytest

Credits

Feature Names collected from Gazetteer of Planetary Nomenclature

Instrument information and naming conventions collected from the Cassini Radar User Guide

This material is based upon work supported by the National Science Foundation Graduate Fellowship under Grant No. 2141064. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation.

Acknowledging Software

Please acknowledge the use of this software in any publications by citing:

Cassini RADAR data extraction software was provided by C. Y. Schneck and U. G. Schneck and is available at URL: https://github.com/unaschneck/pydar

Please send a copy of such publications to: cyschneck@gmail.com & ugschneck@gmail.com (we'd love to see them!)

Bug and Feature Request

Submit a bug fix, question, or feature request as a Github Issue or to ugschneck@gmail.com/cyschneck@gmail.com

Owner

  • Name: unaschneck
  • Login: unaschneck
  • Kind: user
  • Location: Cambridge, MA

Planetary Science PhD Candidate, MIT

Citation (CITATION.cff)

cff-version: 1.2.0
message: "Please acknowledge the use of this software in any publications by citing:"
authors:
- family-names: Schneck
  given-names: Cora Y.
  orchid: 'https://orcid.org/0009-0009-1415-5170'
- family-names: Schneck
  given-names: Una G.
  orchid: 'https://orcid.org/0000-0003-0048-5143'
title: "Pydar: Cassini RADAR data extraction software"
version: 2.0.1
url: "https://github.com/unaschneck/pydar"

GitHub Events

Total
  • Release event: 2
  • Watch event: 1
  • Delete event: 1
  • Push event: 29
  • Pull request event: 1
  • Create event: 2
Last Year
  • Release event: 2
  • Watch event: 1
  • Delete event: 1
  • Push event: 29
  • Pull request event: 1
  • Create event: 2

Committers

Last synced: almost 2 years ago

All Time
  • Total Commits: 234
  • Total Committers: 3
  • Avg Commits per committer: 78.0
  • Development Distribution Score (DDS): 0.201
Past Year
  • Commits: 174
  • Committers: 3
  • Avg Commits per committer: 58.0
  • Development Distribution Score (DDS): 0.126
Top Committers
Name Email Commits
cyschneck 2****k 187
unaschneck 2****k 45
GitHub Action a****s 2

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 0
  • Total pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: 28 days
  • Total issue authors: 0
  • Total pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.5
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: about 2 months
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • cyschneck (2)
  • unaschneck (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 58 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 15
  • Total maintainers: 2
pypi.org: pydar

A Python package to access, download, view, and manipulate Cassini RADAR images

  • Documentation: https://pydar.readthedocs.io/
  • License: MIT License Copyright (c) 2022 unaschneck Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  • Latest release: 2.0.1
    published 9 months ago
  • Versions: 15
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 58 Last month
Rankings
Dependent packages count: 6.6%
Downloads: 24.2%
Average: 26.2%
Forks count: 30.5%
Dependent repos count: 30.6%
Stargazers count: 39.1%
Maintainers (2)
Last synced: 4 months ago