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

argument after keywords with defaults #205

Open
esheldon opened this issue Dec 12, 2023 · 5 comments
Open

argument after keywords with defaults #205

esheldon opened this issue Dec 12, 2023 · 5 comments

Comments

@esheldon
Copy link
Collaborator

Didn't even know this was legal, need to fix this while maintaining backwards compat

https://github.com/LSSTDESC/descwl-shear-sims/blame/3990880af4976a25a0e205df290d8df6d0d66067/descwl_shear_sims/sim.py#L267

@beckermr
Copy link
Collaborator

It is due to the * at the start of the function signature. That entry is interpreted as a required keyword without a default AFAIK.

@esheldon
Copy link
Collaborator Author

thanks for the explanation.

I guess we can just leave it then

@beckermr
Copy link
Collaborator

I would not leave it IMHO. That keyword should come first in the list at minimum for clarity.

mr-superonion added a commit to mr-superonion/descwl-shear-sims that referenced this issue Dec 12, 2023
@mr-superonion
Copy link
Collaborator

mr-superonion commented Dec 12, 2023

I set it to None by default:

coadd_bbox_cen_gs_skypos=None,

and change it to WORD_ORIGIN if it is None:
if coadd_bbox_cen_gs_skypos is None:
coadd_bbox_cen_gs_skypos = WORLD_ORIGIN

@mr-superonion
Copy link
Collaborator

In the future, we will enable user to input se_wcs. Let's open new issue for that.

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

No branches or pull requests

3 participants