def test_get_band_image(): c = Cube(get_data_file('obj', 'CUBE.fits')) # Test unknown filter with pytest.raises(ValueError): c.get_band_image('foo') # Test non-overlapping filter with pytest.raises(ValueError): c.get_band_image('Johnson_B') im = c.get_band_image('Cousins_I') assert im.data.count() == 200 assert im.primary_header['ESO DRS MUSE FILTER NAME'] == 'Cousins_I'
# In[2]: from astropy.io import fits from mpdaf.obj import Image, WCS, Cube # In[11]: cube = Cube('../Observation1/data/CopyDATACUBE_FINAL.fits') imI = cube.get_band_image('Cousins_I') imI.write('Cousing_ITryFOV.fits') ### get offset between MUSE and HST ### imahst = Image('firstdraftwcsfixedicrshubblef606wimg.fits') #cont = Image('CousingI.fits') cont = Image('Cousing_ITryFOV.fits') ima2hst = cont.adjust_coordinates(imahst) ima2hst.write('FixedMUSEFOV.fits')