コード例 #1
0
ファイル: test_sji.py プロジェクト: abit2/irispy
def test_making_SJIMap(sji_file):
    sji_cube = SJICube(sji_file)
    header = sji_cube.meta(0)
    data = sji_cube.data[0, :, :]
    assert isinstance(SJIMap(header, data), SJICube)

    #def singlefile():


#    mc=sji.SJI_fits_to_cube(fname[0],0,10)
#    mc_db = sji.dustbuster(mc)
#    print('Single file input Passed')

#def listfits():
#    mc=sji.SJI_fits_to_cube(fname)
#    print('Multiple file input Passed')
# Bad Pixel Map (BPM) before dustbuster
#    m1 = ma.masked_inside(mc[0].data, -199, .1)

#    mc_db=sji.dustbuster(mc)
# Fail condition: If mask finds unchanged values in BPM will return 'numpy.array'
# Pass condition: If mask finds no unchanged values in BPM will return 'numpy.bool'
#    fail_count=0
#    for i, map in enumerate(mc_db):
#        m = ma.masked_inside(map.data, -199, .1)
#        if type(m.mask)==type(m1.mask):
#            print('DUSTBUSTER Failed: ' +str(i))
#            fail_count+=1
#    if fail_count==0:
#        print('DUSTBUSTER Passed')

#test1=singlefile()
#test2=listfits()
コード例 #2
0
def test_making_SJIMap(sji_file):
    sji_cube = SJICube(sji_file)
    header = sji_cube.meta(0)
    data = sji_cube.data[0,:,:]
    assert isinstance(SJIMap(header, data), SJICube)