Lunar Technosignatures.
Step-by-step guide to building the dataset from LRO NAC imagery.
What you need and what steps to follow
Prerequisites
- ISIS3 installed and configured
- ~20 GB free disk space
- Basic command line knowledge
Download
Download the Apollo 15 and 17 NAC images from the LROC archive.
| Mission | Resolution (m/px) | Image | Download |
|---|---|---|---|
| Apollo 15 | 0.406 | Left NAC | M175252641L |
| Right NAC | M175252641R | ||
| Apollo 17 | 0.515 | Left NAC | M113758461L |
| Right NAC | M113758461R |
Coregister & Normalize
Use ISIS3 to coregister the two images of each landing site.
2.1 Create Folders and Move Files
First, move the downloaded raw files into Apollo15/RAW and Apollo17/RAW folders correspondingly.
# Create download folders mkdir -p Apollo15/RAW Apollo17/RAW # Move Apollo 15 files mv M175252641LE.IMG Apollo15/RAW/ mv M175252641RE.IMG Apollo15/RAW/ # Move Apollo 17 files mv M113758461LE.IMG Apollo17/RAW/ mv M113758461RE.IMG Apollo17/RAW/ # Create calibrated folder for ISIS output mkdir -p Apollo15/calibrated Apollo17/calibrated
2.2 Create ISIS3 Scripts
Second, create three scripts:
#!/bin/bash
function process()
{
LROCFILE=$1
# Cut Extension
FILELENGTH=${#LROCFILE}-4
IMGFILE=${LROCFILE:0:FILELENGTH}
echo "Importing $LROCFILE to isis"
lronac2isis from=./RAW/"$IMGFILE".IMG to=./calibrated/"$IMGFILE".lev0.cub
echo "Initializing SPICE kernels"
spiceinit from=./calibrated/"$IMGFILE".lev0.cub spksmithed=true web=true
# echo "Calibrating EDR to CDR"
lronaccal from=./calibrated/"$IMGFILE".lev0.cub to=./calibrated/"$IMGFILE".lev1.cub dark=false
lronacecho from=./calibrated/"$IMGFILE".lev1.cub to=./calibrated/"$IMGFILE".lev2.cub
echo "done"
}
IMAGES="./RAW/*.IMG"
for image in $IMAGES
do
image=$(basename "$image")
echo "Processing $image"
process "$image"
done
Note: These commands assume ISIS3 is properly installed and configured on your system. Adjust paths as needed for your specific setup.
2.3 Run Scripts for Both Sites
Third, run the scripts for both the Apollo 15 and Apollo 17 site:
# For Apollo 15 cd Apollo15 chmod +x preprocess_lroc.sh ./preprocess_lroc.sh ./createMosRange.sh ./mappingLROC.sh # For Apollo 17 cd ../Apollo17 chmod +x preprocess_lroc.sh ./preprocess_lroc.sh ./createMosRange.sh ./mappingLROC.sh
2.4 Create Final Mosaics
Fourth, combine the mapped images into a single mosaic:
# For Apollo 15 cd Apollo15 ls calibrated/*.lev3.cub > lev3.txt automos fromlist=lev3.txt mosaic=M175252641.cub # For Apollo 17 cd ../Apollo17 ls calibrated/*.lev3.cub > lev3.txt automos fromlist=lev3.txt mosaic=M113758461.cub
Cut for Dataloader
Open the .cub files and crop the images according to the coordinates below.
3.1 Data Structures & Crop Coordinates
To load these images into the program, the NAC images are divided into smaller sub-images and stored in their respective data folders. The script follows the structure below. This dataset was created for and used in the anomaly detection research available at github.com/TechnicToms/lunar-technosignatures:
<chosen data root>/
LRO/
NAC/
Apollo[VERSION]/
Replace [VERSION] with 15 or 17. Place the tiff image into the corresponding directory and crop it as follows:
Apollo 15 Landing Site
| Filename | x | y | w | h |
|---|---|---|---|---|
| M175252641_cut1.png | 0 | 0 | 7399 | 14662 |
| M175252641_cut2.png | 0 | 14662 | 7399 | 14662 |
| M175252641_cut3.png | 0 | 29324 | 7399 | 14662 |
| M175252641_cut4.png | 0 | 43986 | 7399 | 14662 |
| M175252641_cut5.png | 0 | 58648 | 7399 | 14662 |
Apollo 17 Landing Site
| Filename | x | y | w | h |
|---|---|---|---|---|
| M113758461_cut1.png | 0 | 0 | 10118 | 10450 |
| M113758461_cut2.png | 0 | 10450 | 10118 | 10450 |
| M113758461_cut3.png | 0 | 20900 | 10118 | 10450 |
| M113758461_cut4.png | 0 | 31350 | 10118 | 10450 |
| M113758461_cut5.png | 0 | 41800 | 10118 | 10450 |
Afterwards, place the ground truths from the GroundTruths folder into the appropriate data folder as listed above.
Final Usage
Your dataset is ready — load it with the anomaly detection code on GitHub.