def calc_spatial_resolution(self, calculations, filter_resolutions=JWST_FILTER_RESOLUTIONS): """ Use the filter value to determine the spatial resolution based on the default NIRCam filter-resolution table. """ occ_utils.calc_spatial_resolution(calculations, filter_resolutions)
def test_calc_spatial_resolution(self): calcs = { 'filter': 'ZZZ' } utils.calc_spatial_resolution(calcs, self.filt_res) assert len(calcs) == 2 assert calcs.get('s_resolution') is not None assert calcs.get('s_resolution') == 4
def test_calc_spatial_resolution_bad_filter(self): calcs = { 'filter': 'F070W' } utils.calc_spatial_resolution(calcs, self.filt_res) assert len(calcs) == 1 assert calcs.get('s_resolution') is None
def test_calc_spatial_resolution_no_filter(self): calcs = dict() utils.calc_spatial_resolution(calcs) assert len(calcs) == 0 assert calcs.get('s_resolution') is None