Skip to content
Snippets Groups Projects

TMSS-717: merge commissioning fixes back to master

Merged TMSS-717: merge commissioning fixes back to master
Merged Jorrit Schaap requested to merge TMSS-717 into master
@@ -889,14 +889,14 @@ class TestSkyConstraints(unittest.TestCase):
# case 1: transits at 14h, obs middle is at 13h, so we have an offset of -3600 seconds
# big window
self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['sky'] = {'transit_offset': {'from': -43200, 'to': 43200}} # todo: use blueprint contraints after TMSS-697 was merged
self.scheduling_unit_blueprint.scheduling_constraints_doc['sky'] = {'transit_offset': {'from': -43200, 'to': 43200}}
self.scheduling_unit_blueprint.save()
timestamp = datetime(2020, 1, 1, 12, 0, 0)
returned_value = tc1.can_run_anywhere_within_timewindow_with_sky_constraints(self.scheduling_unit_blueprint, timestamp, timestamp + timedelta(seconds=self.obs_duration))
self.assertTrue(returned_value)
# narrow window
self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['sky'] = {'transit_offset': {'from': -3601, 'to': -3599}} # todo: use blueprint contraints after TMSS-697 was merged
self.scheduling_unit_blueprint.scheduling_constraints_doc['sky'] = {'transit_offset': {'from': -3601, 'to': -3599}}
self.scheduling_unit_blueprint.save()
timestamp = datetime(2020, 1, 1, 12, 0, 0)
returned_value = tc1.can_run_anywhere_within_timewindow_with_sky_constraints(self.scheduling_unit_blueprint, timestamp, timestamp + timedelta(seconds=self.obs_duration))
@@ -906,7 +906,7 @@ class TestSkyConstraints(unittest.TestCase):
# window spans past 12h, so reference transit is not nearest transit to obs time
self.target_transit_mock.return_value = self.target_transit_data_previous
self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['sky'] = {'transit_offset': {'from': -43300, 'to': -43100}} # todo: use blueprint contraints after TMSS-697 was merged
self.scheduling_unit_blueprint.scheduling_constraints_doc['sky'] = {'transit_offset': {'from': -43300, 'to': -43100}}
self.scheduling_unit_blueprint.save()
timestamp = datetime(2020, 1, 1, 1, 0, 0)
returned_value = tc1.can_run_anywhere_within_timewindow_with_sky_constraints(self.scheduling_unit_blueprint, timestamp, timestamp + timedelta(seconds=self.obs_duration))
@@ -917,14 +917,14 @@ class TestSkyConstraints(unittest.TestCase):
# transits at 14h, obs middle is at 13h, so we have an offset of -3600 seconds
# window after
self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['sky'] = {'transit_offset': {'from': -3599, 'to': 43200}} # todo: use blueprint contraints after TMSS-697 was merged
self.scheduling_unit_blueprint.scheduling_constraints_doc['sky'] = {'transit_offset': {'from': -3599, 'to': 43200}}
self.scheduling_unit_blueprint.save()
timestamp = datetime(2020, 1, 1, 12, 0, 0)
returned_value = tc1.can_run_anywhere_within_timewindow_with_sky_constraints(self.scheduling_unit_blueprint, timestamp, timestamp + timedelta(seconds=self.obs_duration))
self.assertFalse(returned_value)
# window before
self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['sky'] = {'transit_offset': {'from': -43200, 'to': -3601}} # todo: use blueprint contraints after TMSS-697 was merged
self.scheduling_unit_blueprint.scheduling_constraints_doc['sky'] = {'transit_offset': {'from': -43200, 'to': -3601}}
self.scheduling_unit_blueprint.save()
timestamp = datetime(2020, 1, 1, 12, 0, 0)
returned_value = tc1.can_run_anywhere_within_timewindow_with_sky_constraints(self.scheduling_unit_blueprint, timestamp, timestamp + timedelta(seconds=self.obs_duration))
@@ -936,7 +936,7 @@ class TestSkyConstraints(unittest.TestCase):
# obs middle is 13h, so we have an offset of -7200 seconds
self.target_transit_mock.side_effect = self.target_transit_data_saps
self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['sky'] = {'transit_offset': {'from': -7201, 'to': -7199}} # todo: use blueprint contraints after TMSS-697 was merged
self.scheduling_unit_blueprint.scheduling_constraints_doc['sky'] = {'transit_offset': {'from': -7201, 'to': -7199}}
self.scheduling_unit_blueprint.requirements_doc['tasks']['Observation']['specifications_doc']['antenna_set'] = 'LBA_INNER'
self.scheduling_unit_blueprint.requirements_doc['tasks']['Observation']['specifications_doc']['SAPs'] = \
[{'name': 'CygA', 'target': 'CygA', 'subbands': [0, 1], 'digital_pointing': {'angle1': 5.233660650313663, 'angle2': 0.7109404782526458, 'direction_type': 'J2000'}},
Loading