# (c) Stefan Countryman 2017
# Set up an interactive environment for handling GWHEN work.
import sys
import os
# used to save data in matlab format
import scipy.io.matlab
# look in both places where GWHEN software tends to hide
GWHEN_DIRS = ['~/multimessenger-pipeline', '~/dev/multimessenger-pipeline']
for gwhendir in [os.path.expanduser(d) for d in GWHEN_DIRS]:
    if os.path.exists(gwhendir):
        sys.path.append(gwhendir)
        sys.path.append(os.path.join(gwhendir, 'gwhen', 'bin'))
        sys.path.append(os.path.join(gwhendir, 'gwhen', 'file_handlers'))
    import gwhen
    from gwhen.file_handlers.icecube_utils import realtime_tools
    from IceCubeNeutrinoList_txt import zen_az2ra_dec, ra_dec2zen_az

# initialize an event here with variable name "e" for quick work.
print('Setting `e` to an event in the current working directory...')
try:
    e = gwhen.Event.fromdir()
except AttributeError as e:
    print('Failed, looks like an old version of GWHEN sans fromdir.')

@@ -391,16 +391,70 @@
 endir):%0A
+        print('GWHEN dir found: %7B%7D'.format(gwhendir))%0A
         
@@ -617,20 +617,16 @@
 lers'))%0A
-    
 import g
@@ -630,20 +630,16 @@
 t gwhen%0A
-    
 from gwh
@@ -691,20 +691,16 @@
 e_tools%0A
-    
 from Ice

fix gwhen path typo