diff --git a/code.json b/code.json index c13b31f7dec4420d90a72245aa81d36ca2330dd1..a130d5d54430813c3f78d93a217ad67c0d6a0116 100644 --- a/code.json +++ b/code.json @@ -3,7 +3,7 @@ "name": "geomag-algorithms", "organization": "U.S. Geological Survey", "description": "Library for processing Geomagnetic timeseries data.", - "version": "1.13.1", + "version": "1.13.2", "status": "Development", "permissions": { "usageType": "openSource", @@ -35,7 +35,7 @@ "email": "gs-haz_dev_team_group@usgs.gov" }, "date": { - "metadataLastUpdated": "2025-02-18" + "metadataLastUpdated": "2025-02-27" } } ] \ No newline at end of file diff --git a/geomagio/edge/EdgeFactory.py b/geomagio/edge/EdgeFactory.py index 16235edb573703a67c4f2d4fc39a4e2317c04f04..75d0d0bace8d9c62488bbcac0a9dffd2569754a9 100644 --- a/geomagio/edge/EdgeFactory.py +++ b/geomagio/edge/EdgeFactory.py @@ -433,7 +433,7 @@ class EdgeFactory(TimeseriesFactory): # try alternate port(s) if provided except Exception as e: print("Failed to get data from ", self.host, " on port ", port) - print("Ignoring error: ", e) + print("Ignoring error: ", e.__class__, e) # try alternate port(s) if provided continue @@ -468,7 +468,7 @@ class EdgeFactory(TimeseriesFactory): except Exception as e: tr = st_tmp.pop() # remove bad trace print("Dropped trace: ", tr) - print("Ignoring error: ", e) + print("Ignoring error: ", e.__class__, e) # point `data` to the new stream and continue processing data = st_tmp @@ -665,7 +665,11 @@ class EdgeFactory(TimeseriesFactory): sncl.network, ) trace_send.data = trace_send.data.astype(int) # ric requires ints - ric.send_trace(interval, trace_send) + try: + ric.send_trace(interval, trace_send) + except Exception as e: + print("No data sent to", ric.host, ":", ric.port) + print("Ignoring error: ", e.__class__, e) if self.forceout: ric.forceout() ric.close() diff --git a/geomagio/residual/Calculation.py b/geomagio/residual/Calculation.py index 55a40d314c1ac7a795564e55a77aceaf4401ea47..84b3051f02712b15afd95e0e48ff8d73af651e9c 100644 --- a/geomagio/residual/Calculation.py +++ b/geomagio/residual/Calculation.py @@ -59,7 +59,7 @@ def calculate(reading: Reading, adjust_reference: bool = True) -> Reading: h_baseline=absoluteH.baseline, measurements=reading.measurements, reference=reference, - shift=reading.absolutes[0].shift, + shift=reading.absolutes[0].shift if reading.absolutes else 0, ) d_computed = calculate_D_computed( diff --git a/pyproject.toml b/pyproject.toml index 35b255a9aced14f689cb259b98fb82de35908a4a..3205b459ebe6bc779e827763ac2b2747928bdd01 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ packages = [ {include = "geomagio" } ] repository="https://code.usgs.gov/ghsc/geomag/geomag-algorithms" -version = "1.13.1" +version = "1.13.2" [tool.poetry.dependencies]