Select to view content in your preferred language

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

1620
4
Jump to solution
02-16-2023 11:49 AM
SarahCope
Emerging Contributor

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
Emerging Contributor

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
Emerging Contributor

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 

In this video you will learn how to obtain Land Surface Temperature (LST) of LANDSAT 9 using ArcGIS Pro. If you like this video, you can SUBSCRIBE this channel to get notified of new videos
0 Kudos
SarahCope
Emerging Contributor

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 

In this video you will learn how to obtain Land Surface Temperature (LST) of LANDSAT 9 using ArcGIS Pro. If you like this video, you can SUBSCRIBE this channel to get notified of new videos
0 Kudos
SarahCope
Emerging Contributor

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