casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
Classes | Functions | Variables
tests.test_split Namespace Reference

Classes

class  SplitChecker
class  split_test_tav
class  split_test_cav
class  split_test_cav5
class  split_test_cdsp
class  split_test_cst
class  split_test_state
class  split_test_cavcd
class  split_test_genericsubtables
class  split_test_singchan
class  split_test_blankov
class  split_test_almapol
class  split_test_unorderedpolspw
class  split_test_sw_and_fc
class  split_test_optswc
class  split_test_tav_then_cvel
class  split_test_wttosig
class  split_test_fc

Functions

def check_eq
def slurp_table
def compare_tables
def suite

Variables

tuple datapath
 testmms
tuple DATADIR

Detailed Description

Unit tests for task split.

Features tested:
  1. Are the POLARIZATION, DATA_DESCRIPTION, and (to some extent) the
     SPECTRAL_WINDOW tables correct with and without correlation selection?
  2. Are the data shapes and values correct with and without correlation
     selection?
  3. Are the WEIGHT and SIGMA shapes and values correct with and without
     correlation selection?
  4. Is a SOURCE table with bogus entries properly handled?
  5. Is the STATE table properly handled?
  6. Are generic subtables copied over?
  7. Are CHAN_WIDTH and RESOLUTION properly handled in SPECTRAL_WINDOW when
     channels are being selected and/or averaged?
  8. The finer points of spw:chan selection.

Note: The time_then_chan_avg regression is a more "end-to-end" test of split.

Function Documentation

def tests.test_split.check_eq (   val,
  expval,
  tol = None 
)
Checks that val matches expval within tol.

Definition at line 46 of file test_split.py.

Referenced by tests.test_split.compare_tables(), tests.test_split.split_test_optswc.test_bbcno_noavg(), tests.test_split.split_test_optswc.test_bbcno_wavg(), tests.test_split.split_test_cdsp.test_bogus_cd_antid(), tests.test_split.split_test_cdsp.test_bogus_cd_spwid(), tests.test_split.split_test_cavcd.test_cavcd(), tests.test_split.split_test_cdsp.test_cd_antid(), tests.test_split.split_test_cdsp.test_cd_spwid(), tests.test_split.split_test_sw_and_fc.test_cf0_noavg(), tests.test_split.split_test_sw_and_fc.test_cf0_wavg(), tests.test_split.split_test_sw_and_fc.test_cf_noavg(), tests.test_split.split_test_sw_and_fc.test_cf_wavg(), tests.test_split.split_test_sw_and_fc.test_cflc_noavg(), tests.test_split.split_test_sw_and_fc.test_cflc_wavg(), tests.test_measures.me_test_cometangdiam.test_cometangdiam(), tests.test_measures.me_test_cometdist.test_cometdist(), tests.test_split.split_test_cst.test_cst(), tests.test_split.split_test_sw_and_fc.test_cw_noavg(), tests.test_split.split_test_sw_and_fc.test_cw_wavg(), tests.test_split.split_test_tav.test_data(), tests.test_split.split_test_cav.test_data(), tests.test_split.split_test_cav5.test_data(), tests.test_split.split_test_tav.test_data_ll(), tests.test_split.split_test_cav.test_data_ll(), tests.test_split.split_test_cav5.test_data_ll(), tests.test_split.split_test_tav.test_data_rllr(), tests.test_split.split_test_tav.test_data_rr(), tests.test_split.split_test_cav.test_data_rr(), tests.test_split.split_test_tav.test_data_rrll(), tests.test_split.split_test_sw_and_fc.test_eb_noavg(), tests.test_split.split_test_sw_and_fc.test_eb_wavg(), tests.test_split.split_test_fc.test_fc_categories(), tests.test_split.split_test_fc.test_fc_cav(), tests.test_split.split_test_sw_and_fc.test_fc_noavg(), tests.test_split.split_test_fc.test_fc_straightselection(), tests.test_split.split_test_fc.test_fc_tav(), tests.test_split.split_test_sw_and_fc.test_fc_wavg(), tests.test_split.split_test_sw_and_fc.test_nchan_noavg(), tests.test_split.split_test_sw_and_fc.test_nchan_wavg(), tests.test_split.split_test_almapol.test_nsid(), tests.test_split.split_test_almapol.test_nspos(), tests.test_split.split_test_cst.test_obs(), tests.test_split.split_test_sw_and_fc.test_res_noavg(), tests.test_split.split_test_sw_and_fc.test_res_wavg(), tests.test_split.split_test_sw_and_fc.test_rf_noavg(), tests.test_split.split_test_sw_and_fc.test_rf_wavg(), tests.test_split.split_test_optswc.test_rightcols_noavg(), tests.test_split.split_test_optswc.test_rightcols_wavg(), tests.test_split.split_test_wttosig.test_sig_cavcorr(), tests.test_split.split_test_wttosig.test_sig_cavdata(), tests.test_split.split_test_wttosig.test_sig_corrtodata(), tests.test_split.split_test_wttosig.test_sig_straightselection(), tests.test_split.split_test_wttosig.test_sig_tavcorr(), tests.test_split.split_test_wttosig.test_sig_tavdata(), tests.test_split.split_test_tav.test_sigma(), tests.test_split.split_test_cav.test_sigma(), tests.test_split.split_test_cav5.test_sigma(), tests.test_split.split_test_tav.test_sigma_ll(), tests.test_split.split_test_cav.test_sigma_ll(), tests.test_split.split_test_cav5.test_sigma_ll(), tests.test_split.split_test_tav.test_sigma_rllr(), tests.test_split.split_test_tav.test_sigma_rr(), tests.test_split.split_test_cav.test_sigma_rr(), tests.test_split.split_test_tav.test_sigma_rrll(), tests.test_split.split_test_singchan.test_singchan(), tests.test_split.split_test_state.test_state(), tests.test_split.split_test_tav_then_cvel.test_tav_data(), tests.test_split.split_test_tav_then_cvel.test_tav_int(), tests.test_split.split_test_tav_then_cvel.test_tav_scan(), tests.test_split.split_test_tav_then_cvel.test_tav_state_id(), tests.test_split.split_test_tav_then_cvel.test_tav_time(), tests.test_split.split_test_tav_then_cvel.test_tav_wt(), tests.test_split.split_test_sw_and_fc.test_tb_noavg(), tests.test_split.split_test_sw_and_fc.test_tb_wavg(), tests.test_split.split_test_tav.test_wt(), tests.test_split.split_test_cav.test_wt(), tests.test_split.split_test_cav5.test_wt(), tests.test_split.split_test_wttosig.test_wt_cavcorr(), tests.test_split.split_test_wttosig.test_wt_cavdata(), tests.test_split.split_test_wttosig.test_wt_corrtodata(), tests.test_split.split_test_tav.test_wt_ll(), tests.test_split.split_test_cav.test_wt_ll(), tests.test_split.split_test_cav5.test_wt_ll(), tests.test_split.split_test_tav.test_wt_rllr(), tests.test_split.split_test_tav.test_wt_rr(), tests.test_split.split_test_cav.test_wt_rr(), tests.test_split.split_test_tav.test_wt_rrll(), tests.test_split.split_test_wttosig.test_wt_straightselection(), tests.test_split.split_test_wttosig.test_wt_tavcorr(), and tests.test_split.split_test_wttosig.test_wt_tavdata().

def tests.test_split.compare_tables (   tabname,
  exptabname,
  tol = None 
)
Raises a ValueError if the contents of tabname are not the same as those
of exptabname to within tol.

Definition at line 99 of file test_split.py.

References tests.test_split.check_eq(), asap.asapmath.keys, and tests.test_split.slurp_table().

def tests.test_split.slurp_table (   tabname)
Returns a dictionary containing the CASA table tabname.  The dictionary
is arranged like:

{'keywords': tb.getkeywords(),
 'cols': {colname0, {'desc': tb.getcoldesc(colname0),
                     'keywords': tb.getcolkeywords(colname0),
                     'data': tb.getcol(colname0)},
          colname1, {'desc': tb.getcoldesc(colname1),
                         'keywords': tb.getcolkeywords(colname1),
                     'data': tb.getcol(colname1)},
          ...}}

Definition at line 70 of file test_split.py.

Referenced by tests.test_split.compare_tables().

Definition at line 1811 of file test_split.py.


Variable Documentation

Definition at line 39 of file test_split.py.

Definition at line 33 of file test_split.py.

Definition at line 36 of file test_split.py.