Skip to content

Commit

Permalink
Smarter about base filename
Browse files Browse the repository at this point in the history
  • Loading branch information
bhilbert4 committed Aug 1, 2023
1 parent 65fb43e commit 2673b3c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jwql/shared_tasks/shared_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,8 @@ def calwebb_detector1_save_jump(input_file_name, instrument, ramp_fit=True, save
logging.error("File {} not found!".format(input_file))
raise FileNotFoundError("{} not found".format(input_file))

short_name = input_file_name[0: input_file_name.rfind('_')]
parts = input_file_name.split('_')
short_name = f'{parts[0]}_{parts[1]}_{parts[2]}_{parts[3]}'
ensure_dir_exists(cal_dir)
output_dir = os.path.join(config["transfer_dir"], "outgoing")

Expand Down

0 comments on commit 2673b3c

Please sign in to comment.