Public Member Functions | |
def | __init__ |
def | set_data |
def | set_frequency |
def | set_dirtol |
def | set_shift |
def | set_both |
def | set_limit |
def | set_solve_other |
def | separate |
Public Attributes | |
intables | |
signalShift | |
imageShift | |
dsbmode | |
getboth | |
rejlimit | |
baseif | |
define self.tables, self.signalShift, and self.imageShift | |
freqtol | |
freqframe | |
solveother | |
dirtol | |
tables | |
nshift | |
nchan | |
Private Member Functions | |
def | _reset_data |
def | _reset_if |
def | _solve_signal |
def | _solve_image |
def | _grid_outtable |
def | _get_specarray |
def | _setup_shift |
def | _preprocess_tables |
def | _Deconvolution |
def | _combineResult |
def | _subtractOtherSide |
def | _shiftSpectrum |
The sbseparator class is defined to separate SIGNAL and IMAGE sideband spectra observed by frequency-switching technique. It also helps supressing emmission of IMAGE sideband. *** WARNING *** THIS MODULE IS EXPERIMENTAL Known issues: - Frequencies of IMAGE sideband cannot be reconstructed from information in scantable in sideband sparation. Frequency setting of SIGNAL sideband is stored in output table for now. - Flag information (stored in FLAGTRA) is ignored. Example: # Create sideband separator instance whith 3 input data sbsep = sbseparator(['test1.asap', 'test2.asap', 'test3.asap']) # Set reference IFNO and tolerance to select data sbsep.set_frequency(5, 30, frame='TOPO') # Set direction tolerance to select data in unit of radian sbsep.set_dirtol(1.e-5) # Set rejection limit of solution sbsep.set_limit(0.2) # Solve image sideband as well sbsep.set_both(True) # Invoke sideband separation sbsep.separate('testout.asap', overwrite = True)
Definition at line 13 of file sbseparator.py.
def asap.sbseparator.sbseparator.__init__ | ( | self, | |
infiles | |||
) |
Definition at line 39 of file sbseparator.py.
def asap.sbseparator.sbseparator._combineResult | ( | self, | |
ifftObs | |||
) | [private] |
Definition at line 603 of file sbseparator.py.
Referenced by asap.sbseparator.sbseparator._solve_image(), and asap.sbseparator.sbseparator._solve_signal().
def asap.sbseparator.sbseparator._Deconvolution | ( | self, | |
data_array, | |||
shift, | |||
threshold = 0.00000001 |
|||
) | [private] |
Definition at line 579 of file sbseparator.py.
References asap.sbseparator.sbseparator.nchan, and asap.asapgrid._SDGridPlotter.nchan.
Referenced by asap.sbseparator.sbseparator._solve_image(), and asap.sbseparator.sbseparator._solve_signal().
def asap.sbseparator.sbseparator._get_specarray | ( | self, | |
polid = None , |
|||
beamid = None , |
|||
dir = None |
|||
) | [private] |
Definition at line 361 of file sbseparator.py.
References asap.sbseparator.sbseparator.dirtol, asap.sbseparator.sbseparator.nchan, asap.asapgrid._SDGridPlotter.nchan, and asap.sbseparator.sbseparator.tables.
Referenced by asap.sbseparator.sbseparator.separate().
def asap.sbseparator.sbseparator._grid_outtable | ( | self, | |
table | |||
) | [private] |
Definition at line 338 of file sbseparator.py.
References asap.sbseparator.sbseparator.baseif, asap.sbseparator.sbseparator.dirtol, and irc_cs_task_regression.max.
Referenced by asap.sbseparator.sbseparator.separate().
def asap.sbseparator.sbseparator._preprocess_tables | ( | self | ) | [private] |
Definition at line 556 of file sbseparator.py.
References asap.asapmath.average_time(), and asap.sbseparator.sbseparator.tables.
def asap.sbseparator.sbseparator._reset_data | ( | self | ) | [private] |
Definition at line 93 of file sbseparator.py.
References asap.sbseparator.sbseparator.intables, asap.sbseparator.sbseparator.nchan, asap.asapgrid._SDGridPlotter.nchan, asap.sbseparator.sbseparator.nshift, asap.sbseparator.sbseparator.signalShift, and asap.sbseparator.sbseparator.tables.
Referenced by asap.sbseparator.sbseparator.set_data().
def asap.sbseparator.sbseparator._reset_if | ( | self | ) | [private] |
Definition at line 133 of file sbseparator.py.
References asap.sbseparator.sbseparator.baseif, asap.sbseparator.sbseparator.freqframe, asap.sbseparator.sbseparator.freqtol, asap.sbseparator.sbseparator.nchan, asap.asapgrid._SDGridPlotter.nchan, asap.sbseparator.sbseparator.nshift, asap.sbseparator.sbseparator.signalShift, and asap.sbseparator.sbseparator.tables.
Referenced by asap.sbseparator.sbseparator.set_frequency().
def asap.sbseparator.sbseparator._setup_shift | ( | self | ) | [private] |
Definition at line 420 of file sbseparator.py.
References asap.sbseparator.sbseparator.baseif, asap.sbseparator.sbseparator.dsbmode, asap.sbseparator.sbseparator.freqframe, asap.sbseparator.sbseparator.freqtol, asap.sbseparator.sbseparator.imageShift, asap.sbseparator.sbseparator.intables, asap.sbseparator.sbseparator.nchan, asap.asapgrid._SDGridPlotter.nchan, asap.sbseparator.sbseparator.nshift, asap.sbseparator.sbseparator.signalShift, and asap.sbseparator.sbseparator.tables.
Referenced by asap.sbseparator.sbseparator.separate().
def asap.sbseparator.sbseparator._shiftSpectrum | ( | self, | |
data, | |||
Shift | |||
) | [private] |
Definition at line 618 of file sbseparator.py.
References asap.sbseparator.sbseparator.nchan, and asap.asapgrid._SDGridPlotter.nchan.
Referenced by asap.sbseparator.sbseparator._solve_image(), asap.sbseparator.sbseparator._solve_signal(), and asap.sbseparator.sbseparator._subtractOtherSide().
def asap.sbseparator.sbseparator._solve_image | ( | self, | |
data, | |||
tabidx = None |
|||
) | [private] |
Definition at line 312 of file sbseparator.py.
References asap.sbseparator.sbseparator._combineResult(), asap.sbseparator.sbseparator._Deconvolution(), asap.sbseparator.sbseparator._shiftSpectrum(), asap.sbseparator.sbseparator._subtractOtherSide(), asap.sbseparator.sbseparator.imageShift, asap.sbseparator.sbseparator.rejlimit, asap.sbseparator.sbseparator.signalShift, and asap.sbseparator.sbseparator.solveother.
Referenced by asap.sbseparator.sbseparator.separate().
def asap.sbseparator.sbseparator._solve_signal | ( | self, | |
data, | |||
tabidx = None |
|||
) | [private] |
Definition at line 286 of file sbseparator.py.
References asap.sbseparator.sbseparator._combineResult(), asap.sbseparator.sbseparator._Deconvolution(), asap.sbseparator.sbseparator._shiftSpectrum(), asap.sbseparator.sbseparator._subtractOtherSide(), asap.sbseparator.sbseparator.imageShift, asap.sbseparator.sbseparator.rejlimit, asap.sbseparator.sbseparator.signalShift, and asap.sbseparator.sbseparator.solveother.
Referenced by asap.sbseparator.sbseparator.separate().
def asap.sbseparator.sbseparator._subtractOtherSide | ( | self, | |
data_array, | |||
shift, | |||
Data | |||
) | [private] |
Definition at line 610 of file sbseparator.py.
References asap.sbseparator.sbseparator._shiftSpectrum().
Referenced by asap.sbseparator.sbseparator._solve_image(), and asap.sbseparator.sbseparator._solve_signal().
def asap.sbseparator.sbseparator.separate | ( | self, | |
outname = "" , |
|||
overwrite = False |
|||
) |
Invoke sideband separation. outname : a name of output scantable overwrite : overwrite existing table
Definition at line 218 of file sbseparator.py.
References asap.sbseparator.sbseparator._get_specarray(), asap.sbseparator.sbseparator._grid_outtable(), asap.sbseparator.sbseparator._setup_shift(), asap.sbseparator.sbseparator._solve_image(), asap.sbseparator.sbseparator._solve_signal(), asap.sbseparator.sbseparator.getboth, and asap.sbseparator.sbseparator.tables.
def asap.sbseparator.sbseparator.set_both | ( | self, | |
flag = False |
|||
) |
Resolve both image and signal sideband when True.
Definition at line 186 of file sbseparator.py.
References asap.sbseparator.sbseparator.getboth.
def asap.sbseparator.sbseparator.set_data | ( | self, | |
infiles | |||
) |
Set data to be processed. infiles : a list of filenames or scantables
Definition at line 61 of file sbseparator.py.
References asap.sbseparator.sbseparator._reset_data(), and asap.sbseparator.sbseparator.intables.
def asap.sbseparator.sbseparator.set_dirtol | ( | self, | |
dirtol = [1.e-5 , |
|||
e | |||
) |
Set tolerance of direction to select data
Definition at line 144 of file sbseparator.py.
References asap.sbseparator.sbseparator.dirtol.
def asap.sbseparator.sbseparator.set_frequency | ( | self, | |
baseif, | |||
freqtol, | |||
frame = "" |
|||
) |
Set IFNO and frequency tolerance to select data to process. Parameters: - reference IFNO to process in the first table in the list - frequency tolerance from reference IF to select data frame : frequency frame to select IF
Definition at line 103 of file sbseparator.py.
References asap.sbseparator.sbseparator._reset_if(), asap.sbseparator.sbseparator.baseif, asap.sbseparator.sbseparator.freqframe, and asap.sbseparator.sbseparator.freqtol.
def asap.sbseparator.sbseparator.set_limit | ( | self, | |
threshold = 0.2 |
|||
) |
Set rejection limit of solution.
Definition at line 197 of file sbseparator.py.
References asap.sbseparator.sbseparator.rejlimit.
def asap.sbseparator.sbseparator.set_shift | ( | self, | |
mode = "DSB" , |
|||
imageshift = None |
|||
) |
Set shift mode and channel shift of image band. mode : shift mode ['DSB'|'SSB'] When mode='DSB', imageshift is assumed to be equal to the shift of signal sideband but in opposite direction. imageshift : a list of number of channel shift in image band of each scantable. valid only mode='SSB'
Definition at line 164 of file sbseparator.py.
References asap.sbseparator.sbseparator.dsbmode, and asap.sbseparator.sbseparator.imageShift.
def asap.sbseparator.sbseparator.set_solve_other | ( | self, | |
flag = False |
|||
) |
Calculate spectra by subtracting the solution of the other sideband when True.
Definition at line 207 of file sbseparator.py.
References asap.sbseparator.sbseparator.solveother.
define self.tables, self.signalShift, and self.imageShift
Definition at line 46 of file sbseparator.py.
Referenced by asap.sbseparator.sbseparator._grid_outtable(), asap.sbseparator.sbseparator._reset_if(), asap.sbseparator.sbseparator._setup_shift(), and asap.sbseparator.sbseparator.set_frequency().
Definition at line 50 of file sbseparator.py.
Referenced by asap.sbseparator.sbseparator._get_specarray(), asap.sbseparator.sbseparator._grid_outtable(), and asap.sbseparator.sbseparator.set_dirtol().
Definition at line 43 of file sbseparator.py.
Referenced by asap.sbseparator.sbseparator._setup_shift(), and asap.sbseparator.sbseparator.set_shift().
Definition at line 48 of file sbseparator.py.
Referenced by asap.sbseparator.sbseparator._reset_if(), asap.sbseparator.sbseparator._setup_shift(), and asap.sbseparator.sbseparator.set_frequency().
Definition at line 47 of file sbseparator.py.
Referenced by asap.sbseparator.sbseparator._reset_if(), asap.sbseparator.sbseparator._setup_shift(), and asap.sbseparator.sbseparator.set_frequency().
Definition at line 44 of file sbseparator.py.
Referenced by asap.sbseparator.sbseparator.separate(), and asap.sbseparator.sbseparator.set_both().
Definition at line 42 of file sbseparator.py.
Referenced by asap.sbseparator.sbseparator._setup_shift(), asap.sbseparator.sbseparator._solve_image(), asap.sbseparator.sbseparator._solve_signal(), and asap.sbseparator.sbseparator.set_shift().
Definition at line 40 of file sbseparator.py.
Referenced by asap.sbseparator.sbseparator._reset_data(), asap.sbseparator.sbseparator._setup_shift(), and asap.sbseparator.sbseparator.set_data().
Definition at line 54 of file sbseparator.py.
Referenced by asap.scantable.scantable.__setitem__(), asap.scantable.scantable._check_ifs(), asap.sbseparator.sbseparator._Deconvolution(), asap.sbseparator.sbseparator._get_specarray(), asap.sbseparator.sbseparator._reset_data(), asap.sbseparator.sbseparator._reset_if(), asap.sbseparator.sbseparator._setup_shift(), asap.sbseparator.sbseparator._shiftSpectrum(), asap.scantable.scantable.fft(), asap.scantable.scantable.parse_maskexpr(), tests.test_cleanhelper.cleanhelper_test.run_defineimages(), asap.scantable.scantable.set_spectrum(), and tests.test_cleanhelper.cleanhelper_test.testDefineimages().
Definition at line 53 of file sbseparator.py.
Referenced by asap.sbseparator.sbseparator._reset_data(), asap.sbseparator.sbseparator._reset_if(), and asap.sbseparator.sbseparator._setup_shift().
Definition at line 45 of file sbseparator.py.
Referenced by asap.sbseparator.sbseparator._solve_image(), asap.sbseparator.sbseparator._solve_signal(), and asap.sbseparator.sbseparator.set_limit().
Definition at line 41 of file sbseparator.py.
Referenced by asap.sbseparator.sbseparator._reset_data(), asap.sbseparator.sbseparator._reset_if(), asap.sbseparator.sbseparator._setup_shift(), asap.sbseparator.sbseparator._solve_image(), and asap.sbseparator.sbseparator._solve_signal().
Definition at line 49 of file sbseparator.py.
Referenced by asap.sbseparator.sbseparator._solve_image(), asap.sbseparator.sbseparator._solve_signal(), and asap.sbseparator.sbseparator.set_solve_other().
Definition at line 52 of file sbseparator.py.
Referenced by asap.sbseparator.sbseparator._get_specarray(), asap.sbseparator.sbseparator._preprocess_tables(), asap.sbseparator.sbseparator._reset_data(), asap.sbseparator.sbseparator._reset_if(), asap.sbseparator.sbseparator._setup_shift(), gprof2dot.AQtimeParser.parse_data(), gprof2dot.AQtimeParser.parse_table_header(), and asap.sbseparator.sbseparator.separate().