Skip to content

Add recipe for moon DEM - #168

Merged
PaulWessel merged 2 commits into
masterfrom
moon-draft
Jan 3, 2023
Merged

PaulWessel merged 2 commits into
masterfrom
moon-draft

Conversation

@PaulWessel

@PaulWessel PaulWessel commented Jan 3, 2023 •

Copy link
Copy Markdown
Contributor

See discussion on #167. This is a draft recipe file plus changes needed for the downsampler script to use proper projection ellipsoid for the moon, and a generalization to work around unsolved bug in grdfilter for 30s or less output grids. It basically seems to work with a few caveats:

  • Since starting grid is ~8Gb and GMT just reads that in, anyone attempting to work with these files probably need at least 16 Gb RAM. I have 64 Gb so not noticing such issues...
  • The current recipe makes both the master 14s grid (which is just reformatting) and then it starts building new global grids from 15s up. We may discuss if we want a 15s grid since 14s is the original and better while the 15s will be filtered and much smoother than if the original data had been processed to be 15s instead of 14s. I suspect NASA picked 256 pixels per degree for other reasons than that is the optimum resolution, so there we are. I am open to just having the 14s versions (so 14s, 30s, 01m etc and no 15s) but build in a scheme where @moon_relief_15s requests would return 14s instead (with a warning).
  • The current script runs for me (especially after a macOS fix in GMT).
  • The downsample script was modified to handle the different ellipsoid (moon vs sphere) and I generalised the section that bypasses the grdfilter 64-bit bug for output grids <= 30 arc second (since I am building both 15s and 30s at the moment)
  • There does not seem to be a need for similar upgrades to the tiler script which we run once all the global grids are made - it then breaks the larger grids into tons of JP2 tiles - but we will find out when we get there.
  • Happy to entertain ideas what the default CPT for the moon should be. It is set to geo right now. We have no @moon_relief.cpt I think so we would have to make one if we want that. Note the name of the CPT will go into the gmt_data_server.txt file and the file itself is cache.

To run this (if RAM requirement is satisfied) is to first get the gmtserver-admin repo, then navigate to that top dir and run

scripts/srv_downsampler_grid.sh moon_relief

Here is what the 01m plot looks like - I killed things before we did everything:

gmt grdimage moon_relief_01m_g.grd -B -png t

t

See discussion on #167.  This is a draft recipe file plus changes needed for the downsampler script to use proper projectino ellipsoid for the moon, and a generalization to work around unsolved bug in grdfilter for 30s or less output grids. It basically seems to work with a few caveats:
@PaulWessel PaulWessel added the enhancement New feature or request label Jan 3, 2023
@PaulWessel PaulWessel self-assigned this Jan 3, 2023

@Esteban82 Esteban82 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine. (Altough I didn't test it).

@Esteban82

Copy link
Copy Markdown
Member

Happy to entertain ideas what the default CPT for the moon should be.

What about this from cpt-city.

Can be used due to its license (Open Government Licence v3.0)?

@PaulWessel

Copy link
Copy Markdown
Contributor Author

I think I will merge it in since there is nothing automatic that will build these and place them on the server so nothing is going to break anything. But that will allow @willschlitzer to more easily play with this draft.

@PaulWessel
PaulWessel merged commit 8b6b18c into master Jan 3, 2023
@PaulWessel
PaulWessel deleted the moon-draft branch January 3, 2023 16:39
@PaulWessel

Copy link
Copy Markdown
Contributor Author

What about this from cpt-city.

Can be used due to its license (Open Government Licence v3.0)?

Well, I think we have a few of the cpt-city tables in GMT as is. The share/cpt/cpt-city has

cubhelix.cpt dem1.cpt dem4.cpt elevation.cpt

so no sweat to add another.

@PaulWessel

Copy link
Copy Markdown
Contributor Author

A harder problem is that his CPT goes only from -4933 to 4141 meters while the global range of the grids are more like -9065.5 to 10711. Also, should there be a hinge at zero? No sea level here so perhaps not. But, we probably should scale it to 0/1 (no hinge) or -1/+1 (with hinge) and set the natural range to -10000 to +10000? Here is what it does with the hardwired Apollo 11 landing site range selection: Lots of clipping into white and black:

map

@joa-quim

joa-quim commented Jan 3, 2023

Copy link
Copy Markdown
Member

Moon is gray. Everyone know that.

@PaulWessel

Copy link
Copy Markdown
Contributor Author

map

@Esteban82

Copy link
Copy Markdown
Member

Also, should there be a hinge at zero? No sea level here so perhaps not. But, we probably should scale it to 0/1 (no hinge) or -1/+1 (with hinge) and set the natural range to -10000 to +10000?

"Elevations were computed by subtracting the lunar reference radius of 1737.4 km from the surface radius measurements (LRO Project and LGCWG, 2008; Archinal et al., 2011). Thus elevation values are the distance above or below the reference sphere. "

That is the definition of 0 for the moon. I'm not sure if it's worth setting a hinge to 0.

@PaulWessel

Copy link
Copy Markdown
Contributor Author

Yep, I think zero has no meaning, but anyone could just do -Cgeo if they wanted that clear line.
While @joa-quim is correct that the anorthosite and regolith are kind of gray to white only, gray CPT does not work be bets when we add shade (which modifies the gray). However, we also know (from direct samples Apollo-13) that the moon is partly made of cheese, so perhaps we can just craft something pleasing that is very washed out, say green cheese to yellow cheese (green to yellow ramp) but not very strong. Here is my cheese cpt

-9000	128/164/96	0	240	L
0	240	9000	255/255/132	U

and the 2m moon:

cheese

Feel free to improve. What says @willschlitzer ?

@joa-quim

joa-quim commented Jan 4, 2023

Copy link
Copy Markdown
Member

This is a low res picture from a cardboard model in the British Museum. This bw cheese looks well illuminated.

IMG_0429

@willschlitzer

Copy link
Copy Markdown

I like grayscale as the default CPT, since that looks the most like the lunar surface (presumably, I haven't been able to visit yet). Is the lack of shading that much of an issue? I would assume users could change the CPT if they want to add shading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants