On Thu, 9 Jul 2009, Tim Jenness wrote:
> kpg1_ainb.gen/gdr
>
> * due to rounding), where the average slope is used to interpolate
> * rather than the difference in axis values.
> IF ( RESID / SLOPE .LT. 0.0D0 ) THEN
> - UB = MAX( LBND + 1, MIN( CINDEX + 1, UBND ) )
> + UB = MAX( LBND, MIN( CINDEX + 1, UBND ) )
> DIFF = NUM_<T>TOD( AXIS( UB - 1 ) - AXIS( UB ) )
> IF ( ABS( DIFF ) .LT. NUM_<T>TOD( VAL__EPS<T> ) ) THEN
> DIFF = SLOPE
>
> ELSE
> - LB = MIN( UBND - 1, MAX( CINDEX, LBND ) )
> + LB = MIN( UBND, MAX( CINDEX, LBND ) )
> DIFF = NUM_<T>TOD( AXIS( LB + 1 ) - AXIS( LB ) )
> IF ( ABS( DIFF ) .LT. NUM_<T>TOD( VAL__EPS<T> ) ) THEN
> DIFF = SLOPE
> END IF
>
> Noting that LB and UB must be inside AXIS() I'm guessing that KAPLIBS is
> right? Malcolm reports that the current kaplibs version matches his
> historical implementation which implies that Peter changed the CCDPACK
> version when it was imported.
Cannot see who or when that change was made in CCDPACK, but clearly it is
correct and protects the indexing of AXIS to the range (LBND:UBND).
> Example 2: KPG1_ISCLx seems to have a bug fix in CCDPACK that is subtly
> different in KAPLIBS. Also the UPPER and LOWER arguments in CCDPACK version
> are forced to DOUBLE whereas KAPLIBS uses generic type. This one may prove
> the most interesting to merge. It will affect KAPPA usage.
Except for the DOUBLE PRECISION arguments these are identical (comment
formatting aside, oddly I seem to have kept Malcolm's usual style and the
KAPPA version hasn't). Must have shared that change.
> 4: KPG1_TRBO
>
> adds some code in ccdpack. Should it be in KAPLIBS? I assume so since it is
> initialisation code.
>
> DO IAXIS = 1, NDIMI
> BOUNDI( 1, IAXIS ) = LBND( IAXIS )
> -
> -* And also for the other axes.
> - IF ( NDIMI .GT. 1 ) THEN
> - DO I = 2, MAXPTS
> - BOUNDI( I, IAXIS ) = LBND( IAXIS )
> - END DO
> - END IF
> END DO
>
> All the others seem to be identical.
One for Malcolm, I doubt I did that.
Peter.
|