Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-41926: Add "NONE" physical_filter for LSSTCam data #491

Merged
merged 3 commits into from Dec 5, 2023

Conversation

jchiang87
Copy link
Contributor

No description provided.

# and all of the various ways that may be expressed in the FITS
# header.
NoFilterCollection = FilterDefinitionCollection(
FilterDefinition(physical_filter="empty", band="white",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does empty mean if it doesn't mean NONE? If empty and NONE are the same thing I don't know why we need two definitions. If they are two different states then can we add some comments about those different states here?

all of the various ways that may be expressed in the FITS header

is not a reason to add all those various ways into the phyiscal filter definition. The purpose of the metadata translation stage before this is to handle all the various ways consistently so that we don't get questions about the difference between empty and none.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am perfectly happy to not do this change at all. Yousuke and Tony seemed to have a preference to have both of these methods available. If we think that's unreasonable, we should note that on the ticket and just put in the fix-up you suggested to map "NONE" to "empty".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If NONE and empty mean the same thing but people prefer to write NONE in the header, then I really think that we should map NONE to empty in the metadata translator instead. If there are two distinct states where NONE and empty convey different meanings then we should have both.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If NONE and empty mean the same thing but people prefer to write NONE in the header, then I really think that we should map NONE to empty in the metadata translator instead.

Sounds good to me.

@tony-johnson Are these distinct states?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are different. The "NONE" state corresponds to the state where we don't have anything in the optical path. The empty state corresponds to the state where we have the autochanger in the optical path. The autochanger is the thing that holds filters in the optical path. They could be different in terms of how does the edge get blocked.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on Tony's comment here, "NONE" corresponds to the partially occluded case. I'll assume that "empty" refers to the un-occluded case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@timj I've updated the comments so that they describe the different states. Please have another look.

# For this case, all filters are returned to the carousel and the
# auto-changer partially occludes the focal plane. See Tony
# Johnson's comment at https://jira.lsstcorp.org/browse/DM-41675.
FilterDefinition(physical_filter="NONE", band="white",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather this was none to keep it consistent with empty case. The translator can easily map NONE -> none.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made the change, but I'm open to alternative suggestions for mapping NONE->none.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have any opinion whether NONE or none as long as it's not blocking the current data ingestion.

Copy link
Member

@timj timj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks okay. I now get:

$ butler query-dimension-records xxx physical_filter | grep none       
   LSSTCam                 none         white
   LSSTCam            none~HIGH         white
   LSSTCam             none~LOW         white
   LSSTCam            none~blue             g
   LSSTCam           none~nm750             i
   LSSTCam           none~nm850             z
   LSSTCam           none~nm960             y
   LSSTCam             none~red             r
   LSSTCam              none~uv             u

@@ -673,6 +673,9 @@ def to_physical_filter(self):
if not joined:
joined = "unknown"

# Replace instances of "NONE" with "none".
joined = joined.replace("NONE", "none")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine so long as we don't have any bigger strings with NONE in.

@jchiang87 jchiang87 merged commit 46dde25 into main Dec 5, 2023
3 checks passed
@jchiang87 jchiang87 deleted the tickets/DM-41926 branch December 5, 2023 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants