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

Possible fixes to the stacking code #465

Merged
merged 7 commits into from
Feb 7, 2018

Conversation

keflavich
Copy link
Contributor

cc @e-koch - the padding might be off. Testing underway...

@keflavich keflavich requested a review from e-koch February 7, 2018 00:55
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.01%) to 74.76% when pulling 8f9d06c on keflavich:stacker_fixes into 4f49fa0 on radio-astro-tools:master.

Copy link
Contributor

@e-koch e-koch left a comment

Choose a reason for hiding this comment

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

👍

@@ -269,7 +276,10 @@ def stack_spectra(cube, velocity_surface, v0=None,

all_shifted_spectra.extend([out for out in shifted_spectra])

stacked = stack_function(all_shifted_spectra, axis=0)
shifted_spectra_array = np.array(all_shifted_spectra)
assert shifted_spectra_array.ndim == 2
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just for the record, this is to solve a different issue - I once encountered an empty or weirdly shaped all_shifted_spectra, and I want to prevent that. Obviously assertions are not that useful in production code, but it should make future related errors easier to trace.

@keflavich keflavich merged commit da39b15 into radio-astro-tools:master Feb 7, 2018
@keflavich keflavich deleted the stacker_fixes branch February 7, 2018 18:33
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.

3 participants