Пример #1
0
    def inRegion(self, pulsar):
        """Test if pulsar is inside region bounded by survey."""
        # check if l, b are outside region first of all
        # print pulsar.gl, pulsar.gb, self.GLmax, self.GLmin
        if pulsar.gl > 180.:
            pulsar.gl -= 360.
        if pulsar.gl > self.GLmax or pulsar.gl < self.GLmin:
            return False
        if math.fabs(pulsar.gb) > self.GBmax \
                or math.fabs(pulsar.gb) < self.GBmin:
            return False

        # need to compute ra/dec of pulsar from the l and b (galtfeq)
        ra, dec = go.lb_to_radec(pulsar.gl, pulsar.gb)

        # are ra, dec outside region?
        if ra > self.RAmax or ra < self.RAmin:
            return False
        if dec > self.DECmax or dec < self.DECmin:
            return False

        # randomly decide if pulsar is in completed area of survey
        if random.random() > self.coverage:
            return False

        return True
Пример #2
0
    def inRegion(self, pulsar):
        """Test if pulsar is inside region bounded by survey."""
        # check if l, b are outside region first of all
        # print pulsar.gl, pulsar.gb, self.GLmax, self.GLmin
        if pulsar.gl > 180.:
            pulsar.gl -= 360.
        if pulsar.gl > self.GLmax or pulsar.gl < self.GLmin:
            return False
        if math.fabs(pulsar.gb) > self.GBmax \
                or math.fabs(pulsar.gb) < self.GBmin:
            return False

        # need to compute ra/dec of pulsar from the l and b (galtfeq)
        ra, dec = go.lb_to_radec(pulsar.gl, pulsar.gb)

        # are ra, dec outside region?
        if ra > self.RAmax or ra < self.RAmin:
            return False
        if dec > self.DECmax or dec < self.DECmin:
            return False

        # randomly decide if pulsar is in completed area of survey
        if random.random() > self.coverage:
            return False

        return True
Пример #3
0
def calc_gain(pulsar):
    ra, dec = go.lb_to_radec(pulsar.gl, pulsar.gb)

    dec_chime = 49.31
    diff = dec - 49.31
    G_0 = np.abs(1.44 * np.cos(np.radians(diff)))
    return G_0
Пример #4
0
    def _AA_factor(self, pulsar):
        """ Aperture array factor """

        # need to compute ra/dec of pulsar from the l and b (galtfeq)
        ra, dec = go.lb_to_radec(pulsar.gl, pulsar.gb)

        offset_from_zenith = dec - (self.DECmax + self.DECmin) / 2.0

        return math.cos(math.radians(offset_from_zenith))
Пример #5
0
    def _AA_factor(self, pulsar):
        """ Aperture array factor """

        # need to compute ra/dec of pulsar from the l and b (galtfeq)
        ra, dec = go.lb_to_radec(pulsar.gl, pulsar.gb)

        offset_from_zenith = dec - (self.DECmax + self.DECmin)/2.0

        return math.cos(math.radians(offset_from_zenith))
Пример #6
0
def calc_tobs(pulsar):
    ra, dec = go.lb_to_radec(pulsar.gl, pulsar.gb)
    t_obs = 60 * np.abs(10 / np.cos(np.radians(dec)))
    #stacked searching
    #t_obs = 365*60*np.abs(10/np.cos(np.radians(dec)))
    return t_obs