Ejemplo n.º 1
0
 def _do_scan(self, _target, _receiver, _frequency):
     beamsize = VAngle(_receiver.get_beamsize(max(_frequency)))
     _subscans = []
     #Fill informations for each OTF subscan in the 4 directions
     #This is a default implementation, maybe one day we could parametrize
     #this if needed
     for _const_axis, _direction in [('LON', 'INC'), 
                                     ('LAT', 'INC')]:
         _subscans.append(subscan.get_cen_otf_tsys(_target,
                                                   self.duration,
                                                   self.length,
                                                   VAngle(0.0),
                                                   _const_axis,
                                                   _direction,
                                                   self.frame,
                                                   beamsize))
     return _subscans
Ejemplo n.º 2
0
Archivo: maps.py Proyecto: discos/basie
    def _do_scan(self, _target, _receiver, _frequency):
        self._get_spacing(_receiver, _frequency)
        if self.scan_axis == "LON":
            self.unit_subscans = self.dimension_y
        elif self.scan_axis == "LAT":
            self.unit_subscans = self.dimension_x
        _subscans = []
        logger.debug("scan axis: %s" % (self.scan_axis,))

        if self.scan_axis == self.frame.lon_name or self.scan_axis == "LON":
            _const_axis = 'LAT'
            if self.start_point == "TL" or self.start_point == "TR":
                _offsets = reversed(self.offset_y)
            else:
                _offsets = self.offset_y
            if self.start_point == "TL" or self.start_point == "BL":
                if self.frame == frame.EQ or self.frame == frame.GAL: #RA and GAL-LON are reversed!!
                    _directions = ("DEC", "INC")
                else:
                    _directions = ("INC", "DEC")
            else:
                if self.frame == frame.EQ or self.frame == frame.GAL:
                    _directions = ("INC", "DEC")
                else:
                    _directions = ("DEC", "INC")
            for _offset, _direction in itertools.izip(_offsets,
                                                      itertools.cycle(_directions)):
                logger.debug("OTF: %d offset %s direction %s" % (self.ID,
                                                                 _offset,
                                                                 _direction))
                _subscans.append(subscan.get_cen_otf_tsys(_target,
                                                          self.duration_x,
                                                          self.length_x,
                                                          _offset,
                                                          _const_axis,
                                                          _direction,
                                                          self.frame,
                                                          self.beamsize))
        elif self.scan_axis == self.frame.lat_name or self.scan_axis == "LAT":
            _const_axis = 'LON'
            if self.start_point == "TR" or self.start_point == "BR":
                if self.frame == frame.EQ or self.frame == frame.GAL:
                    _offsets = self.offset_x
                else:
                    _offsets = reversed(self.offset_x)
            else:
                if self.frame == frame.EQ or self.frame == frame.GAL:
                    _offsets = reversed(self.offset_x)
                else:
                    _offsets = self.offset_x
            if self.start_point == "BL" or self.start_point == "BR":
                _directions = ("INC", "DEC")
            else:
                _directions = ("DEC", "INC")
            for _offset, _direction in itertools.izip(_offsets,
                                                      itertools.cycle(_directions)):
                logger.debug("OTF: %d offset %s direction %s" % (self.ID,
                                                                 _offset,
                                                                 _direction))
                _subscans.append(subscan.get_cen_otf_tsys(_target,
                                                          self.duration_y,
                                                          self.length_y,
                                                          _offset,
                                                          _const_axis,
                                                          _direction,
                                                          self.frame,
                                                          self.beamsize))
        return _subscans