-
Notifications
You must be signed in to change notification settings - Fork 39
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
Unit of v_cen not given properly - no first moment #139
Comments
Hi @PeterSchilke - are you looking at a catalog produced from the dendrogram? (How) have you specified the metadata? |
here is an example of metadata specification for a PPV cube: https://github.com/keflavich/APEX_CMZ_H2CO/blob/master/analysis/dendro_temperature.py#L60 |
I have specified the metadata - but they are not used, here the @Property On 05/08/2015 03:12 PM, Adam Ginsburg wrote:
Prof. Dr. Peter Schilke |
In principle, at least,
EDIT: this note implies that you might be getting the right values out of |
This may well be - the file is read from fits, and if the WCS is not Anyway, the more interesting point for me would be to know if the first On 05/08/2015 03:21 PM, Adam Ginsburg wrote:
Prof. Dr. Peter Schilke |
@PeterSchilke try something like this, if you've opened a FITS file:
This isn't a complete example, but should give you a general idea of how to incorporate the WCS, which should then result in a correctly computed 1st moment |
I do that, but get an error message: In [39]: stat = PPVStatistic(d.trunk[0], metadata=metadata) In [40]: stat.v_cenValueError Traceback (most recent call last) /usr/lib/python2.7/site-packages/astrodendro/analysis.pyc in v_cen(self) /usr/lib/python2.7/site-packages/astrodendro/analysis.pyc in /usr/lib64/python2.7/site-packages/astropy/wcs/wcs.pyc in /usr/lib64/python2.7/site-packages/astropy/wcs/wcs.pyc in /usr/lib64/python2.7/site-packages/astropy/wcs/wcs.pyc in ValueError: When providing two arguments, the array must be of shape (N, 4) InOn 05/08/2015 03:38 PM, Adam Ginsburg wrote:
Prof. Dr. Peter Schilke |
@PeterSchilke Ah, this makes sense! You have a 4D cube, where one dimension is the (degenerate) STOKES axis. There are two solutions you can try:
|
I tried solution 2. No error message, but now the values have no units In [77]: stat.y_cen In [78]: stat.v_cen In [79]: stat.x_cen WCSAXES = 3 / Number of coordinate On 05/08/2015 03:59 PM, Adam Ginsburg wrote:
Prof. Dr. Peter Schilke |
@PeterSchilke - yes, units for these are not implemented yet, but it looks like those values are in m/s |
Thanks! On 05/08/2015 04:11 PM, Adam Ginsburg wrote:
Prof. Dr. Peter Schilke |
Hi,
I am looking at a PPV datacube, and the unit of v_cen is not given properly, just in pixels. But I also don't think this is the first moment (the intensity weighted velocity centroid), but just the header information, while v_rms is the proper second moment.
The text was updated successfully, but these errors were encountered: