<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
Does it work if you convert the maps to float, though? If not, there is something else that is a problem.
<div><br>
</div>
<div>Michael<br>
<div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; ">______________________________</span></font></div>
<div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; ">C. Michael Barton </span></font></div>
<div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; ">Director, Center for Social Dynamics & Complexity</span></font></div>
<div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; ">Professor of Anthropology, School of Human Evolution & Social Change</span></font></div>
<div><span class="Apple-style-span" style="font-size: 12px; font-family: Helvetica; ">Arizona State University</span></div>
<div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; ">Tempe, AZ  85287-2402</span></font></div>
<div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; ">USA</span></font></div>
<div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; "><br>
</span></font></div>
<div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; ">voice:<span class="Apple-converted-space"> </span><span class="Apple-tab-span" style="white-space: pre; ">
</span>480-965-6262 (SHESC), 480-727-9746 (CSDC)</span></font></div>
<div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; ">fax:          480-965-7671(SHESC), 480-727-0709 (CSDC)</span></font></div>
<div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; ">www: <span class="Apple-tab-span" style="white-space: pre; ">
</span><a href="http://csdc.asu.edu">http://csdc.asu.edu</a>, <a href="http://shesc.asu.edu">
http://shesc.asu.edu</a></span></font></div>
<div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; "><span class="Apple-tab-span" style="white-space: pre; "></span><a href="http://www.public.asu.edu/~cmbarton">http://www.public.asu.edu/~cmbarton</a></span></font></div>
</div>
</span></div>
</span></div>
</span></div>
</span></div>
</span></div>
</span></div>
</span></div>
</span></div>
</span></span></div>
<br>
<div>
<div>On Jan 31, 2013, at 1:31 PM, Eric Goddard <<a href="mailto:egoddard1010@gmail.com">egoddard1010@gmail.com</a>></div>
<div> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div dir="ltr">I don't think that is the issue. I wasn't using serial processing, and I was using the IHS method. The only place division occurs in the IHS method is in the histmatch function, but that explicitly casts to float.<br>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Thu, Jan 31, 2013 at 1:52 PM, Markus Metz <span dir="ltr">
<<a href="mailto:markus.metz.giswork@gmail.com" target="_blank">markus.metz.giswork@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Thu, Jan 31, 2013 at 7:06 PM, Michael Barton <<a href="mailto:Michael.Barton@asu.edu">Michael.Barton@asu.edu</a>> wrote:<br>
><br>
> i.pansharpen uses Python, not Bash. So it is not an integer math problem.<br>
<br>
</div>
But it calls r.mapcalc, e.g. in lines 151-153. If k is integer and not<br>
float, r.mapcalc will do integer division. Equivalent for lines 159,<br>
162, 165. This could be fixed by casting the numerator to double with<br>
double().<br>
<br>
Markus M<br>
<div class="HOEnZb">
<div class="h5"><br>
><br>
> However, you might try changing your input maps to float or DCELL. See if that changes things.<br>
><br>
> Michael<br>
> ______________________________<br>
> C. Michael Barton<br>
> Director, Center for Social Dynamics & Complexity<br>
> Professor of Anthropology, School of Human Evolution & Social Change<br>
> Arizona State University<br>
> Tempe, AZ  85287-2402<br>
> USA<br>
><br>
> voice:  <a href="tel:480-965-6262" value="+14809656262">480-965-6262</a> (SHESC),
<a href="tel:480-727-9746" value="+14807279746">480-727-9746</a> (CSDC)<br>
> fax:          <a href="tel:480-965-7671" value="+14809657671">480-965-7671</a>(SHESC),
<a href="tel:480-727-0709" value="+14807270709">480-727-0709</a> (CSDC)<br>
> www:  <a href="http://csdc.asu.edu/" target="_blank">http://csdc.asu.edu</a>, <a href="http://shesc.asu.edu/" target="_blank">
http://shesc.asu.edu</a><br>
> <a href="http://www.public.asu.edu/~cmbarton" target="_blank">http://www.public.asu.edu/~cmbarton</a><br>
><br>
> On Jan 31, 2013, at 2:11 AM, <<a href="mailto:grass-user-request@lists.osgeo.org">grass-user-request@lists.osgeo.org</a>><br>
>  wrote:<br>
><br>
> From: Yann Chemin <<a href="mailto:yann.chemin@gmail.com">yann.chemin@gmail.com</a>><br>
> Subject: Re: [GRASS-user] unexpected i.pansharpen results<br>
> Date: January 31, 2013 2:11:33 AM MST<br>
> To: Hamish <<a href="mailto:hamish_b@yahoo.com">hamish_b@yahoo.com</a>><br>
> Cc: GRASS user list <<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>><br>
><br>
><br>
> hmmm, yes that looks like an old friend to check...<br>
><br>
><br>
> On 31 January 2013 14:06, Hamish <<a href="mailto:hamish_b@yahoo.com">hamish_b@yahoo.com</a>> wrote:<br>
>><br>
>> (sorry for the html,top posting)<br>
>><br>
>> I wonder if the script is doing integer division when it should be doing floating point division?<br>
>><br>
>> <a href="http://trac.osgeo.org/grass/browser/grass/trunk/scripts/i.pansharpen/i.pansharpen.py" target="_blank">
http://trac.osgeo.org/grass/browser/grass/trunk/scripts/i.pansharpen/i.pansharpen.py</a><br>
>><br>
>><br>
>> Hamish<br>
>><br>
>> --- On Wed, 1/30/13, Eric Goddard <<a href="mailto:egoddard1010@gmail.com">egoddard1010@gmail.com</a>> wrote:<br>
>><br>
>><br>
>> From: Eric Goddard <<a href="mailto:egoddard1010@gmail.com">egoddard1010@gmail.com</a>><br>
>> Subject: [GRASS-user] unexpected i.pansharpen results<br>
>> To: <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
>> Date: Wednesday, January 30, 2013, 8:30 AM<br>
>><br>
>><br>
>> Hi all,<br>
>><br>
>> I'm attempting to pansharpen some ikonos imagery using the i.pansharpen tool in Grass7 on windows 7 installed via OSGeo4W (r54756-478).  The range for the sharpened red, green, and blue outputs are 0-30, which seems suspicious given the 16bit range of the
 input bands. The command I used was:<br>
>><br>
>> <a href="http://i.pansharpen.py/" target="_blank">i.pansharpen.py</a> "sharpen=ihs" "ms3=ik_mss.4@eric" "ms2=ik_mss.3@eric" "ms1=ik_mss.2@eric" "pan=ik_pan@eric" "output_prefix=ik_ihs"<br>
>><br>
>> The input bands are linked via r.external, would that matter?<br>
>><br>
>> The output from my test area is below. Any assistance would be greatly appreciated.<image.png><br>
>><br>
>><br>
>> Thanks,<br>
>> Eric<br>
>><br>
>> -----Inline Attachment Follows-----<br>
>><br>
>> _______________________________________________<br>
>> grass-user mailing list<br>
>> <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
>> <a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> grass-user mailing list<br>
> <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
><br>
_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
</div>
<br>
</div>
</body>
</html>