From ea321929052d0d46490037700293675c9d3e2bb1 Mon Sep 17 00:00:00 2001
From: Greg Quinn <greg.quinn@ssec.wisc.edu>
Date: Thu, 12 Apr 2018 16:16:21 -0500
Subject: [PATCH] Fixes to VIIRS RDR generation

- APID short names had I05 listed twice
- Num expected was wrong for DNB
---
 edosl0util/rdrgen.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/edosl0util/rdrgen.py b/edosl0util/rdrgen.py
index dea4500..e3b7a37 100644
--- a/edosl0util/rdrgen.py
+++ b/edosl0util/rdrgen.py
@@ -401,7 +401,7 @@ class ViirsScienceApidInfo(object):
     apids = list(x for x in range(800, 827) if x != 824)
     names = ['M04', 'M05', 'M03', 'M02', 'M01', 'M06', 'M07', 'M09', 'M10',
              'M08', 'M11', 'M13', 'M12', 'I04', 'M16', 'M15', 'M14', 'I05',
-             'I05', 'I01', 'I02', 'I03', 'DNB', 'DNB_MGS', 'DNB_LGS',
+             'I01', 'I02', 'I03', 'DNB', 'DNB_MGS', 'DNB_LGS',
              'CAL', 'ENG']
 
     @classmethod
@@ -425,7 +425,7 @@ class ViirsScienceApidInfo(object):
             return 1
         elif name == 'CAL':
             return 24
-        elif name.startswith('M'):
+        elif name.startswith('M') or name.startswith('DNB'):
             return 17
         else:
             return 33
@@ -507,7 +507,7 @@ class ViirsScienceRdrType(object):
     gran_len = 85350000
     sensor = 'viirs'
     type_id = 'SCIENCE'
-    document = '474-00448-02-08_JPSS-DD-Vol-II-Part-8_0200B.pdf'
+    document = '474-00448-02-06_JPSS-DD-Vol-II-Part-6_0200G.pdf'
     apids = ViirsScienceApidInfo.get_specs()
     default_aggregation = 1
 
@@ -546,7 +546,7 @@ class SpacecraftDiaryRdrType(object):
     gran_len = 20000000
     sensor = None
     type_id = 'DIARY'
-    document = '474-00448-02-08_JPSS-DD-Vol-II-Part-8_0200B.pdf'
+    document = '474-00448-02-08_JPSS-DD-Vol-II-Part-8_0200F.pdf'
     apids = [ApidSpec(0, 'CRITICAL', max_expected=21),
              ApidSpec(8, 'ADCS_HKH', max_expected=21),
              ApidSpec(11, 'DIARY', max_expected=21)]
-- 
GitLab