# import the needed modules
try:
    import reflex 
    import sys
    import os
    try :
        from astropy.io import fits as pyfits
    except:
        import pyfits
    import pyfits
    import_sucess = True


except ImportError:
    import_sucess = False
    print "Error importing one or more of the modules pyfits, astroscrappy"

if __name__ == '__main__':
  
    # Hacked from...
    # example script to process input files and produce one output file for
    # each processed input.

    parser = reflex.ReflexIOParser()

    #Define ports:
    parser.add_option("-i", "--in_sof", dest="in_sof")
    parser.add_output("-o", "--out_sof", dest="out_sof")

    inputs  = parser.get_inputs()
    outputs = parser.get_outputs()

    outputs.out_sof = inputs.in_sof

    print("Hello")
    parser.write_outputs()

    sys.exit()
