Conversation
36353a2 to
76e7a21
Compare
| ax.invert_xaxis() | ||
| # This doesn't work but I would like it to. | ||
| # sp.ax.set_xlim(xlim) | ||
| # sp.ax.set_ylim(ylim) |
There was a problem hiding this comment.
You need to do sp.set_extent([xlim[0], xlim[1], ylim[0], ylim[1]])
78299ab to
60e7561
Compare
| width = maxRa - minRa | ||
| height = maxDec - minDec | ||
| if width > 10: | ||
| width = minRa + 360 - maxRa |
There was a problem hiding this comment.
I'm trying to think of a better way of doing this. The problem is that if you could specify the corners or the rectangle (rather than pos and width/height) it would work fine in skyproj which understands spheres. But with the Rectangle interface you might be stuck with this.
| else: | ||
| ax = fig.add_subplot(111) | ||
| sp = skyproj.McBrydeSkyproj(ax=ax, extent=[-180, 180, -90, 30]) | ||
| proj = sp.ax.projection |
There was a problem hiding this comment.
As I have learned the hard way debugging skyproj (now merged to main, not released yet and not suitable for this PR right now), you have to do proj = copy.copy(sp.ax.projection). (And import copy on top). Otherwise there is a race condition and you may not get rectangles.
| linewidths=0.5, | ||
| zorder=100, | ||
| for i, tract in enumerate(data["tract"][outlierInds]): | ||
| corners = getTractCorners(skymap, tract) |
There was a problem hiding this comment.
Here's that bad getTractCorners again.
| nanPatch = Patch( | ||
| facecolor="white", | ||
| for i, tract in enumerate(data["tract"][nanInds]): | ||
| corners = getTractCorners(skymap, tract) |
| edgecolors=outlierColor, | ||
| linewidths=0.5, | ||
| zorder=100, | ||
| for i, tract in enumerate(data["tract"][outlierInds]): |
There was a problem hiding this comment.
Is all this duplicated code necessary? Can't you loop over all tracts and check as you add each one if it's an inlier, an outlier, or a nan-liar?
60e7561 to
7a84755
Compare
7a84755 to
01b3eb9
Compare
erykoff
left a comment
There was a problem hiding this comment.
A couple of minor comments. This looks great, and the plots look great!
| sp = skyproj.McBrydeSkyproj(ax=ax) | ||
| else: | ||
| ax = fig.add_subplot(111) | ||
| sp = skyproj.McBrydeSkyproj(ax=ax, extent=[-180, 180, -90, 30]) |
There was a problem hiding this comment.
So this is specifically and always the LSST region?
| sp = skyproj.McBrydeSkyproj(ax=ax, extent=[-180, 180, -90, 30]) | ||
|
|
||
| # Eli says this step is necessary and he knows more | ||
| # than me about most things but especially skyproj. |
There was a problem hiding this comment.
You do not need this comment here. But you can say that this copy is necessary to avoid a possible race condition when drawing figures in skyproj, and has been fixed in an upcoming version of skyproj.
There was a problem hiding this comment.
The other thing is that the newest version of skyproj allows you to draw the patch directly ... but this isn't in our env yet.
| # Get bounding box is needed if the skymap isn't rings | ||
| # The discrete skymaps don't return a box from | ||
| # getInnerSkyRegion | ||
| tractBox = skymap[tractId].getInnerSkyRegion().getBoundingBox() |
There was a problem hiding this comment.
If the inner sky region is a Box then is this final thing a no-op?
There was a problem hiding this comment.
It is, but this catches the cases when it isn't.
f8ce37d to
76fc365
Compare
76fc365 to
ee42550
Compare
No description provided.