-
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
ValueError: Original doppler_convention not set #930
Comments
Right, it looks like the cube reader isn't picking up the velocity convention from the header, and it could be. That should be an easy fix. |
Or is there a method that I can reproject just the celestial coordinates, not the velovity coordinates? |
I think you just need to change the target header's RESTFRQ - it's unset, so the velocity isn't translatable to frequency/wavelength |
OK, setting the it gives me 2 warnings
But there is another issue: if I have DATA1 which covers and I want to convert DATA1 to DATA2.header can the reprojection of DATA1 still cover all the original velocities, that is |
No, It seems that maybe you want data1 reprojected to the same velocity resolution as data2, but you do not want them on the same grid? In that case, just modify data2.header to have more pixels (and maybe adjust Right now, it's unclear what your end goal is. |
For example, data1 is data2 is so when I reproject data1 to data2, data1 should be or is there a keyword which I can only reproject just the celestial coordinates, not the velocity coordinates, so that after reprojection data1 is still |
What is the problem this feature will solve?
I have 2 FITS data cubes, one use
VRAD
as velocity, the other useVOPT
as velocity, I want to convert one velocity to another and write to a new FITS file.I read fits standard and get:
By convention, the ‘radio’ velocity is given by c(ν0 − ν)/ν0 and the ‘optical’ velocity is given by c(λ − λ0)/λ0.
If I just edit
CTYPE3
of Header 1 toVOPT
,cube.reproject
returns:I know that in both headers, the
CRVAL3
CRPIX3
CDELT3
have the (almost) same valuesbut it is necessary to re-calculate the velocities:
VRAD * (λ/λ0) = VOPT, VOPT * (ν/ν0) = VRAD
Header 1
Header 2
The text was updated successfully, but these errors were encountered: