Changeset 1165 for trunk/python
- Timestamp:
- 08/22/06 12:52:53 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asapplotter.py
r1164 r1165 419 419 location: the location of the line annotation from the 'top', 420 420 'bottom' or alternate (None - the default) 421 Notes: 422 If the spectrum is flagged no line will be drawn in that location. 421 423 """ 422 424 if not self._data: return … … 430 432 lims = self._plotter.axes.get_xlim() 431 433 for row in range(linecat.nrow()): 432 freq = linecat.get_frequency(row)/1000.0 + offset 434 restf = linecat.get_frequency(row)/1000.0 435 c = 299792.458 436 freq = restf*(doppler+c)/c 433 437 if lims[0] < freq < lims[1]: 434 438 if location is None: … … 461 465 s = slice(lower, upper) 462 466 y = line._y_orig[s] 463 maxys.append(ma.maximum(y)) 467 maxy = ma.maximum(y) 468 if isinstance( maxy, float): 469 maxys.append(maxy) 464 470 if len(maxys): 465 471 peak = max(maxys) 472 if peak > self._plotter.axes.get_ylim()[1]: 473 loc = 'bottom' 466 474 else: 467 print "DEBUG - ignoring line as spectrum was masked at this frequency"468 475 continue 476 print freq,peak 469 477 self._plotter.vline_with_label(freq, peak, 470 478 linecat.get_name(row),
Note:
See TracChangeset
for help on using the changeset viewer.