Create radiation pipeline

This commit is contained in:
Lukas Klass 2020-04-21 14:47:31 +02:00
parent 9d88c2f081
commit 4bd8df8f86

View File

@ -1,31 +1,7 @@
import esbo_etc import esbo_etc as etc
import argparse import argparse
import logging import logging
import sys 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__": if __name__ == "__main__":
@ -37,11 +13,12 @@ if __name__ == "__main__":
default="output") default="output")
parser.add_argument("-v", "--version", action="version", version="ESBO-ETC version 1.0.0", parser.add_argument("-v", "--version", action="version", version="ESBO-ETC version 1.0.0",
help="show version information") 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, logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG if args.debug else logging.WARNING,
stream=sys.stdout) 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)