Opened 13 years ago
Closed 13 years ago
#260 closed question (wontfix)
asap v4.0 list vs float TypeError with return from scan.get_restfreqs()
Reported by: | StacyMader | Owned by: | Malte Marquarding |
---|---|---|---|
Priority: | normal | Milestone: | Unified development |
Component: | General | Version: | 2.0 |
Severity: | normal | Keywords: | |
Cc: |
Description
After upgrading to ASAP 4.0, running a script reported the following:
Leopard libedit detected. Found AT???? data. Importing 20111118/2011-11-18_0338-P000_SPOT_3100.rpf...
TypeError Traceback (most recent call last)
/Users/mad134/Home/pyspot/proc.py in <module>()
89 errmsg('Will only process the first four scans.') 90
---> 91 if(nu/1.0e9 >= 12.0):
92 Diam = 54.5 # Parkes aperture [m] 93 else:
TypeError: unsupported operand type(s) for /: 'list' and 'float'
The parameter nu is defined as nu = sc.get_restfreqs()[0]. ASAP reports this as:
In [2]: scan.get_restfreqs()[0] Out[2]: [3100000000.0]
So nu is now returned as a list instead of a float as per the previous version of ASAP. Is this a bug or by design in the new version?
Multiple rest frequencies (per IF) have been introduced. You will need to change your code.