Esempio n. 1
0
    def __init__(self, coord1, coord2, coordtype, gain, tobs):
        """Set the coordinates of the pointing.
            Convert to gl and gb if in RA and Dec"""

        if coordtype not in ['eq', 'gal']:
            raise CoordinateException('Wrong coordtype passed to Pointing')

        if coordtype == 'eq':
            # assume pointings in decimal degrees
            ra = coord1
            dec = coord2

            # convert to l and b :)
            gl, gb = go.radec_to_lb(ra, dec)

            if gl > 180.:
                gl -= 360.

            self.gl = gl
            self.gb = gb
        else:
            if coord1 > 180.:
                coord1 -= 360.

            self.gl = coord1
            self.gb = coord2
            self.tobs = tobs
            self.gain = gain
Esempio n. 2
0
    def __init__(self, coord1, coord2, coordtype, gain, tobs):
        """Set the coordinates of the pointing.
            Convert to gl and gb if in RA and Dec"""

        if coordtype not in ['eq', 'gal']:
            raise CoordinateException('Wrong coordtype passed to Pointing')

        if coordtype == 'eq':
            # assume pointings in decimal degrees
            ra = coord1
            dec = coord2

            # convert to l and b :)
            gl, gb = go.radec_to_lb(ra, dec)

            if gl > 180.:
                gl -= 360.

            self.gl = gl
            self.gb = gb
        else:
            if coord1 > 180.:
                coord1 -= 360.

            self.gl = coord1
            self.gb = coord2
            self.tobs = tobs
            self.gain = gain
Esempio n. 3
0
def makepointing(coord1, coord2, coordtype):

    if coordtype not in ['eq', 'gal']:
        raise CoordinateException('Wrong coordtype passed to Pointing')

    if coordtype == 'eq':
        # assume pointings in decimal degrees
        ra = coord1
        dec = coord2

        # convert to l and b :)
        gl, gb = go.radec_to_lb(ra, dec)

        if gl > 180.:
            gl -= 360.

    else:
        if coord1 > 180.:
            coord1 -= 360.

        gl = coord1
        gb = coord2

    return (coord1, coord2)
Esempio n. 4
0
def makepointing(coord1, coord2, coordtype):

    if coordtype not in ['eq', 'gal']:
        raise CoordinateException('Wrong coordtype passed to Pointing')

    if coordtype == 'eq':
        # assume pointings in decimal degrees
        ra = coord1
        dec = coord2

        # convert to l and b :)
        gl, gb = go.radec_to_lb(ra, dec)

        if gl > 180.:
            gl -= 360.

    else:
        if coord1 > 180.:
            coord1 -= 360.

        gl = coord1
        gb = coord2

    return (coord1, coord2)
Esempio n. 5
0
def makepointing(coord1, coord2, coordtype):

    if coordtype not in ["eq", "gal"]:
        raise CoordinateException("Wrong coordtype passed to Pointing")

    if coordtype == "eq":
        # assume pointings in decimal degrees
        ra = coord1
        dec = coord2

        # convert to l and b :)
        gl, gb = go.radec_to_lb(ra, dec)

        if gl > 180.0:
            gl -= 360.0

    else:
        if coord1 > 180.0:
            coord1 -= 360.0

        gl = coord1
        gb = coord2

    return (coord1, coord2)