def test_phases(self): result = AReader.get_phase_all("msia", 0) assert (len(result) == 2) assert (result[0].shape[0] == 75 and result[1].shape == (80, 75)) for re in result[1]: # print(re.sum()) assert (round(re.sum()) == 1)
from utils import AhmadAerosolReader as AReader from inputs import input import numpy as np sensor = 'msia' bands = AReader.get_bands(sensor) bands_int = np.asarray(bands,dtype=int) print (bands) rhs, fmfs =AReader.get_names(sensor) for i,wl in enumerate(bands_int): scatt, phases = AReader.get_phase_all(sensor, 0) input.gen_aerosol_phase(sensor=sensor,band=wl, scatt=scatt,phases=phases,rhs=rhs,fmfs=fmfs)