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

Minor tweaks to improve error handling if arguments are in the wrong format #191

Merged
merged 4 commits into from
Apr 16, 2019

Conversation

philbull
Copy link
Collaborator

@philbull philbull commented Mar 8, 2019

I noticed a couple of instances where functions were giving poor or confusing feedback when the wrong (or mis-formatted) arguments were passed. I changed them to give more useful feedback to the user, and also updated some docstrings.

I also allowed users to set wgts=None when initialising PSpecData objects (which causes all weights to be set to whatever the flags are in the input UVData objects), and allowed the baseline_tol kwarg to be user-specified in the pspec() method, as it was previously hard-coded to 1.0 (this number is passed to the validate_blpairs() method).

@ghost ghost assigned philbull Mar 8, 2019
@ghost ghost added the in progress label Mar 8, 2019
@coveralls
Copy link

coveralls commented Mar 8, 2019

Coverage Status

Coverage decreased (-0.04%) to 96.474% when pulling 8ba0838 on fix_pspec_input_args into 0de985e on master.

Copy link
Contributor

@acliu acliu left a comment

Choose a reason for hiding this comment

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

Just one tiny thing that I'm confused about regarding the strings specifying polarization. Thanks!

hera_pspec/pspecdata.py Show resolved Hide resolved
Copy link
Contributor

@acliu acliu left a comment

Choose a reason for hiding this comment

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

Thanks for the docstring changes. Looks great!

@philbull philbull merged commit 78c5fe8 into master Apr 16, 2019
@ghost ghost removed the in progress label Apr 16, 2019
@philbull philbull deleted the fix_pspec_input_args branch April 16, 2019 22:49
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.

None yet

3 participants