示例#1
0
def test_get_app_from_model_null():
    """If exp_type isn't the NRS or NIS specific mode,
    routine returns None"""

    datmod = MultiSlitModel()
    datmod.meta.exposure.type = 'NRC_IMAGE'

    result = get_aperture_from_model(datmod, None)

    assert(result is None)
示例#2
0
def test_get_aper_from_model_msa():
    """For a given exposures aperture, make sure the correct
    aperture reference data is returned for MSA mode"""

    datmod = PathlossModel()
    datmod.apertures.append({'shutters':5})
    datmod.meta.exposure.type = 'NRS_MSASPEC'

    result = get_aperture_from_model(datmod, 5)

    assert(result == datmod.apertures[0])
示例#3
0
def test_get_aper_from_model_fixedslit():
    """For a given exposures aperture, make sure the correct
    aperture reference data is returned for fixedslit mode"""

    datmod = PathlossModel()
    datmod.apertures.append({'name':'S200A1'})
    datmod.meta.exposure.type = 'NRS_FIXEDSLIT'

    result = get_aperture_from_model(datmod, 'S200A1')

    assert(result == datmod.apertures[0])