Skip to content

Commit

Permalink
fix config creation for post proc blend collection
Browse files Browse the repository at this point in the history
  • Loading branch information
bnb32 committed Jan 6, 2025
1 parent 1828909 commit 172fa1a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
16 changes: 13 additions & 3 deletions nsrdb/config/create_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ def post(cls, kwargs):
pipeline_config = {'pipeline': []}
out_dir = os.path.abspath(kwargs.get('out_dir', './'))
post_proc_dir = os.path.join(out_dir, 'post_proc')
kwargs['post_proc_dir'] = kwargs.get('post_proc_dir', post_proc_dir)
kwargs['main_dir'] = out_dir

if kwargs['year'] > 2018:
Expand All @@ -411,6 +412,10 @@ def post(cls, kwargs):
config['out_dir'] = os.path.join(
post_proc_dir, config['run_name']
)
if mod_name == 'collect-blend':
config['collect_dir'] = os.path.join(
post_proc_dir, config['run_name'].replace('_collect', '')
)
cls._write_config(
config,
os.path.join(post_proc_dir, fname),
Expand Down Expand Up @@ -611,16 +616,21 @@ def _collect_blend(cls, kwargs):

config = cls.init_kwargs(kwargs, COLLECT_BLEND_KWARGS)
config['meta_final'] = cls._get_meta(config, run_type='collect-blend')
config['collect_dir'] = cls._get_run_name(config, run_type='blend')
config['collect_tag'] = config['collect_dir'].replace('_blend', '')
config['collect_dir'] = os.path.join(
config['out_dir'],
'post_proc',
cls._get_run_name(config, run_type='blend'),
)
config['fout'] = os.path.join(
f'{config["out_dir"]}',
f'{config["basename"]}_{config["year"]}.h5',
)

config['run_name'] = cls._get_run_name(
config, run_type='collect-blend'
)
config['collect_tag'] = config['run_name'].replace(
'_collect_blend', ''
)
return config

@classmethod
Expand Down
2 changes: 1 addition & 1 deletion nsrdb/gap_fill/mlclouds_fill.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def __init__(
'Initializing MLCloudsFill with model: {}'.format(model_path)
)
logger.info(
'MLCloudsFill fill filling all cloud properties: {}'.format(
'MLCloudsFill filling all cloud properties: {}'.format(
self._fill_all
)
)
Expand Down

0 comments on commit 172fa1a

Please sign in to comment.