UCBerkeleySETI/turbo_seti

find_event.plot_event needs more work

Closed this issue · 3 comments

Line 146: rebin: function already defined line 101

make_waterfall_plots
Several variables are undefined.
One procedure (rebin) is defined twice: imported and then defined locally.
An exception handler at line 311 does nothing but invoke raise (?)

plot_candidate_events_individually
Undefined variable 'Time'

A subset of the detailed error list from pylint:

************* Module turbo_seti.find_event.plot_event
E0102:146,0: rebin: function already defined line 101
E0602:287,30: make_waterfall_plots: Undefined variable 'n_plots'
W0706:311,8: make_waterfall_plots: The except handler raises immediately
E0602:296,26: make_waterfall_plots: Undefined variable 'source_name_list'
E1124:297,24: make_waterfall_plots: Argument 'f_start' passed by position and keyword in function call
E0602:301,50: make_waterfall_plots: Undefined variable 'drift_rate'
E0602:305,24: make_waterfall_plots: Undefined variable 'Time'
E0602:305,72: make_waterfall_plots: Undefined variable 'Time'
E0602:307,22: make_waterfall_plots: Undefined variable 'f_mid'
E0602:307,30: make_waterfall_plots: Undefined variable 'drift_rate'
E1121:310,12: make_waterfall_plots: Too many positional arguments for function call
E0602:310,52: make_waterfall_plots: Undefined variable 'drift_rate'
E0602:316,62: make_waterfall_plots: Undefined variable 'on_source_name'
E0602:316,78: make_waterfall_plots: Undefined variable 'drift_rate'
E0602:319,19: make_waterfall_plots: Undefined variable 'fil_file_list'
E0602:337,10: make_waterfall_plots: Undefined variable 'fig'
E0602:338,4: make_waterfall_plots: Undefined variable 'fig'
E0602:344,37: make_waterfall_plots: Undefined variable 'on_source_name'
E0602:344,80: make_waterfall_plots: Undefined variable 'drift_rate'
E0602:488,20: plot_candidate_events_individually: Undefined variable 'Time'
E0602:488,50: plot_candidate_events_individually: Undefined variable 'Time'
R1711:427,0: plot_candidate_events_individually: Useless return at end of function or method
W0611: 89,0: : Unused import glob
W0611: 90,0: : Unused import os
W0611: 91,0: : Unused import sys

Two source files affected:

  1. turbo_seti/find_event/plot_event.py (not so simple)
  2. test/test_turbo_seti.py (simple)

Note also that def plot_candidate_events_individually in turbo_seti/find_event/plot_event.py at line 427
should be def plot_candidate_events which is the invocation name used in turbo_seti/find_event/plot_event_pipeline.py.

Addressed in PR #69