File:Most active tlp sites on the moon 4b.png
Original file (849 × 846 pixels, file size: 468 KB, MIME type: image/png)
Captions
Summary
[edit]DescriptionMost active tlp sites on the moon 4b.png |
English: Most active tlp sites on the moon |
Date | |
Source | Own work |
Author | Merikanto |
Data for TLP sites from ChatGPT
# NASA "CGI Moon Kit"
# https://svs.gsfc.nasa.gov/cgi-bin/details.cgi?aid=4720
Image map: lroc_color_poles_4k.tif
Displacement: ./indata/ldem_4.tif
Python script to generate this map
- 3
- TLP sites on the moon
- Python3 basemap, imageio
- TLP data from
-
- ChatGPT
- Moon imagemap and dem from:
-
-
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
import imageio
import numpy as np
from mpl_toolkits.basemap import shiftgrid
from matplotlib.colors import LightSource
def acquire_image_rgb(iname1):
img0 = imageio.imread(iname1)
shp0=np.shape(img0)
print(shp0)
width=shp0[1]
height=shp0[0]
print(width, height)
lats = np.linspace(-np.pi / 2, np.pi / 2, height)
lons = np.linspace(0, 2 * np.pi, width)
img1=img0[:,:,0]
#plt.imshow(img1)
#plt.show()
#quit(-1)
return(img1, lons, lats)
def acquire_image_gray(iname1):
img0 = imageio.imread(iname1)
shp0=np.shape(img0)
print(shp0)
width=shp0[1]
height=shp0[0]
print(width, height)
lats = np.linspace(-np.pi / 2, np.pi / 2, height)
lons = np.linspace(0, 2 * np.pi, width)
img1=img0
#plt.imshow(img1)
#plt.show()
#quit(-1)
return(img1, lons, lats)
def sample_data(shape=(4000, 2000)):
"""Returns ``lons``, ``lats`` and ``data`` of some fake data."""
nlats, nlons = shape
lats = np.linspace(-np.pi / 2, np.pi / 2, nlats)
lons = np.linspace(0, 2 * np.pi, nlons)
lons, lats = np.meshgrid(lons, lats)
wave = 0.75 * (np.sin(2 * lats) ** 8) * np.cos(4 * lons)
mean = 0.5 * np.cos(2 * lats) * ((np.sin(2 * lats)) ** 2 + 2)
lats = np.rad2deg(lats)
lons = np.rad2deg(lons)
data = wave + mean
return lons, lats, data
imagename1="./indata/lroc_color_poles_4k.tif"
imagename2="./indata/ldem_16.tif"
- imagename1="./indata/testmap.jpg"
- imagename2="./indata/testdem.jpg"
data1, lons, lats=acquire_image_rgb(imagename1)
data2, lons, lats=acquire_image_gray(imagename2)
- data2, lons, lats=acquire_image_gray(imagename2)
ls = LightSource(azdeg=0,altdeg=65)
- shade data, creating an rgb array.
data3= ls.shade(data2,plt.cm.gray)
- ax = plt.axes(projection=ccrs.Mollweide())
ax = plt.axes(projection=ccrs.Orthographic())
- names=["Aristarchus"]
- lox=[-47.4]
- lay=[23.7]
- events=[100]
names=['Aristarchus', 'Plato', 'Kepler', 'Tycho', 'Alphonsus', 'Grimaldi', 'Copernicus','Gassendi', 'Eratosthenes', 'Posidonius', 'Theophilus', 'Langrenus', 'Proclus','Atlas', 'Aristoteles', 'Eudoxus', 'Hyginus N', 'Römer', 'Messier', 'Pico']
lox= [-47.4, -9.3, -38.0, -11.2, -3.2, -68.3, -20.0, -40.0, -11.3, 29.9, 26.4, 60.9,46.8, 44.4, 17.4, 16.3, 6.3, 36.4, 47.7, -8.8]
lay=[23.7, 51.6, 8.1, -43.3, -13.6, -5.2, 9.7, -17.5, 14.5, 31.8, -11.4, -8.9, 16.1,46.7, 50.2, 44.3, 7.8, 25.3, -2.3, 45.6]
events=[63, 55, 37, 34, 33, 27, 23, 20, 16, 14, 14, 13, 12, 12, 11, 11, 10, 10, 9, 9]
- lons, lats, data = sample_data()
- ax.contourf(lons, lats, data,transform=ccrs.PlateCarree(),cmap='Spectral')
ax.imshow(data1, transform=ccrs.PlateCarree(),cmap='gray')
ax.imshow(data3, transform=ccrs.PlateCarree(),cmap='gray', alpha=0.5)
for n in range(0, len(names)):
#ax.scatter(lox[n], lay[n], transform=ccrs.PlateCarree(), color="red", alpha=0.2, s=events[n]*4)
#ax.scatter(lox[n], lay[n], transform=ccrs.PlateCarree(), color="orange", alpha=0.4, s=events[n]*3)
ax.scatter(lox[n], lay[n], transform=ccrs.PlateCarree(), color="yellow", alpha=0.6, s=events[n]*2)
- ax.coastlines()
ax.set_global()
plt.show()
Licensing
[edit]- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 16:47, 8 June 2024 | 849 × 846 (468 KB) | Merikanto (talk | contribs) | Uploaded own work with UploadWizard |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.