diff --git a/geomagio/edge/MiniSeedInputClient.py b/geomagio/edge/MiniSeedInputClient.py index 122b1eb4ec657b339e580a0d0025042bada5f680..9d83701871b524f5d4cff7eb9dc4684e392d8fc8 100644 --- a/geomagio/edge/MiniSeedInputClient.py +++ b/geomagio/edge/MiniSeedInputClient.py @@ -16,11 +16,14 @@ class MiniSeedInputClient(object): MiniSeedServer hostname port: int MiniSeedServer port + encoding: str + Floating point precision for output data """ - def __init__(self, host, port=2061): + def __init__(self, host, port=2061, encoding="FLOAT32"): self.host = host self.port = port + self.encoding = encoding self.socket = None def close(self): @@ -71,6 +74,6 @@ class MiniSeedInputClient(object): self.connect() # convert stream to miniseed buf = io.BytesIO() - stream.write(buf, format="MSEED", reclen=512) + stream.write(buf, encoding=self.encoding, format="MSEED", reclen=512) # send data self.socket.sendall(buf.getvalue())