| 1 | It appears that asap has some way of marking scans as bad not
|
|---|
| 2 | and including them in the summary. However, the scans are in the
|
|---|
| 3 | scantable. From a 50 row SDFITS bintable::
|
|---|
| 4 |
|
|---|
| 5 | In [1]: len(s_table.get_sourcename())
|
|---|
| 6 | Out[1]: 50
|
|---|
| 7 |
|
|---|
| 8 | In [2]: np.array(s_table.get_sourcename())
|
|---|
| 9 | Out[2]:
|
|---|
| 10 | array(['n159 D', 'n159 D', 'G309.92', 'N159 C', 'N159 C', 'N159 C',
|
|---|
| 11 | 'N159 C', 'N159 C', 'N159 C', 'N159 A', '0637-752', '0637-752',
|
|---|
| 12 | '0637-752', '0637-752', 'G309.92', 'G309.92', 'G309.92', 'G309.92',
|
|---|
| 13 | '1226+023', 'G339.88', 'G339.88', 'G339.88', 'G339.88', 'G188.95',
|
|---|
| 14 | 'G188.95', 'G188.95', 'G323.74', 'G323.74', 'SGR B2', 'SGR B2',
|
|---|
| 15 | 'SGR B2', 'SGR B2', 'G1.6', 'G1.6', 'G1.6', 'G1.6', 'SGR AB',
|
|---|
| 16 | 'SGR AB', 'SGR A 2E0N', 'Sgr A meth pk1', 'Sgr A meth pk1', '30dor',
|
|---|
| 17 | 'lmc-co-1', 'lmc-co-1', 'lmc-co-1', 'lmc-co-1', 'lmc-co-1',
|
|---|
| 18 | 'lmc-co-1', 'lmc-co-1', 'lmc-co-1'],
|
|---|
| 19 | dtype='|S14')
|
|---|
| 20 |
|
|---|
| 21 | In [3]: s_table.data.field('OBJECT')
|
|---|
| 22 | Out[3]:
|
|---|
| 23 | chararray(['n159 D', 'n159 D', 'G309.92', 'N159 C', 'N159 C', 'N159 C',
|
|---|
| 24 | 'N159 C', 'N159 C', 'N159 C', 'N159 A', '0637-752', '0637-752',
|
|---|
| 25 | '0637-752', '0637-752', 'G309.92', 'G309.92', 'G309.92', 'G309.92',
|
|---|
| 26 | '1226+023', 'G339.88', 'G339.88', 'G339.88', 'G339.88', 'G188.95',
|
|---|
| 27 | 'G188.95', 'G188.95', 'G323.74', 'G323.74', 'SGR B2', 'SGR B2',
|
|---|
| 28 | 'SGR B2', 'SGR B2', 'G1.6', 'G1.6', 'G1.6', 'G1.6', 'SGR AB',
|
|---|
| 29 | 'SGR AB', 'SGR A 2E0N', 'Sgr A meth pk1', 'Sgr A meth pk1', '30dor',
|
|---|
| 30 | 'lmc-co-1', 'lmc-co-1', 'lmc-co-1', 'lmc-co-1', 'lmc-co-1',
|
|---|
| 31 | 'lmc-co-1', 'lmc-co-1', 'lmc-co-1'],
|
|---|
| 32 | dtype='|S16')
|
|---|
| 33 |
|
|---|
| 34 | So the scantable.get_sourcename() agrees with the SDFITS extension.
|
|---|
| 35 | Likewise, the other gets give the right number of values::
|
|---|
| 36 |
|
|---|
| 37 | In [7]: len(s_table.get_azimuth())
|
|---|
| 38 | Out[7]: 50
|
|---|
| 39 |
|
|---|
| 40 | In [8]: len(s_table.get_direction())
|
|---|
| 41 | Out[8]: 50
|
|---|
| 42 |
|
|---|
| 43 | In [9]: len(s_table.get_inttime())
|
|---|
| 44 | Out[9]: 50
|
|---|
| 45 |
|
|---|
| 46 | In [10]: len(s_table.get_time())
|
|---|
| 47 | Out[10]: 50
|
|---|
| 48 |
|
|---|
| 49 | In [11]: len(s_table.get_tsys())
|
|---|
| 50 | Out[11]: 50
|
|---|
| 51 |
|
|---|
| 52 | In [12]: len(s_table.getscannos())
|
|---|
| 53 | Out[12]: 45
|
|---|
| 54 |
|
|---|
| 55 | In [16]: np.array(s_table.getscannos())
|
|---|
| 56 | Out[16]:
|
|---|
| 57 | array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
|
|---|
| 58 | 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
|
|---|
| 59 | 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
|
|---|
| 60 | 30, 31, 32, 33, 34, 39,
|
|---|
| 61 | 43, 44, 45, 46, 47, 48, 49,
|
|---|
| 62 | 50, 51])
|
|---|
| 63 |
|
|---|
| 64 | In [18]: s35 = s_table.get_scan([35])
|
|---|
| 65 | Couldn't find any match.
|
|---|
| 66 |
|
|---|
| 67 | In [19]: s51 = s_table.get_scan([51])
|
|---|
| 68 |
|
|---|
| 69 | In [20]:
|
|---|
| 70 |
|
|---|
| 71 | These absent scans cannot be extracted and are missing from
|
|---|
| 72 | s_table.summary(). Also, there are fanthom scan numbers in
|
|---|
| 73 | the sense that 50 scans counted from 0 should end at 49.
|
|---|
| 74 | So we can't use the above scan numbers to index into the arrays
|
|---|
| 75 | of the scantable.
|
|---|
| 76 |
|
|---|
| 77 | Here's the clue::
|
|---|
| 78 |
|
|---|
| 79 | In [22]: for i in s_table.getscannos():
|
|---|
| 80 | ....: s = s_table.get_scan([i])
|
|---|
| 81 | ....: print i, s.get_sourcename()
|
|---|
| 82 | ....:
|
|---|
| 83 | 0 ['n159 D']
|
|---|
| 84 | 1 ['n159 D']
|
|---|
| 85 | 2 ['G309.92']
|
|---|
| 86 | 3 ['N159 C']
|
|---|
| 87 | 4 ['N159 C']
|
|---|
| 88 | 5 ['N159 C']
|
|---|
| 89 | 6 ['N159 C']
|
|---|
| 90 | 7 ['N159 C']
|
|---|
| 91 | 8 ['N159 C']
|
|---|
| 92 | 9 ['N159 A']
|
|---|
| 93 | 10 ['0637-752', '0637-752', 'G309.92']
|
|---|
| 94 | 11 ['0637-752', 'G309.92', 'G309.92']
|
|---|
| 95 | 12 ['0637-752', 'G309.92']
|
|---|
| 96 | 13 ['1226+023']
|
|---|
| 97 | 14 ['G339.88']
|
|---|
| 98 | 15 ['G339.88']
|
|---|
| 99 | 16 ['G339.88']
|
|---|
| 100 | 17 ['G339.88']
|
|---|
| 101 | 18 ['G188.95']
|
|---|
| 102 | 19 ['G188.95']
|
|---|
| 103 | 20 ['G188.95']
|
|---|
| 104 | 21 ['G323.74']
|
|---|
| 105 | 22 ['G323.74']
|
|---|
| 106 | 23 ['SGR B2']
|
|---|
| 107 | 24 ['SGR B2']
|
|---|
| 108 | 25 ['SGR B2']
|
|---|
| 109 | 26 ['SGR B2']
|
|---|
| 110 | 27 ['G1.6']
|
|---|
| 111 | 28 ['G1.6']
|
|---|
| 112 | 29 ['G1.6']
|
|---|
| 113 | 30 ['G1.6']
|
|---|
| 114 | 31 ['SGR AB']
|
|---|
| 115 | 32 ['SGR AB']
|
|---|
| 116 | 33 ['SGR A 2E0N']
|
|---|
| 117 | 34 ['Sgr A meth pk1']
|
|---|
| 118 | 39 ['Sgr A meth pk1']
|
|---|
| 119 | 43 ['30dor']
|
|---|
| 120 | 44 ['lmc-co-1']
|
|---|
| 121 | 45 ['lmc-co-1']
|
|---|
| 122 | 46 ['lmc-co-1']
|
|---|
| 123 | 47 ['lmc-co-1']
|
|---|
| 124 | 48 ['lmc-co-1']
|
|---|
| 125 | 49 ['lmc-co-1']
|
|---|
| 126 | 50 ['lmc-co-1']
|
|---|
| 127 | 51 ['lmc-co-1']
|
|---|
| 128 |
|
|---|
| 129 | Aha! Fetching scan by number for 10, 11 and 12 returns scantables
|
|---|
| 130 | with more than one row. Eight scans in three scantables reduces
|
|---|
| 131 | the number of rows by five. Why should some rows be combined into
|
|---|
| 132 | mini-scantables?
|
|---|
| 133 |
|
|---|
| 134 | In [23]: s10 = s_table.get_scan([10])
|
|---|
| 135 |
|
|---|
| 136 | In [25]: s10.get_direction()
|
|---|
| 137 | Out[25]: ['06:37:23.5 -75.13.36.8', '00:00:00.0 +00.00.00.0', '06:37:23.5 -61.20.17.2']
|
|---|
| 138 |
|
|---|
| 139 | In [26]: s11 = s_table.get_scan([11])
|
|---|
| 140 |
|
|---|
| 141 | In [27]: s11.get_direction()
|
|---|
| 142 | Out[27]: ['06:37:23.5 -75.13.36.8', '13:47:13.6 -61.20.17.2', '06:37:23.5 -61.20.17.2']
|
|---|
| 143 |
|
|---|
| 144 | In [28]: s12 = s_table.get_scan([12])
|
|---|
| 145 |
|
|---|
| 146 | In [29]: s12.get_direction()
|
|---|
| 147 | Out[29]: ['06:37:23.5 -75.13.36.8', '06:37:23.5 -61.20.17.2']
|
|---|