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-44917: Add psf focal plane plotting #42

Merged
merged 10 commits into from
Aug 2, 2024
Merged

Conversation

mfisherlevine
Copy link
Contributor

No description provided.

python/lsst/summit/extras/plotting/focusSweep.py Outdated Show resolved Hide resolved
python/lsst/summit/extras/plotting/focusSweep.py Outdated Show resolved Hide resolved
f"from cdb_lsstcomcamsim.visit1_quicklook WHERE visit_id in ({visitString}) "
"ORDER BY visit_id"
)
data["seqNum"] = data["visit_id"] % 10000

Choose a reason for hiding this comment

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

It looks like you're already expecting to be given DimensionRecords for all of these visits, and it'd be a lot less fragile to pull these out in the loop below as

row["seqNum"] = record.seq_num

Copy link
Collaborator

Choose a reason for hiding this comment

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

Agreed. We don't generally approve of people parsing the visit_id because the form depends directly on the visit system and that isn't being checked here. It works because consDB is using a single visit system.

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 totally agree (and this is Josh's code btw). I think the issue here is that the data can come out of consDB in any order (at least in theory), so either we need to build the table up by looping over the DimensionRecords, which is inefficient, but would mean we have the seqNum from the loop, or we need to get it from something in the table already, otherwise we don't actually know which DimensionRecord it came from. Really, that should just already be a column in the database though, and then this would be a non-issue (here and many other places), but we don't have the wide views yet and KT doesn't want to replicate things anywhere.

Copy link
Contributor Author

@mfisherlevine mfisherlevine Jul 26, 2024

Choose a reason for hiding this comment

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

Oh, I see what Jim means about the "loop below" - I missed that. OK, that's gross but makes sense. OK, I'll do that 👍

python/lsst/summit/extras/plotting/focusSweep.py Outdated Show resolved Hide resolved
python/lsst/summit/extras/plotting/focusSweep.py Outdated Show resolved Hide resolved
python/lsst/summit/extras/plotting/psfPlotting.py Outdated Show resolved Hide resolved
python/lsst/summit/extras/plotting/psfPlotting.py Outdated Show resolved Hide resolved
python/lsst/summit/extras/plotting/psfPlotting.py Outdated Show resolved Hide resolved
python/lsst/summit/extras/plotting/psfPlotting.py Outdated Show resolved Hide resolved
python/lsst/summit/extras/plotting/psfPlotting.py Outdated Show resolved Hide resolved
@mfisherlevine mfisherlevine merged commit e84949b into main Aug 2, 2024
4 checks passed
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

4 participants