In [5]:
import pickle
In [6]:
schema = \
{"Attributes":
{"year": {"dtype": int,
"format": "%4d",
"null": -999,
"width": 4},
"month": {"dtype": int,
"format": "%02d",
"null": -9,
"width": 2},
"day": {"dtype": int,
"format": "%02d",
"null": -9,
"width": 2},
"hour": {"dtype": int,
"format": "%03d",
"null": -99,
"width": 3},
"minute": {"dtype": int,
"format": "%03d",
"null": -99,
"width": 3},
"second": {"dtype": float,
"format": "%6.3f",
"null": -9.999,
"width": 6},
"eID": {"dtype": int,
"format": "%10d",
"null": -999999999,
"width": 10},
"latR": {"dtype": float,
"format": "%9.5f",
"null": -99.99999,
"width": 9},
"lonR": {"dtype": float,
"format": "%10.5f",
"null": -999.99999,
"width": 10},
"depR": {"dtype": float,
"format": "%7.3f",
"null": -99.999,
"width": 7},
"mag": {"dtype": float,
"format": "%5.2f",
"null": -9.99,
"width": 5},
"qID": {"dtype": int,
"format": "%7d",
"null": -999999,
"width": 7},
"cID": {"dtype": int,
"format": "%7d",
"null": -999999,
"width": 7},
"nbranch": {"dtype": int,
"format": "%7d",
"null": -999999,
"width": 7},
"qnpair": {"dtype": int,
"format": "%5d",
"null": -9999,
"width": 5},
"qndiffP": {"dtype": int,
"format": "%5d",
"null": -9999,
"width": 5},
"qndiffS": {"dtype": int,
"format": "%5d",
"null": -9999,
"width": 5},
"rms": {"dtype": float,
"format": "%5.2f",
"null": -9.99,
"width": 5},
"rmsP": {"dtype": float,
"format": "%5.2f",
"null": -9.99,
"width": 5},
"rmsS": {"dtype": float,
"format": "%5.2f",
"null": -9.99,
"width": 5},
"eh": {"dtype": float,
"format": "%7.3f",
"null": -99.999,
"width": 7},
"ez": {"dtype": float,
"format": "%7.3f",
"null": -99.999,
"width": 7},
"et": {"dtype": float,
"format": "%7.3f",
"null": -99.999,
"width": 7},
"latC": {"dtype": float,
"format": "%11.5f",
"null": -9999.99999,
"width": 11},
"lonC": {"dtype": float,
"format": "%10.5f",
"null": -999.99999,
"width": 10},
"depC": {"dtype": float,
"format": "%7.3f",
"null": -99.999,
"width": 7},
"lat": {"dtype": float,
"format": "%9.5f",
"null": -99.99999,
"width": 9},
"lon": {"dtype": float,
"format": "%10.5f",
"null": -999.99999,
"width": 10},
"depth": {"dtype": float,
"format": "%7.3f",
"null": -99.999,
"width": 7}
},
"Relations":
{"catalog":["year", "month", "day", "hour", "minute", "second", "eID",
"latR", "lonR", "depR", "mag", "qID", "cID", "nbranch",
"qnpair", "qndiffP", "qndiffS", "rmsP", "rmsS", "eh", "ez", "et",
"latC", "lonC", "depC"],
"event.phase": ["year", "month", "day", "hour", "minute", "second", "lat", "lon",
"depth", "mag", "eh", "ez", "rms", "eID"]}
}
In [7]:
with open("../seismicity_catalog/data/schemas/growclust1.0.pkl", "wb") as outf:
pickle.dump(schema, outf)
In [ ]: