예제 #1
0
파일: test_cube.py 프로젝트: musevlt/mpdaf
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'
예제 #2
0

# 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')