Skip to content

Add filter to title of PsfShapeAzEl plot#74

Open
gmegh wants to merge 12 commits intomainfrom
tickets/DM-54262
Open

Add filter to title of PsfShapeAzEl plot#74
gmegh wants to merge 12 commits intomainfrom
tickets/DM-54262

Conversation

@gmegh
Copy link
Copy Markdown
Contributor

@gmegh gmegh commented Feb 25, 2026

No description provided.

@gmegh gmegh requested a review from mfisherlevine February 25, 2026 18:39
Comment on lines +553 to +554
hmax = 1.5 if np.nanquantile(fwhm, 0.75) < 1.5 else 3.0
axs[0, 2].hist(fwhm, bins=np.linspace(0.4, hmax, 100), color="C0")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is it OK to hard-code the 0.4, 100 here and below?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it's fine. We can give the magic numbers some names if you like. Part of the goal for this PR though is to have consistent plots from one visit to the next - hence the fixed limits.


# Kurtosis hist
axs[2].hist(kurtosis, bins=int(np.sqrt(len(table))), color="C3")
axs[2].hist(kurtosis, bins=np.linspace(1.8, 2.3, 100), color="C3")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is it OK to hard-code these too?

table: Table,
camera: Camera,
maxPointsPerDetector: int = 5,
band: str,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think you're actually passing in the physical filter, not the band, so it might be better to call it that. In fact, it's annotated as filter below, too.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah, I switched this from filter since that's a python builtin. Happy to make this physical_filter though.

Comment on lines 842 to 848
filter : `str`
The filter name to include in the plot title.
camera : `list`
The list of camera detector objects.
band : `str`
Name of the current filter band.
maxPointsPerDetector : `int`, optional
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One of these needs to go.

table: Table,
camera: Camera,
maxPointsPerDetector: int = 5,
band: str,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

See previous comment about band vs filter.

Comment on lines +1064 to +1066
# azelAngle = 0.0
# xyAngle = -np.pi / 2 - table.meta["rotTelPos"]
# neAngle = -table.meta["rotTelPos"] - table.meta["rotSkyPos"]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please remove commented code.

axs: npt.NDArray[np.object_],
table: Table,
camera: Camera,
band: str,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

See previous comment about band vs filter.

Comment on lines +1114 to +1119
filter : `str`
The filter name to include in the plot title.
camera : `list`
The list of camera detector objects.
band : `str`
Name of the current filter band.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Again, one needs removing.

plotHigherOrderMomentsData(axs[2, :], table, prefix="aa_")

plotData(axs[:2, :], table, maxPointsPerDetector, minPointsPerDetector, prefix="aa_")
band = band[0] # "i_39" -> "i" for example
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  1. I'm not sure this is robust, and 2) I think this makes it clear that it should be band = filter[0].

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I went ahead with band = physical_filter[0].

Comment on lines +1167 to +1172
"u": "#85b7ff",
"g": "#a4dfaf",
"r": "#e28d7e",
"i": "#ffe07e",
"z": "#f89fd0",
"y": "#ad7f7f",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As above.

@jmeyers314
Copy link
Copy Markdown
Contributor

Thanks @mfisherlevine . Think I've hit all your comments.

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.

3 participants