Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#289 closed defect (feedback)

Add ability to modify Tsys values

Reported by: Andrew Walsh <andrew.walsh@…> Owned by: Malte Marquarding
Priority: normal Milestone: Unified development
Component: General Version: 2.0
Severity: major Keywords:
Cc:

Description

Hi there, I have come up against a limitation in ASAP. I am trying to manually input a Tsys value into a scantable. This sort of thing would be easy to do in miriad with something like puthd in=scantable/tsys value=25.1

Can something be implemented so that essential values including Tsys can be manually edited?

Thanks!

Later. Andrew xxx

Change History (7)

comment:1 Changed 11 years ago by Malte Marquarding

Andrew what would be the (scientific) use case? If you want to modify it with the spectrum use scantable.scale. If it is wrong just use non-Tsys base weight in average_time.

comment:2 Changed 11 years ago by Andrew Walsh <andrew.walsh@…>

The scientific use is as follows:

Apparently the Tsys measurement on Parkes fails for a single integration and a (very) wrong number is written for the Tsys value. This is a problem for the reference scans. Our reference observations are made up of 15 individual cycles. These 15 cycles are averaged together before being used to quotient the source spectra. We prefer to use mean averaging, rather than median averaging, as it gives a slightly lower noise in the reference spectrum. The problem is that if there is one Tsys measurement that is out of whack and we mean average, the averaged Tsys is also out of whack. The solution is to median average the individual Tsys values. But as I said, we prefer to mean average the spectra. And when you mean average the spectra, you mean average the Tsys values as well.

I was hoping to implement a workaround along the lines of:

listOfScantables=[] for i in range(s.nscan()):

sel.set_scans(i) s.set_selection(sel) s.get_scan('*_R') medtsys = np.median(s.get_tsys()) listOfScantables.append(s.average_time()) s.set_tsys(medtsys)

The last line is the one that won't work.

comment:3 Changed 11 years ago by Malte Marquarding

Owner: changed from Malte Marquarding to Malte Marquarding
Status: newassigned
Summary: Need to input information into scantableAdd ability to modify Tsys values

comment:4 Changed 11 years ago by Malte Marquarding

Andrew, to post code sample in the tickets enclose them in triple curly brackets - {{{mycode}}}. That makes it easier to read.

comment:5 Changed 11 years ago by Andrew Walsh <andrew.walsh@…>

Ewww, it does look ugly. Hopefully this works.

listOfScantables=[]
for i in range(s.nscan()):sel.set_scans(i)
    s.set_selection(sel) 
    s.get_scan('*_R') 
    medtsys = np.median(s.get_tsys()) 
    listOfScantables.append(s.average_time()) 
    s.set_tsys(medtsys)

Yaaaayyy! But I did have to play around with this. Looks like you have to have the triple-curlies on a line on their own.

comment:6 Changed 11 years ago by Malte Marquarding

Resolution: feedback
Status: assignedclosed

r2791 adds this capability. See help(scantable.set_tsys).

comment:7 Changed 11 years ago by Malte Marquarding

This is now released as asap-4.1.1-1 on brage.

Note: See TracTickets for help on using tickets.