From dc79d40bd0a208e708dd6c327692223feb3be174 Mon Sep 17 00:00:00 2001 From: Joshua Shields <54691495+jvshields@users.noreply.github.com> Date: Fri, 11 Aug 2023 14:06:15 -0400 Subject: [PATCH] add arg to the config_schema.yml file for gzipped and hook up in run_stardis (#116) * add arg to the config_schema.yml file for gzipped and hook up in run_stardis * remove comment about adding gzipped arg --- stardis/base.py | 5 ++--- stardis/config_schema.yml | 4 ++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/stardis/base.py b/stardis/base.py index 1a780078..4c7da204 100644 --- a/stardis/base.py +++ b/stardis/base.py @@ -48,10 +48,9 @@ def run_stardis(config_fname, tracing_lambdas_or_nus): if config.model.type == "marcs": from stardis.io.model.marcs import read_marcs_model - # FIX THIS BY ADDING AN OPTIONAL GZIPPED ARGUMENT TO THE CONFIG raw_marcs_model = read_marcs_model( - config.model.fname, gzipped=False - ) # Need to add gzipped to config + config.model.fname, gzipped=config.model.gzipped + ) stellar_model = raw_marcs_model.to_stellar_model( adata, final_atomic_number=config.model.final_atomic_number ) diff --git a/stardis/config_schema.yml b/stardis/config_schema.yml index e11fe1b9..8462830f 100644 --- a/stardis/config_schema.yml +++ b/stardis/config_schema.yml @@ -16,10 +16,14 @@ properties: - marcs fname: type: string + gzipped: + type: boolean + default: false final_atomic_number: type: number multipleOf: 1 default: 30 + required: - type - fname