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-11922: Add hack to convert raft, sensor x,y to one int. Allows validate_drp to run on obs_lsstSim #70

Merged
merged 1 commit into from Feb 6, 2018

Conversation

wmwv
Copy link
Contributor

@wmwv wmwv commented Feb 3, 2018

This is a bit of a hack to allow validate_drp to run on obs_lsstSim and any other cameras that designate detectors with, e.g., 'raft=(0,1), sensor=(0,2)' instead of a ccd or ccnum.

Uses a new raftSensorToInt function in util to add a 'raft_sensor_int'
entry to the visit Ids while being processed in matchreduce.py.

Takes raft=(0,1), sensor=(0,2) -> 1002

This ID can then be used by multimatch, which requires ints
for the dataId keys used in its indexing.

Uses a new raftSensorToInt function in util to add a 'raft_sensor_int'
entry to the visit Ids while being processed in matchreduce.py.

Takes raft=(0,1), sensor=(0,2) -> 1002

This ID can then be used by multimatch, which requires ints
for the dataId keys used in its indexing.
Copy link
Contributor

@SimonKrughoff SimonKrughoff left a comment

Choose a reason for hiding this comment

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

I'm fine with this. The one comment I'll make is that I think there can be multiple indexes, so you could just add int representations of sensor and raft to the dataId you use to build the multimatch catalog. I don't know if that is less confusing or not.

# Hack to support raft and sensor 0,1 IDs as ints for multimatch
if ccdKeyName == 'sensor':
ccdKeyName = 'raft_sensor_int'
for vId in dataIds:
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this can work. Aren't you shadowing the dictionary you are trying to assign with the iterator variable?
Nevermind, I see now. you are updating the data ids. Disregard the above.

@wmwv wmwv merged commit 45d4127 into master Feb 6, 2018
@ktlim ktlim deleted the tickets/DM-11922 branch August 25, 2018 06:50
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

2 participants