Ignore:
Timestamp:
Aug 1, 2018 12:36:58 PM (3 years ago)
Author:
vondreele
Message:

fix array overflow problem in histogram2d.for
clean up some stuff in ImageIntegrate?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/fsource/histogram2d.for

    r451 r3522  
    3737     1    ( Y(K).GE.YLIM(0) .AND. Y(K).LT.YLIM(1) )) THEN
    3838          DDX = (X(K)-XLIM(0))/DX
    39           I = INT(DDX)
     39          I = MIN(MAX(0,INT(DDX)),NXBINS-1)
    4040          DDY = (Y(K)-YLIM(0))/DY
    41           J = INT(DDY)
     41          J = MIN(MAX(0,INT(DDY)),NYBINS-1)
    4242          NST(I,J) = NST(I,J)+1.0
    4343          HST(I,J) = HST(I,J)+Z(K)
Note: See TracChangeset for help on using the changeset viewer.