whizard is hosted by Hepforge, IPPP Durham

Opened 11 years ago

Closed 11 years ago

#633 closed defect (fixed)

Threshold calls and underflow still missing

Reported by: Juergen Reuter Owned by: kilian
Priority: P3 Milestone: v2.2.0
Component: core Version: 2.2.0beta
Severity: normal Keywords:
Cc:

Description

In the subroutine mci_vamp_instance_adapt_weights the threshold calls and underflow is still missing (maybe also a reason for the fluctuations in #608). This is the missing code:

   if (sum_weights /= 0) then
       weights = weights / sum (weights)
       if (grid_parameters%threshold_calls /= 0) then
          weight_min = &
               real (grid_parameters%threshold_calls, default) &
               / calls
          allocate (weight_underflow (process%n_channels))
          weight_underflow = weights /= 0 .and. weights < weight_min
          n_underflow = count (weight_underflow)
          sum_weight_underflow = sum (weights, mask=weight_underflow)
          where (weight_underflow)
             weights = weight_min
          elsewhere
             weights = weights &
                  * (1 - n_underflow * weight_min) / (1 - sum_weight_underflow)
          end where
       end if
       call vamp_update_weights (process%grids, weights)
    end if

Also, in 2.1 the condition was weights /= 0, now it's weights > 0. Should allow for negative weights again.

Change History (1)

comment:1 Changed 11 years ago by kilian

Resolution: fixed
Status: newclosed

Reinstated with appropriate name changes in r5747. Caveat: No specific test because this requires some nontrivial process. All previous unit/function test work unchanged.

Note: See TracTickets for help on using tickets.