Example #1
0
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')
Example #2
0
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
Example #3
0
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
Example #4
0
def test_select_apcorr_nirspec(nirspec_cube):

    apcorr_cls = select_apcorr(nirspec_cube)
    assert apcorr_cls == ApCorrRadial
Example #5
0
def test_select_apcorr_miri(miri_cube):

    apcorr_cls = select_apcorr(miri_cube)
    assert apcorr_cls == ApCorrRadial