[PIPE2D-1399] detectorMap QA failed with keyError Created: 15/Mar/24  Updated: 20/Apr/24  Resolved: 20/Apr/24

Status: Done
Project: DRP 2-D Pipeline
Component/s: drp_qa
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Normal
Reporter: arnaud.lefur Assignee: Wilfred Gee
Resolution: Done Votes: 0
Labels: EngRun
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File v107867-b4-alfTest.png    
Reviewers: Kiyoto Yabe

 Description   

got a failure with detectorMapQa :

detectorMapQa.py /work/drp --calib=/work/drp/CALIB --rerun=drpActor/CALIB --id visit=107867 arm=b
 
Traceback (most recent call last): 
 File "/work/stack_INFRA-312/stack/miniconda3-py38_4.9.2-3.0.0/Linux64/pipe_base/g590c34a36e+5da9528084/python/lsst/pipe/base/cmdLineTask.py", line 436, in __call__ 
 result = self.runTask(task, dataRef, kwargs) 
 File "/work/stack_INFRA-312/stack/miniconda3-py38_4.9.2-3.0.0/Linux64/pipe_base/g590c34a36e+5da9528084/python/lsst/pipe/base/cmdLineTask.py", line 504, in runTask 
 return task.runDataRef(dataRef, **kwargs) 
 File "/work/stack_INFRA-312/stack/miniconda3-py38_4.9.2-3.0.0/Linux64/drp_qa/w.2024.10/python/pfs/drp/qa/detectorMapQa.py", line 380, in runDataRef 
 outputs = self.run(detectorMap, arcLines, pfsArm) 
 File "/work/stack_INFRA-312/stack/miniconda3-py38_4.9.2-3.0.0/Linux64/drp_qa/w.2024.10/python/pfs/drp/qa/detectorMapQa.py", line 401, in run 
 return self.plotResidual.run(detectorMap, arcLines, pfsArm) 
 File "/work/stack_INFRA-312/stack/miniconda3-py38_4.9.2-3.0.0/Linux64/drp_qa/w.2024.10/python/pfs/drp/qa/detectorMapQa.py", line 109, in run 
 fig = plotting.plotResidual(arc_data, column=column, vmin=slimit[0], vmax=slimit[1])
 File "/work/stack_INFRA-312/stack/miniconda3-py38_4.9.2-3.0.0/Linux64/drp_qa/w.2024.10/python/pfs/drp/qa/utils/plotting.py", line 228, in plotResidual
 used_stats_str = f'USED\n{stats_df.loc["isUsed"].to_string()}'
 File "/work/stack_INFRA-312/conda/miniconda3-py38_4.9.2/envs/lsst-scipipe-3.0.0/lib/python3.8/site-packages/pandas/core/indexing.py", line 967, in __getitem__
 return self._getitem_axis(maybe_callable, axis=axis)
 File "/work/stack_INFRA-312/conda/miniconda3-py38_4.9.2/envs/lsst-scipipe-3.0.0/lib/python3.8/site-packages/pandas/core/indexing.py", line 1202, in _getitem_axis
 return self._get_label(key, axis=axis)
 File "/work/stack_INFRA-312/conda/miniconda3-py38_4.9.2/envs/lsst-scipipe-3.0.0/lib/python3.8/site-packages/pandas/core/indexing.py", line 1153, in _get_label
 return self.obj.xs(label, axis=axis)
 File "/work/stack_INFRA-312/conda/miniconda3-py38_4.9.2/envs/lsst-scipipe-3.0.0/lib/python3.8/site-packages/pandas/core/generic.py", line 3864, in xs
 loc = index.get_loc(key)
 File "/work/stack_INFRA-312/conda/miniconda3-py38_4.9.2/envs/lsst-scipipe-3.0.0/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 3623, in get_loc
 raise KeyError(key) from err
KeyError: 'isUsed'


 Comments   
Comment by Wilfred Gee [ 16/Mar/24 ]

This code is not properly handling data without proper wavelength information (i.e. quartz).

The new code does properly handle this already (and has newer features) so I would rather just get that merged by today and get all the new features out otherwise let me know if I should get a quick hotfix in for just this problem.

Comment by arnaud.lefur [ 16/Mar/24 ]

sure, let's do that.

Comment by Wilfred Gee [ 16/Mar/24 ]

Here's the image if you're curious.

 

Comment by arnaud.lefur [ 16/Mar/24 ]

just let me know when your new code is merged.

Comment by Kiyoto Yabe [ 20/Apr/24 ]

I guess this should have been fixed somewhere, so can we close this?

Comment by Wilfred Gee [ 20/Apr/24 ]

This has been fixed via other tickets.

Generated at Wed Apr 16 14:47:10 JST 2025 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.