diff --git a/lstchain/scripts/lstchain_r0_to_r0g.py b/lstchain/scripts/lstchain_r0_to_r0g.py index 212a16c5e8..c4dc721fa3 100644 --- a/lstchain/scripts/lstchain_r0_to_r0g.py +++ b/lstchain/scripts/lstchain_r0_to_r0g.py @@ -188,8 +188,8 @@ def main(): log.info('FF-like events tagged as FF: %d', num_FF_like_with_FF_type) else: - log.warn('FF-like events tagged as FF: %d !!', - num_FF_like_with_FF_type) + log.warning('FF-like events tagged as FF: %d !!', + num_FF_like_with_FF_type) log.info('FF-like events not tagged as FF: %d', num_FF_like_with_no_FF_type) @@ -203,13 +203,15 @@ def main(): # If a relevant fraction of FF-like events were not tagged as FF...: max_frac = 0.1 if num_FF_like > 0: - if ((num_FF_like_with_no_FF_type / num_FF_like > max_frac) & - (use_flatfield_heuristic == False)): - log.warn('More than %d percent of FF-like events ' - 'have wrong event_type!', int(100*max_frac)) - log.warn('You should use heuristic identification of FF events!') - else: - log.info('R0 to R0G conversion finished successfully!') + frac_untagged_ff_like = num_FF_like_with_no_FF_type / num_FF_like + if frac_untagged_ff_like > max_frac: + log.warning('%d percent of FlatField(FF)-like events are not tagged as FF', + int(100*frac_untagged_ff_like)) + log.warning('This may be due to anomalous events, like car flashes or LIDAR shots') + log.warning('More rarely, it could result from mis-tagging of FF events') + log.warning('A thorough inspection of the data check plots is recommended\n') + + log.info('R0 to R0G conversion finished successfully!') def get_event_type(wf_hg, offset, evtype):