[PIPE2D-878] refLines.plot() failure Created: 04/Aug/21  Updated: 05/Aug/21  Resolved: 05/Aug/21

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

Type: Task Priority: Normal
Reporter: ncaplar Assignee: price
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Story Points: 1
Sprint: 2DDRP-2021 A 7, 2DDRP-2021 A 8
Reviewers: hassan

 Description   

refLines.plot() fails with 

---------------------------------------------------------------------------
 AttributeError Traceback (most recent call last)
 <ipython-input-175-540f3c26a154> in <module>
 ----> 1 refLines.plot()/tigress/HSC/PFS/stack/20190925/stack/miniconda3-4.5.12-1172c30/Linux64/drp_stella/w.2021.31/python/pfs/drp/stella/referenceLine.py in plot(self, what, ls, alpha, color, label, labelStatus, labelLines, wavelength, spectrum)
 266 labels = {} # labels that we've used if labelLines is True
 267 for rl in self:
 --> 268 if (rl.status & rl.Status.NOT_VISIBLE):
 269 color = 'black'
 270 label = "not visible"AttributeError: 'ReferenceLine' object has no attribute 'Status'

Hassan and I think that this should be trivial change in which rl.Status  needs to be changed to either rl.status.NOT_VISIBLE  or ReferenceLineStatus.NOT_VISIBLE
This also applied to all other subsequent statues. 
Please confirm if this is correct?



 Comments   
Comment by price [ 05/Aug/21 ]

hassan, could you please check the code?
ncaplar, could you please check that this works for you? Please note that there have been some slight changes to the API.

Comment by price [ 05/Aug/21 ]

Merged.

Comment by hassan [ 05/Aug/21 ]

Pull request https://github.com/Subaru-PFS/drp_stella/pull/213 looks fine to me. No comments.

Generated at Sat Feb 10 15:59:16 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.