Exemple #1
0
    def obs_list(self, central_date):
        observations = []
        duration_s = self.sequence_duration_s()
        start_date = ephem.Date(central_date) - 0.5 * duration_s * ephem.second
        current_date = ephem.Date(start_date)
        end_date = current_date + duration_s * ephem.second
        cal_source = momxml.SourceCatalogue().cal_source(
            current_date + (0.5 * duration_s) * ephem.second, 'HBA')

        obs_name = self.name
        targets = [
            momxml.TargetSource(
                beam_name, momxml.Angle(rad=float(ephem.hours(ra_str))),
                momxml.Angle(rad=float(ephem.degrees(dec_str))))
            for beam_name, ra_str, dec_str in self.target_list
        ]

        observations.append(
            self.make_obs(None, [cal_source], current_date, self.cal_s))
        current_date += (self.cal_s + self.gap_s) * ephem.second
        observations.append(
            self.make_obs(obs_name, targets, current_date, self.pointing_s))
        return observations
Exemple #2
0
import momxml
import ephem
import sys

# 17:29 - 06:10

cal_duration_s = 5 * 60
source_catalogue = momxml.SourceCatalogue()

mid_day = momxml.ephem.Date(sys.argv[1])
start_date = momxml.ephem.Date(
    momxml.next_sunset(mid_day) + 20 * momxml.ephem.minute)
end_date = momxml.ephem.Date(
    momxml.next_sunrise(mid_day) - 20 * momxml.ephem.minute)

total_duration_s = (end_date - start_date) * 24 * 3600.0
target_duration_s = total_duration_s - 2 * cal_duration_s - 2 * 61.0

target = momxml.simbad('NCP')
target.name = 'NCP-%4d-%02d-%02d' % start_date.tuple()[0:3]

pre_cal = source_catalogue.cal_source(start_date, 'HBA')
post_cal = source_catalogue.cal_source(
    start_date + (target_duration_s + 2 * cal_duration_s) * ephem.second,
    'HBA')
cal_fields = [momxml.simbad('3C61.1')]
ra_3c61_1 = cal_fields[0].ra_angle
dec_3c61_1 = cal_fields[0].dec_angle
ra_inc = momxml.Angle(deg=60.0)

antenna_set = 'HBA_DUAL_INNER'