Skip to content

Commit

Permalink
allow model to be simultaneous when selected
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbhughes committed Nov 12, 2024
1 parent 3381fde commit 5527b70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions punchpipe/flows/level1.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def get_psf_model_path(level0_file, pipeline_config: dict, session=None):
best_model = (session.query(File)
.filter(File.file_type == psf_model_type)
.filter(File.observatory == level0_file.observatory)
.where(File.date_obs < level0_file.date_obs)
.where(File.date_obs <= level0_file.date_obs)
.order_by(File.date_obs.desc()).first())
return os.path.join(best_model.directory(pipeline_config['root']), best_model.filename())

Expand All @@ -39,7 +39,7 @@ def get_quartic_model_path(level0_file, pipeline_config: dict, session=None):
best_model = (session.query(File)
.filter(File.file_type == 'FQ')
.filter(File.observatory == level0_file.observatory)
.where(File.date_obs < level0_file.date_obs)
.where(File.date_obs <= level0_file.date_obs)
.order_by(File.date_obs.desc()).first())
return os.path.join(best_model.directory(pipeline_config['root']), best_model.filename())

Expand Down

0 comments on commit 5527b70

Please sign in to comment.