From 458073ebd03577b6bc27426d7dcca6356da39b57 Mon Sep 17 00:00:00 2001
From: Hal Simpson <hasimpson@usgs.gov>
Date: Mon, 16 Mar 2015 21:07:58 -0600
Subject: [PATCH] Parsing out GIN from the comment section

---
 geomagio/iaga2002/IAGA2002Parser.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/geomagio/iaga2002/IAGA2002Parser.py b/geomagio/iaga2002/IAGA2002Parser.py
index 6bbc11edd..ff5e25818 100644
--- a/geomagio/iaga2002/IAGA2002Parser.py
+++ b/geomagio/iaga2002/IAGA2002Parser.py
@@ -177,6 +177,7 @@ class IAGA2002Parser(object):
         conditions_of_use = None
         declination_base = None
         is_intermagnet = False
+        is_gin = True
         for comment in self.comments:
             if comment.startswith('DECBAS'):
                 # parse DECBAS
@@ -189,6 +190,8 @@ class IAGA2002Parser(object):
                 comment_upper = comment.upper()
                 if 'FILTER' in comment_upper:
                     filter_comments.append(comment)
+                elif 'GIN' in comment_upper:
+                    is_gin = True
                 elif 'INTERMAGNET DVD' in comment_upper or \
                         'WWW.INTERMAGNET.ORG' in comment_upper:
                     is_intermagnet = True
@@ -199,6 +202,7 @@ class IAGA2002Parser(object):
         self.metadata['conditions_of_use'] = conditions_of_use
         self.metadata['declination_base'] = declination_base
         self.metadata['is_intermagnet'] = is_intermagnet
+        self.metadata['is_gin'] = is_gin
 
     def _merge_comments(self, comments):
         """Combine multi-line, period-delimited comments.
-- 
GitLab