[PIPE1D-65] Mask pixel plots should interpret bit flags Created: 30/Jul/22  Updated: 30/Jul/22

Status: Open
Project: DRP 1D pipeline
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Normal
Reporter: hassan Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to PIPE1D-63 Bad redshift measurements again? Done

 Description   

The masked pixel plots provided in PIPE1D-63 from the 1D-team show just the raw mask values, with no interpretation of the individual flags. Please provide such plots based on the flag values rather than the raw values.

See https://github.com/Subaru-PFS/datamodel/blob/54a6a847a76ab8401f71e2aca6db665648e1aaca/datamodel.txt#L690-L714 for an explanation of the bit mask values. The flag property of the pfsObject also has this information:

In [42]: obj.flags
Out[42]: MaskHelper({'BAD': 0, 'BAD_FIBERTRACE': 11, 'BAD_FLAT': 9, 'BAD_FLUXCAL': 13, 'BAD_SKY': 12, 'CR': 3, 'DETECTED': 5, 'DETECTED_NEGATIVE': 6, 'EDGE': 4, 'FIBERTRACE': 10, 'I
NTRP': 2, 'NO_DATA': 8, 'SAT': 1, 'SUSPECT': 7, 'UNMASKEDNAN': 14, 'OVERLAP': 15})
In [45]: obj.flags.interpret(128)
Out[45]: ['SUSPECT']

There are additional 2DDRP utilities to help interpret the mask values.


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