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

Strip whitespace from BUNIT #257

Merged
merged 4 commits into from
Dec 23, 2015

Conversation

e-koch
Copy link
Contributor

@e-koch e-koch commented Dec 23, 2015

All white-space is now stripped from the BUNIT. I have a header written by CASA that has extra whitespaces in the BUNIT: Jy / beam.

@keflavich
Copy link
Contributor

Darn, I was worried about this corner case but I thought FITS automatically stripped the whitespace.

Might it be better to use re? e.g., re.sub("\s","",self._meta['BUNIT'].lower())?

@keflavich
Copy link
Contributor

Also, could you add a test for this?

@e-koch
Copy link
Contributor Author

e-koch commented Dec 23, 2015

Switched to re. It does look a bit cleaner.

@keflavich, mind having a second look?



def test_jybeam_whitespace():

Copy link
Contributor

Choose a reason for hiding this comment

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

Add in a comment here that this is a regression test for #257

@keflavich
Copy link
Contributor

👍 I'll merge it with the comment added.

@keflavich
Copy link
Contributor

or you can merge it

e-koch added a commit that referenced this pull request Dec 23, 2015
@e-koch e-koch merged commit 5e4b4f1 into radio-astro-tools:master Dec 23, 2015
@e-koch e-koch deleted the jy_beam_strip_space branch December 23, 2015 23:36
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.

2 participants