corincerami / mars-photo-api

A Rails API for photo data from NASA's Mars Rovers
https://api.nasa.gov/#MarsPhotos
GNU General Public License v3.0
364 stars 50 forks source link

API returns smaller versions of images for Spirit & Opportunity #117

Open kriskda opened 3 years ago

kriskda commented 3 years ago

Just observed that API returns smaller versions of images for Spirit & Opportunity e.g.

https://api.nasa.gov/mars-photos/api/v1/rovers/opportunity/photos?sol=100&api_key=DEMO_KEY

{"photos":[{"id":118330,"sol":100,"camera":{"id":14,"name":"FHAZ","rover_id":6,"full_name":"Front Hazard Avoidance Camera"},"img_src":"http://mars.nasa.gov/mer/gallery/all/1/f/100/1F137064531EFF2019P1214L0M1-BR.JPG"......}

Image url has "-BR" http://mars.nasa.gov/mer/gallery/all/1/f/100/1F137064531EFF2019P1214L0M1-BR.JPG compare with http://mars.nasa.gov/mer/gallery/all/1/f/100/1F137064531EFF2019P1214L0M1.JPG

Note there is also http://mars.nasa.gov/mer/gallery/all/1/f/100/1F137064531EFF2019P1214L0M1-THM.JPG

mtilda commented 3 years ago

You appear to be correct! I'm working on a fix for this now. It is interesting that NASA's documentation does not mention the "-BR" suffix: https://mars.nasa.gov/mer/gallery/edr_filename_key.html

mtilda commented 3 years ago

A similar pattern can be observed with the Opportunity rover, but the default is the large (no suffix) version: https://mars.nasa.gov/msl-raw-images/proj/msl/redops/ods/surface/sol/01000/opgs/edr/fcam/FLB_486265257EDR_F0481570FHAZ00323M_.jpg https://mars.nasa.gov/msl-raw-images/proj/msl/redops/ods/surface/sol/01000/opgs/edr/fcam/FLB_486265257EDR_F0481570FHAZ00323M_-br.jpg https://mars.nasa.gov/msl-raw-images/proj/msl/redops/ods/surface/sol/01000/opgs/edr/fcam/FLB_486265257EDR_F0481570FHAZ00323M_-thm.jpg