From 4bd8df8f86a12c215c0d093461cfcf985d8e8731 Mon Sep 17 00:00:00 2001 From: LukasK13 Date: Tue, 21 Apr 2020 14:47:31 +0200 Subject: [PATCH] Create radiation pipeline --- esbo_etc/esbo-etc.py | 33 +++++---------------------------- 1 file changed, 5 insertions(+), 28 deletions(-) diff --git a/esbo_etc/esbo-etc.py b/esbo_etc/esbo-etc.py index f31d026..c154753 100644 --- a/esbo_etc/esbo-etc.py +++ b/esbo_etc/esbo-etc.py @@ -1,31 +1,7 @@ -import esbo_etc +import esbo_etc as etc import argparse import logging import sys -import os - - -def run_exosim(opt=None): - pass - # star, planet = exosim.modules.astroscene.run(opt) - # - # exosim_msg(' Stellar SED: {:s}\n'.format(os.path.basename(star.ph_filename))) - # exosim_msg(' Star luminosity {:f}\n'.format(star.luminosity)) - # - # # Instanciate Zodi - # zodi = exosim.classes.zodiacal_light(opt.common.common_wl, level=1.0) - # - # exosim.exolib.sed_propagation(star.sed, zodi.transmission) - # # Run Instrument Model - # channel = exosim.modules.instrument.run(opt, star, planet, zodi) - # # Create Signal timelines - # frame_time, total_observing_time, exposure_time = exosim.modules.timeline_generator.run(opt, channel, planet) - # # Generate noise timelines - # exosim.modules.noise.run(opt, channel, frame_time, total_observing_time, exposure_time) - # # Save - # exosim.modules.output.run(opt, channel, planet) - # - # return star, planet, zodi, channel if __name__ == "__main__": @@ -37,11 +13,12 @@ if __name__ == "__main__": default="output") parser.add_argument("-v", "--version", action="version", version="ESBO-ETC version 1.0.0", help="show version information") - args = parser.parse_args() + args, _ = parser.parse_known_args() # fix for PyCharm python console logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG if args.debug else logging.WARNING, stream=sys.stdout) - conf = esbo_etc.Configuration(filename=args.config).conf + conf = etc.Configuration(args.config).conf - # run_exosim(opt) + factory = etc.classes.RadiantFactory(conf.common.wl_bins()) + parent = factory.fromConfig(conf)