-
Notifications
You must be signed in to change notification settings - Fork 6
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
Mauchian #1215
Mauchian #1215
Conversation
Can one of the admins verify this patch? |
Is this hanging? @paoloserra |
Shouldn't be, it just takes a little time. |
Retest this please |
@dane-kleiner I've hijacked your PR to make @o-smirnov happy and close #1214 , hope you don't mind! |
Doesn't work... |
I don't have any idea. Jenkins is not activated. |
ok to test |
}) | ||
if config[key]['cleanmask_localrms'][num-1 if len(config[key]['cleanmask_localrms']) >= num else -1]: |
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 isjust cosmetics of course, but in the interest of readability (who will think of the future generations!), I would prefer to phrase that as
local_rms = config[key]['cleanmask_localrms'][min(num-1, len(config[key]['cleanmask_localrms'])-1)]
if local_rms:
image_opts.update({
"local-rms": local_rms,
"local-rms-window": config[key]['cleanmask_localrms_window'][min(num-1, len(config[key]['cleanmask_localrms'])-1)]
})
...since that if-else construct is a big eyeful to take in, and recurs a lot.
Even better, define a helper function in there:
def n_1_or_last(seq, num):
return seq[min(num-1, len(seq)-1)]
...since I presume this treatment of lists happens all over the place?
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.
yeah that would be neater -- we can sneak that into the next PR
Implements the option of using the Mauch et al. (2020) primary beam correction. Addresses the primary beam correction in #1180, although not for the mosaicking.