asp_plot.planetary_source#
Planetary (LOLA/MOLA) altimetry source.
Owns the planetary-altimetry side of asp_plot.altimetry.Altimetry:
loading LOLA (Moon) and MOLA (Mars) point clouds from ODE GDS CSV exports,
sampling the ASP DEM at those points, and exporting a pc_align-ready CSV.
The class holds its own data (planetary_points) and reads the
cross-cutting dem_fn / directory / aligned_dem_fn from the
coordinating Altimetry instance passed at construction.
Attributes#
Classes#
Load and analyze LOLA (Moon) / MOLA (Mars) altimetry against an ASP DEM. |
Functions#
|
Submit an async query to the ODE GDS REST API. |
Module Contents#
- class asp_plot.planetary_source.PlanetarySource(alt)#
Load and analyze LOLA (Moon) / MOLA (Mars) altimetry against an ASP DEM.
- Parameters:
alt (Altimetry) – The coordinating
asp_plot.altimetry.Altimetryinstance. Cross-cutting paths (dem_fn,directory,aligned_dem_fn) are read from it so a single source of truth describes the DEM under analysis.
- load_planetary_csv(csv_path)#
Load LOLA or MOLA altimetry data from a GDS topo CSV file.
The CSV is obtained via the
request_planetary_altimetryCLI tool, which submits an async query to the ODE GDS API and emails the user a download link. The user downloads and unzips the result, then passes the*_topo_csv.csvfile here.Automatically selects the LOLA or MOLA parser based on the DEM’s planetary body.
- Parameters:
csv_path (str) – Path to a
*_topo_csv.csvfile from the ODE GDS.
- planetary_to_dem_dh(n_sigma=3)#
Compute height differences between planetary altimetry and DEM.
Reprojects
self.planetary_pointsto the DEM CRS, interpolates DEM heights at altimetry locations, and computes the differencealtimetry_minus_dem = height - dem_height. Whenaligned_dem_fnis set, also populatesaligned_dem_heightandaltimetry_minus_aligned_demso pre/post-alignment plots can share a single sample. Outliers beyondn_sigma× std from the mean (computed on the unaligned dh) are removed by default.- Parameters:
n_sigma (float or None, optional) – Remove dh outliers beyond this many standard deviations from the mean. Default 3. Pass None to skip outlier filtering.
self.planetary_points. (The results are stored as new columns on)
- to_csv_for_pc_align_planetary(filename_prefix='planetary_for_pc_align')#
Export
self.planetary_pointsto a CSV for pc_align.Writes columns
lon, lat, radius_m(planetary radius from the body center, in meters). Used as theplanetary_csvargument toasp_plot.alignment.Alignment.pc_align_dem_to_planetary_csv().
- alt#
- planetary_points = None#
- asp_plot.planetary_source.gds_query_async(query_type, bounds, results_code, email=None, **extra_params)#
Submit an async query to the ODE GDS REST API.
- Parameters:
query_type (str) – GDS query type, e.g.
"lolardr"or"molapedr".bounds (dict) – Dictionary with
westernlon,easternlon,minlat,maxlatkeys.results_code (str) – GDS results format code (e.g.
"u"for LOLA,"v"for MOLA).email (str or None, optional) – Email for notification when query finishes.
**extra_params – Additional GDS query parameters (e.g.
channel="ttttt").
- Returns:
Job ID for polling.
- Return type:
- asp_plot.planetary_source.GDS_BASE_URL = 'https://oderest.rsl.wustl.edu/livegds'#
- asp_plot.planetary_source.MARS_IAU_SPHERE_RADIUS#
- asp_plot.planetary_source.MOON_IAU_SPHERE_RADIUS#
- asp_plot.planetary_source.logger#