Opened 11 years ago
Closed 10 years ago
#348 closed defect (fixed)
Bug-fix to ropp_pp_cutoff_amplitude
Reported by: | Ian Culverwell | Owned by: | Ian Culverwell |
---|---|---|---|
Priority: | normal | Milestone: | 8.0 |
Component: | ROPP (all) | Version: | 7.0 |
Keywords: | Cc: | Stig Syndergaard |
Description
While researching #301, Stig Syndergaard (DMI) found a small bug in Section 3.1 of ropp_pp_cutoff_amplitude:
DO i=1,n IF (BTEST(LCF(i),3)) THEN imax = MIN(i, imax) EXIT ENDIF ENDDO ... DO i=n,1,-1 IF (BTEST(LCF(i),3)) THEN imin = MAX(i, imin) EXIT ENDIF ENDDO
should be replaced by
DO i=1,n IF (BTEST(LCF(i),3)) THEN imax = MIN(i-1, imax) EXIT ENDIF ENDDO ... DO i=n,1,-1 IF (BTEST(LCF(i),3)) THEN imin = MAX(i+1, imin) EXIT ENDIF ENDDO
This means that one too many data points get through the cut-off.
The bug probably has little impact - it doesn't in a quick test - but should nevertheless be put right.
Attachments (2)
Change history (5)
comment:1 by , 10 years ago
comment:3 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I think it's safe to close this ticket.
by , 10 years ago
Attachment: | bangle_diff_348.png added |
---|
by , 10 years ago
Attachment: | refrac_diff_348.png added |
---|
Note:
See TracTickets
for help on using tickets.
The above is a little insecure (we could get imax < 0, imin > n and imin > imax), so I've made it safer in r4208. (The extreme cases aren't likely to occur in practice.)
This makes tiny changes the output of ropp_pp_occ_tool when IT-PP-05_prof3 is passed through it:
ROPP7.1 text
ROPP8.0 text
ROPP8.0-ROPP7.1 bangle
ROPP8.0-ROPP7.1 bangle