# {{detect_isPrimary}} is not consistently set

XMLWordPrintable

#### Details

• Type: Bug
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
None
• Story Points:
2
• Team:
Data Release Production

#### Description

Running to the end of the "Getting Started with the LSST piplines" tutorials

https://pipelines.lsst.io/getting-started/multiband-analysis.html

I think I have encountered a bug in how detect_isPrimary gets set. The documentation says that it is the union of deblend_nChild==0 with detect_isPatchInner and detect_isTractInner, however:

 >>> by_hand = (refTable['deblend_nChild']==0) & refTable['detect_isPatchInner'] & refTable['detect_isTractInner']   >>> np.where(by_hand != refTable['detect_isPrimary']) (array([4708, 4709, 4711, 4712, 4713, 4714, 4715, 4716, 4717, 4718, 4720,  4721, 4722, 4723, 4724, 4725, 4726, 4727, 4728, 4730, 4731, 4732,  4733, 4734, 4735, 4736, 4737, 4738, 4740, 4741, 4743, 4744, 4745,  4746, 4747, 4748, 4749, 4750, 4751, 4752, 4753, 4754, 4755, 4756,  4757, 4758, 4759, 4760, 4761, 4762, 4763, 4764, 4766, 4768, 4769,  4770, 4771, 4772, 4773, 4774, 4775, 4776, 4777, 4778, 4779, 4780,  4781, 4782, 4783, 4784, 4785, 4786, 4787, 4788, 4789, 4790, 4791,  4792, 4793, 4794, 4795, 4796, 4797, 4798, 4799, 4800, 4801, 4802,  4803, 4804, 4805, 4806, 4807, 4918]),) 

where refTable is loaded as specified in the tutorial outlined above.

As always: let me know if you need more information to recreate this behavior. It is not impossible that this is just user error.

#### Activity

Hide
Bob Armstrong added a comment -

We found that this discrepancy is due to the fact that sky objects are also rejected from isPrimary which was not documented. We have updated the documentation accordingly.

Show
Bob Armstrong added a comment - We found that this discrepancy is due to the fact that sky objects are also rejected from isPrimary which was not documented. We have updated the documentation accordingly.
Hide
Jonathan Sick added a comment -

Thanks for waiting. You can rebase and merge now.

Show
Jonathan Sick added a comment - Thanks for waiting. You can rebase and merge now.
Hide
John Swinbank added a comment -

Bob's last day at Princeton was yesterday — while he won't be disappearing from DM, I think he'll be distracted by moving and starting his new job for the next several weeks at least. Given that, I'll merge and close this ticket myself.

Show
John Swinbank added a comment - Bob's last day at Princeton was yesterday — while he won't be disappearing from DM, I think he'll be distracted by moving and starting his new job for the next several weeks at least. Given that, I'll merge and close this ticket myself.
Hide
John Swinbank added a comment -

Done. Thanks Bob Armstrong!

Show
John Swinbank added a comment - Done. Thanks Bob Armstrong !

#### People

Assignee:
Bob Armstrong
Reporter:
Scott Daniel
Reviewers:
Jonathan Sick
Watchers:
Bob Armstrong, John Swinbank, Jonathan Sick, Scott Daniel