Skip to content

Commit

Permalink
Fix #6142: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
git-user committed Jul 28, 2023
1 parent af99297 commit de981e1
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions sirepo/template/silas.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def background_percent_complete(report, run_dir, is_running):
def get_data_file(run_dir, model, frame, options):
if model in ("tempProfileAnimation", "tempHeatMapAnimation"):
return PKDict(
tempProfileAnimation="tempProfile.npy",
tempHeatMapAnimation="tempHeatMap.h5",
tempProfileAnimation=_TEMP_PROFILE_FILE,
tempHeatMapAnimation=_TEMP_HEATMAP_FILE,
)[model]
if model == "crystal3dAnimation":
return "intensity.npy"
Expand Down Expand Up @@ -130,7 +130,6 @@ def sim_frame_tempProfileAnimation(frame_args):


def sim_frame_tempHeatMapAnimation(frame_args):
# TODO (gurhar1133): use _LaserPulsePlot class for this
with h5py.File(
frame_args.run_dir.join(_TEMP_HEATMAP_FILE), "r"
) as f:
Expand Down Expand Up @@ -298,15 +297,14 @@ def _crystal_animation_percent_complete(run_dir, res, data):
assert data.report == "crystalAnimation"
count = 0
res = PKDict()
path = run_dir.join("tempHeatMap.h5")
path = run_dir.join(_TEMP_HEATMAP_FILE)
if path.exists():
res.frameCount = 1
res.percentComplete = 100
return res


def _crystal_plot(frame_args):
assert 0, f"crystal plot for sim frame called{frame_args}"
x = None
plots = []
with open(str(frame_args.run_dir.join(_CRYSTAL_CSV_FILE))) as f:
Expand Down

0 comments on commit de981e1

Please sign in to comment.