Python script

498
3
06-08-2013 12:18 AM
WaqasAhmad
New Contributor
Dear Experts,

I am new to this forum and want your help to solve my problem.
I am using ArcGIS 10 and my problem states as:

I have a set of 46 monthly rainfall rasters
1. i want to extract the maximum and minimum pixel value from the the stack of 46 raster as MAX and MIN
2. Then using the equation shown in attached figure [ATTACH=CONFIG]25148[/ATTACH] I have to calculate the cumulative probability of each x
3. where x is each individual raster (total 46)
4. I have already calculated the values of "a" also in the form of a raster and would like the program to pick these values from that respective raster.
5. The summation equation should run from n=1 to n=Max repeatedly

I would highly appreciate of a python expert who writes a few lines script for me to solve this
Tags (2)
0 Kudos
3 Replies
MatejTacer
New Contributor III
Could you provide some sample data please?
0 Kudos
MathewCoyle
Frequent Contributor

I would highly appreciate of a python expert who writes a few lines script for me to solve this


So basically you want someone to do your work for you? Have you even attempted to solve this problem on your own?
0 Kudos
RhettZufelt
MVP Frequent Contributor
Dear Experts,

I am new to this forum and want your help to solve my problem.
I am using ArcGIS 10 and my problem states as:

I have a set of 46 monthly rainfall rasters
1. i want to extract the maximum and minimum pixel value from the the stack of 46 raster as MAX and MIN
2. Then using the equation shown in attached figure [ATTACH=CONFIG]25148[/ATTACH] I have to calculate the cumulative probability of each x
3. where x is each individual raster (total 46)
4. I have already calculated the values of "a" also in the form of a raster and would like the program to pick these values from that respective raster.
5. The summation equation should run from n=1 to n=Max repeatedly

I would highly appreciate of a python expert who writes a few lines script for me to solve this


Should be pretty straight forward.  First, I'd use ListRasters to get a list of all your rasters (unless you hard coded them to a list)
then iterate through the rasters and using  arcpy.GetRasterProperties can get the max and min values
Then, plug the info into your equation on each iteration.

Since you are working with rasters, and have the "a" values as a raster, I'm guessing you will need to use map algebra for this. http://resources.arcgis.com/en/help/main/10.1/index.html#/What_is_Map_Algebra/00p600000002000000/

R_
0 Kudos