[PIPE2D-889] pfsConfig.selectByFiberStatus does not return the fiber indices Created: 24/Aug/21  Updated: 24/Aug/21  Resolved: 24/Aug/21

Status: Won't Fix
Project: DRP 2-D Pipeline
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Normal
Reporter: hassan Assignee: price
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to PIPE2D-887 DisplayDetectorMap does not display T... Open
relates to PIPE2D-888 DisplayDetectorMap should allow user ... Open
Story Points: 1
Sprint: 2DDRP-2021 A 8

 Description   

The method PfsConfig.selectByFiberStatus() returns indices of each fiberId specified, if that fiber has the corresponding FiberStatus matching that specified in the method argument.

However the method does not behave as expected. The outputs of the following two lines should be the same:

pfsConfig.selectFiber([3, 201, 649])
array([  0,  84, 253])
pfsConfig.selectByFiberStatus(pfs.datamodel.FiberStatus.GOOD, [3, 201, 649])
array([0, 1, 2])


 Comments   
Comment by price [ 24/Aug/21 ]

This is behaving exactly as expected. pfsConfig.selectFiber([3, 201, 649]) returns the indices of the provided fiberIds. pfsConfig.selectByFiberStatus(pfs.datamodel.FiberStatus.GOOD, [3, 201, 649]) returns the indices of fibers that are GOOD in the provided array, and since fibers 3, 201 and 649 are all GOOD, you get indices 0, 1, 2 (see https://github.com/Subaru-PFS/datamodel/blob/master/python/pfs/datamodel/pfsConfig.py#L627-L628).

pfsConfig.selectByFiberStatus is from a while ago, and I don't think it's the most helpful. I now find myself using pfsConfig.select and pfsArm.select in most places I want to select fibers.

Comment by hassan [ 24/Aug/21 ]

You are right, sorry. The issue is in a different area with respect to DisplayDetectorMap. Closing ticket.

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