def test_IGRF(smalldata): """Tests IGRF Calculation.""" datin2 = Data() datin2.data = np.ma.array([[0., 0.], [0., 0.]], mask=[[0, 0], [0, 0]]) datin2.extent = (25, 25, -28, -27) # left, right, bottom, top dat2 = [[940.640983, 864.497698], [1164.106631, 1079.494023]] tmp = igrf.IGRF() tmp.indata = {'Raster': [smalldata, datin2]} tmp.dateedit.setDate(QtCore.QDate(2000, 1, 1)) tmp.dsb_alt.setValue(0.) tmp.settings(True) dat = tmp.outdata['Raster'][-1].data np.testing.assert_array_almost_equal(dat, dat2)
def igrf(self): """ Grid datasets """ fnc = igrf.IGRF(self.parent) self.parent.item_insert("Step", "Remove\nIGRF", fnc)
def igrf(self): """Compute IGRF.""" fnc = igrf.IGRF(self.parent) self.parent.item_insert('Step', 'Remove IGRF', fnc)
def igrf(self): """ Grid datasets """ fnc = igrf.IGRF(self.parent) self.parent.item_insert('Step', 'Remove\nIGRF', fnc)