-
Notifications
You must be signed in to change notification settings - Fork 65
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
Attach custom beam #433
Attach custom beam #433
Conversation
I would prefer this be a |
spectral_cube/spectral_cube.py
Outdated
if not isinstance(beam, Beam): | ||
raise TypeError("beam must be a radio_beam.Beam object.") | ||
|
||
if beam is not None: |
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.
we're already in the else
of if beam is None
, so this if
could just be deleted with no change of indentation, I think
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.
no, I'll have to duplicate the three lines below that if
without it for when the beam is loaded from the header. The other option would be to move loading a beam from the header somewhere into io.fits
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.
right, good point, OK.
Agreed. I changed both to be It highlighted one issue in 2D objects when the slice is taken along a position-velocity slice:
We should probably just not allow this type of slicing with a VRSC. |
@keflavich - separate PR for the above error? One test should fail on travis. |
It's OK to fix it here if you want |
From #432. A beam object can now be attached with:
Since radio-beam is now a dependency, I've removed the
read_beam
option fromSpectralCube
. We need to keep it forProjection
though since there remains the issue with non-matching celestial axes for some slices.