Opened 12 years ago

Last modified 11 years ago

#291 assigned defect

alignment error for Tid data

Reported by: Malte Marquarding Owned by: Malte Marquarding
Priority: normal Milestone: Unified development
Component: General Version: 2.0
Severity: normal Keywords:
Cc: G.Wong@…

Description

The NH3 features of the averaged spectrum after processing don't line up. There is a shift of approx 50km/s. It looks like an issue with frequency alignment of data from several epochs.

The follow is the process before merging

a1 = sd.scantable('2011_260_t199/2011-09-17_074510_T199.rpf') # lupus tid 2011 260 some bad scans, but 1,1 and 2,2 present LupIR
a2 = sd.scantable('2011_260_t199/2011-09-17_083236_T199.rpf') # lupus tid 2011 260 nothing LupIR
a3 = sd.scantable('2011_260_t199/2011-09-17_092613_T199.rpf') # lupus tid 2011 260 mostly nothing with 1 scan with 2,2 LupIR (0-25) and LupINW (26-42)
a4 = sd.scantable('2012_087_t199/2012-03-27_194022_T199.rpf') # lupus tid 2012 087 some 1,1 (LupIR, only one scan)
a5Scan = sd.scantable('2012_091_t199/2012-03-31_182325_T199.rpf') # lupus tid 2012 091 noisy but some 1,1 transition LupINW (0-8) LupISE (9-34) LupISW (35-84)  LupIIIMMS (85-109) LupIIIS (110-134) LupIIIN(135-159) LupIV(160-182)
a5 = a5Scan.get_scan(range(0,85))
a6 = sd.scantable('2012_092_t199/2012-04-01_185240_T199.rpf') # lupus tid 2012 092 bad start, nothing det LISW
a7 = sd.scantable('2012_092_t199/2012-04-01_203555_T199.rpf') # lupus tid 2012 092 1,1 overall noise is bad LupIR (0,1)  LupISW (2 scan)
a8Scan = sd.scantable('2012_099_t199/2012-04-08_182004_T199.rpf') # lupus tid 2012 099 good noise lvl, few 1,1 and one 2,2 last scan bit dodgy LupIR (0-1) LupISW (2-7)  LupIIIMMS(8-21)
a8 = a8Scan.get_scan(range(0,7))
a9 = sd.scantable('2012_172_t199/2012-06-20_095048_T199.rpf') # lupus tid 2012 172 Lupus I NW (0-7) central hyperfine detected 2 scans (LupINW01-02)
a10 = sd.scantable('2012_172_t199/2012-06-20_101136_T199.rpf') # lupus tid 2012 172 Lupus I NW (0-17) and SE (18-35), possible central hyperfine detected.
a11 = sd.scantable('2012_182_t199/2012-06-30_165737_T199.rpf') # lupus tid 2012 182 no detection covering LupISE (0-6) and SW (7-36)
a12 = sd.scantable('2012_209_t199/2012-07-27_150854_T199.rpf') # lupus tid 2012 209 LupI SW only one scan src
a13 = sd.scantable('2012_209_t199/2012-07-27_151516_T199.rpf') # lupus tid 2012 209 LupI SW 0-14 nothing
a14Scan = sd.scantable('2012_209_t199/2012-07-27_154021_T199.rpf') # lupus tid 2012 209 LupI SW 0-19 Lup3MMS 20-40 (scan 39-33 1,1 dectection)
a14 = a14Scan.get_scan(range(0,19))
a15 = sd.scantable('2012_251_t199/2012-09-07_112832_T199.rpf') # lupus tid 2012 251 Lupus IR reasonable 1,1 detection
a16 = sd.scantable('2012_251_t199/2012-09-07_114049_T199.rpf') # lupus tid 2012 251 Lupus IR (0,1) detection 1,1 and 2,2 and sw
a17 = sd.scantable('2012_251_t199/2012-09-07_115617_T199.rpf') # lupus tid 2012 251 Lupus IR

#the arrays you want to process separately and merge
arrayScan = [a1,a2,a3,a4,a6,a7,a8,a9,a10,a11,a13,a14,a15,a16,a17]
qArray = []#leave this blank for merging the scan tables
counter = 0#counter for naming convention
for i in arrayScan:
qString = 'q'+str(counter)#naming convention for the qArray and merging scan tabled
qString = i.auto_quotient()# Make the quotient spectra
qString.set_freqframe('LSRK')# Plot/select in velocity
qString.set_unit('km/s')
# Correct for gain/el effects
qString.recalc_azel()# Tid does not write the elevation
qString.gain_el()
qString.opacity(0.05)
qString.freq_align()
qArray.append(qString)#need this for merging the scanTables
counter = counter + 1


totalScan = sd.merge(qArray) #merging the scan tables
print(totalScan)
totalScan.set_restfreqs([23694.4700e6]) # 1,1 dectection
cropScan = totalScan.average_pol()
msk = cropScan.create_mask([-100,-70],[70,100])
cropScan.poly_baseline(mask=msk, order=1)
sd.plotter.plot(cropScan)
sd.plotter.set_layout(4,4) #change the format of plotter.plot
sd.plotter.set_histogram()
sd.plotter.plot(cropScan)
cropScan.auto_poly_baseline()
sd.plotter.plot()

Attachments (1)

align_bug.asap.tar.bz2 (58.8 KB ) - added by Malte Marquarding 12 years ago.
merged data

Download all attachments as: .zip

Change History (3)

by Malte Marquarding, 12 years ago

Attachment: align_bug.asap.tar.bz2 added

merged data

comment:1 by Malte Marquarding, 12 years ago

Status: newassigned

comment:2 by Malte Marquarding, 11 years ago

This came up again with other (parkes) data .

In that case it turns out that the sources weren't named consistently which is a requirement for freq_align. This is the only way asap decides on the position to align to. Otherwise it treats these separately and dones't align theses in velocity space.

Please check that the source names are identical get_sourcename)

I will add a method scantable.set_sourcename to be able to overwite incorrectly named scans.

Note: See TracTickets for help on using tickets.