Skip to content

athuler/mars-rover-timelapse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mars Rover Timelapse

Tool to create timelapses from Mars rover images using the Mars Rover Photo API.

curiosity-FHAZ-SOL340-345-5 0fps-0 0

Installation

  1. Clone/Download the repository
  2. Install the requirements: pip install -r requirements.txt
  3. Sign up for a NASA API Key
  4. Create a file named .env containing NASA_API_KEY=<YOUR API KEY> OR When using the tool, pass the additional parameter --key <YOUR API KEY>

Note

You will need to have Python installed to run this. Don't have it? Download it.

Usage

python make_timelapse.py \
    --rover perseverance \
    --camera FRONT_HAZCAM_LEFT_A \
    --sol_start 300 \
    --sol_start 310
Argument / Flag Possible Values Description
--rover perseverance, curiosity REQUIRED Name of the rover from which to download images.
--camera valid camera name
ex: FRONT_HAZCAM_LEFT_A
REQUIRED Name of the rover from which to download images.
--sol_start SOL calculator
ex: 305
REQUIRED First Mars SOL to include in the timelapse.
--sol_end SOL calculator
ex: 315
REQUIRED Last Mars SOL to include in the timelapse. Must be equal or greater than sol_start
--img_perc_start integer between 0 and 100 Trim the start of the timelapse. Must be lower than img_perc_end. Defaults to 0.
--img_perc_end integer between 0 and 100 Trim the end of the timelapse. Must be greater than img_perc_start. Defaults to 100.
--fps integer > 0 Frames per second of exported video. Default: 2
--min_aspect_ratio float > 0.0 Minimum aspect ratio of pictures to include in the timelapse. Default: 0
--key Your NASA API Key Pass your NASA API Key as an argument if you did not create a .env file. REQUIRED if no .env file
--keep_temp N/A Pass this flag to prevent the deletion of the temporary directory containing the raw and resized images upon completion. On the following runs, images will not be redownloaded unless --force_download is passed.
--force_download N/A Pass this flag to force downloading of images that already exist in the temp directory if it exists

Note

The opportunity and spirit rover images are unavailable as NASA took down the images from their server. You can read more about it on this Github issue and this Reddit thread.

Examples

python make_timelapse.py \
    --sol_start 0 \
    --sol_end 5 \
    --keep_temp \
    --fps 5 \
    --rover perseverance \
    --camera EDL_DDCAM 

perseverance-EDL_DDCAM-SOL0-5-5 0fps-0 0

python make_timelapse.py \
    --sol_start 2 \
    --sol_end 2 \
    --img_perc_end 14 \
    --keep_temp \
    --fps 5 \
    --rover perseverance \
    --camera EDL_RDCAM

perseverance-EDL_RDCAM-SOL2-2-5 0fps-0 0-0_-14_

python make_timelapse.py \
    --sol_start 1250 \
    --sol_end 1350 \
    --keep_temp \
    --fps 5 \
    --rover perseverance \
    --camera REAR_HAZCAM_LEFT

perseverance-REAR_HAZCAM_LEFT-SOL1250-1350-5 0fps-0 0

python make_timelapse.py \
    --sol_start 340 \
    --sol_end 345 \
    --keep_temp \
    --fps 5 \
    --rover perseverance \
    --min_aspect_ratio 3 \
    --camera NAVCAM_LEFT

perseverance-NAVCAM_LEFT-SOL340-345-5 0fps-3 0

python make_timelapse.py \
    --sol_start 340 \
    --sol_end 345 \
    --keep_temp \
    --fps 5 \
    --rover curiosity \
    --camera FHAZ

curiosity-FHAZ-SOL340-345-5 0fps-0 0

python make_timelapse.py \
    --sol_start 340 \
    --sol_end 340 \
    --keep_temp \
    --fps 15 \
    --rover curiosity \
    --camera NAVCAM

curiosity-NAVCAM-SOL340-340-15 0fps-0 0

About

Create timelapses from Mars rovers

Topics

Resources

Stars

Watchers

Forks

Languages