예제 #1
0
파일: survey.py 프로젝트: kmjc/PsrPopPy2
    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
예제 #2
0
파일: survey.py 프로젝트: samb8s/PsrPopPy
    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
예제 #3
0
파일: survey.py 프로젝트: kmjc/PsrPopPy2
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)
예제 #4
0
파일: survey.py 프로젝트: samb8s/PsrPopPy
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)
예제 #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)