ERROR 000989: Raster Calculator: Landsat 9: Calculating Surface Temperature> Brightness Temperature

1092
4
Jump to solution
02-16-2023 11:49 AM
SarahCope
New Contributor II

Python syntax error: File "<string>", line 1

Hi there! I am trying to find the surface area of a city using Landsat 9 satellite imagery. I am going through the steps but when I get to calculating brightness temperature, I keep receiving the same error with the Raster Calculator  ( Python syntax error: File "<string>", line 1 ). 

This is the equation I'm using when I receive the error:

(1321.0789/ (Ln (774.8853) / "TOA") + 1)) - 273.15 

"TOA" is a a previously calculated value also using the raster calculator directly before this. 

0 Kudos
1 Solution

Accepted Solutions
SarahCope
New Contributor II

SOLVED: If you think you've double-checked your equation a million times already, do it again or recruit a friend to stare at it for you. I had an extra parenthesis after the Ln function. Go figure. 

(1321.0789/ (Ln (774.8853) / "TOA") + 1)) - 273.15 

Should be: (1321.0789/ (Ln (774.8853 / "TOA") + 1)) - 273.15 

View solution in original post

0 Kudos
4 Replies
DanPatterson
MVP Esteemed Contributor

Ln (Spatial Analyst)—ArcGIS Pro | Documentation

in_raster_or_constant
Input values for which to find the natural logarithm (Ln).

To use a number as an input for this parameter, the cell size and extent must first be set in the environment.

Did you set the cell size and extent in the Environments tab of the raster calculator?


... sort of retired...
0 Kudos
SarahCope
New Contributor II

I hadn't messed with the cell size since the tutorials I have been following didn't. However, when I did change it around in a few different ways just now, such as "Same as TOA", I still get the same error. 

 

For reference, these are the steps I've been following (using my own numbers from Landsat data- which are comparative to the ones used in the video)

https://www.youtube.com/watch?v=YXBat9MNh9E 

0 Kudos
SarahCope
New Contributor II

For reference, these are the steps I've been following (using my own numbers from Landsat data- which are comparative to the ones used in the video)

https://www.youtube.com/watch?v=YXBat9MNh9E 

0 Kudos
SarahCope
New Contributor II

SOLVED: If you think you've double-checked your equation a million times already, do it again or recruit a friend to stare at it for you. I had an extra parenthesis after the Ln function. Go figure. 

(1321.0789/ (Ln (774.8853) / "TOA") + 1)) - 273.15 

Should be: (1321.0789/ (Ln (774.8853 / "TOA") + 1)) - 273.15 

0 Kudos