def apcorr_instance(inputs): dm, table = inputs apcorr = select_apcorr(dm) if dm.meta.instrument.name == 'NIRSPEC' and 'FIXEDSLIT' in dm.meta.exposure.type: return apcorr(dm, table, 'pixels', slit='S200A1') return apcorr(dm, table, 'pixels')
def test_select_apcorr(inputs): dm, _ = inputs apcorr_cls = select_apcorr(dm) if dm.meta.instrument.name == 'NIRSPEC': assert apcorr_cls == ApCorrPhase else: assert apcorr_cls == ApCorr
def test_select_apcorr(inputs): dm, _ = inputs apcorr_cls = select_apcorr(dm) if dm.meta.instrument.name == 'NIRSPEC': assert apcorr_cls == ApCorrPhase elif 'MRS' in dm.meta.exposure.type: assert apcorr_cls == ApCorrRadial else: assert apcorr_cls == ApCorr
def test_select_apcorr_nirspec(nirspec_cube): apcorr_cls = select_apcorr(nirspec_cube) assert apcorr_cls == ApCorrRadial
def test_select_apcorr_miri(miri_cube): apcorr_cls = select_apcorr(miri_cube) assert apcorr_cls == ApCorrRadial