Skip to content

Commit

Permalink
Minor fix in legend and filename
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-katkov committed Feb 24, 2025
1 parent ba57169 commit bab6aef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/valis/routes/lvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ async def plot_fiber_spectrum(
file = get_SFrame_filename(expnum, drpver)

if not os.path.exists(file):
raise HTTPException(status_code=404, detail=f"File {filename} does not exist.")
raise HTTPException(status_code=404, detail=f"File {file} does not exist.")

# Read data and construct required spectrum to be plotted
with fits.open(file) as hdul:
Expand Down Expand Up @@ -487,8 +487,8 @@ async def plot_fiber_spectrum(

for d in data:
legend_options = dict(
short="{expnum} {fiberid}".format(**d),
long="{expnum} {fiberid} {drpver}".format(**d),
short="expnum: {expnum} fiberid: {fiberid}".format(**d),
long="expnum: {expnum} fiberid: {fiberid} drpver: {drpver}".format(**d),
)
label = legend_options.get(legend, None)
try:
Expand Down

0 comments on commit bab6aef

Please sign in to comment.