From 2f9101727b24056b524dbfc6b9e11e021ca17e2f Mon Sep 17 00:00:00 2001
From: Jeremy Fee <jmfee@usgs.gov>
Date: Wed, 17 Dec 2014 16:20:57 -0700
Subject: [PATCH] Update IAGA2002Factory to match updated timeseriesfactory
 interface

---
 src/python/geomag/io/iaga2002/IAGA2002Factory.py | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/python/geomag/io/iaga2002/IAGA2002Factory.py b/src/python/geomag/io/iaga2002/IAGA2002Factory.py
index 1d8f9dcb..d264a2fe 100644
--- a/src/python/geomag/io/iaga2002/IAGA2002Factory.py
+++ b/src/python/geomag/io/iaga2002/IAGA2002Factory.py
@@ -60,11 +60,13 @@ class IAGA2002Factory(TimeseriesFactory):
     IAGA2002Parser
     """
 
-    def __init__(self, urlTemplate):
+    def __init__(self, urlTemplate, observatory=None, channels=None, type=None,
+            interval=None):
+        TimeseriesFactory.__init__(self, observatory, channels, type, interval)
         self.urlTemplate = urlTemplate
 
-    def get_timeseries(self, observatory, starttime, endtime,
-            type='variation', interval='minute'):
+    def get_timeseries(self, starttime, endtime, observatory=None,
+            channels=None, type=None, interval=None):
         """Get timeseries data
 
         Parameters
@@ -91,6 +93,10 @@ class IAGA2002Factory(TimeseriesFactory):
             if invalid values are requested, or errors occur while
             retrieving timeseries.
         """
+        observatory = observatory or self.observatory
+        channels = channels or self.channels
+        type = type or self.type
+        interval = interval or self.interval
         days = self._get_days(starttime, endtime)
         timeseries = obspy.core.Stream()
         for day in days:
-- 
GitLab