-
Notifications
You must be signed in to change notification settings - Fork 1
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-36211: Add PeekExposureTask #75
Conversation
a9b1465
to
c6f62ed
Compare
Started addressing flake8 failures reported here, then noticed that at some of my original formatting was apparently set by running first |
0a9c447
to
3126d57
Compare
3126d57
to
9d86acd
Compare
It does (currently, intend to) follow the same dev guide, yes. But it's not |
The easiest thing to do is to fixup those problems by hand for now, sorry. In the future, once I've merged some large tickets, we'll black and isort everything, but I need to merge some monster tickets because otherwise I'll be rebase hell. |
Well, easiest may be to just add W503 and E203 to https://github.com/lsst-sitcom/summit_utils/blob/main/setup.cfg#L4 (If I'm reading the dev guide right, then I think W503 should be added regardless of any potential black transition). But I'm happy to do either. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm hitting Approve because I don't know what the standards are for this package, or more importantly where the balance is between standing something up quickly and being able to maintain it, and so I'm happy to defer to the author on that. There are issues here that I'd consider a maintenance problem if the code was going into lsst_distrib
.
default=50, | ||
doc="Maximum binning factor for donut mode", | ||
) | ||
# override installSimplePsf with donut kernel here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a TODO entry that was suppose to happen on this branch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More of: started working on it, decided I didn't need it, but didn't want to lose the partial progress. So my tentative plan was to commit it, and then delete it so it at least lives on in git history.
|
||
|
||
# retrieve best-effort-isr and run PET on it | ||
def doit(idx, row, doPlot): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and initializer()
both need docstrings, especially as this is some of the weirder bits of the code. Also, I'd rename them both tbh: initializer
sounds like a class, the function would more likely be verb, and doit()
could at least be called doWork
do runTask
or something?
self.log.warn("No sources found in spec mode.") | ||
if self.config.doPhotoFallback: | ||
self.log.warn("Falling back to photo mode.") | ||
result = self.photo.run(exposure, nobin=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, is this the only reason nobin
exists? If so then I think it's fine to leave it as-is, and just have the binning controlled by the binning factor then (as people can just use 1 for no binning). Out of interest though, why is this necessarily not binned? Because in this case we're known to be struggling, and therefore our best chance of winning is to go totally unbinned?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I think I remember now. It's because having passed through self.spec.run, the exposure is already binned, so this is to prevent binning it a second time...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although, the clone() was supposed to prevent that? I'll have to trace through to be certain...
Lots of quite picky comments from me, sorry. Generally, this package follows the DM dev guide as closely as is reasonably possible (and it's generally possible to follow it completely 🙂). |
Also, and this one is really annoying, but this package is in camelCase, and this is bringing in a mix of snake and camel. Hopefully a quick find & replace can fix that up and not be too onerous?! 😬 Sorry! |
175349e
to
9bc73c8
Compare
025a1d1
to
c5a9052
Compare
Adds
PeekExposureTask
as a solution to quickly find the brightest source (for observing scripts), and also quickly estimate PSF moments along xy, altaz, and equitorial axes.