Commit ff3830b7 authored by matthmey's avatar matthmey

clean up

parent 3816abf3
......@@ -79,7 +79,6 @@ class GSNDataSource(DataSource):
),
skiprows=0,
)
print(colnames)
columns_old = colnames["colname_old"].values
columns_new = colnames["colname_new"].values
columns_unit = colnames["unit"].values
......@@ -169,7 +168,6 @@ class GSNDataSource(DataSource):
except:
pass
# Remove columns with only 'null'
df = df.replace(r"null", np.nan, regex=True)
isnull = df.isnull().all()
......@@ -177,8 +175,6 @@ class GSNDataSource(DataSource):
df = df.set_index("time")
df = df.sort_index(axis=1)
print(df)
x = xr.DataArray(df, dims=["time", "name"], name="CSV")
......
......@@ -46,15 +46,17 @@ class TestSeismicSource(object):
# TODO: make test to compare start_times
@pytest.mark.slow
def test_gsn():
# test_data = pd.read_csv(test_data_dir + 'matterhorn_27_temperature_rock.csv',index_col='time')
gsn_node = stuett.data.GSNDataSource(deployment="matterhorn", position=30, vsensor="temperature_rock")
x = gsn_node({"start_time":"2017-07-01","end_time":"2017-07-02"})
print(x)
assert x.sum() == 1600959.34
#TODO: proper testing
test_gsn()
# test_gsn()
def test_delayed():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment