Hi All,<br><br>please any python programmer could explain me the correct use of r.mapcalc in this case.<br>In my python script I have a formula like this:<br><br>n = 0.016 * (resolution ** 0.46)<br><br>(resolution is the cellsize of the input map).<br>
and I have to calculate a map with:<br><br>grass.mapcalc("mti = log((exp($rast1 , n)) / $rast2)", rast1 = 'r_accumulation', rast2 = 'r_slope')<br><br>but since n is not a map, i get the error:<br>
<br>Invalid map <n><br>Parse error<br>ERROR: An error occurred while running r.mapcalc<br><br>How can I use the 'n' in r.mapcalc?<br><br>Thank you in advance,<br><br>Margherita<br>