Open kmhess opened 2 years ago
@paoloserra would very much appreciate your thoughts on how to adapt other plots besides mom0 for absorption line sources like ARP 220 here... It's not quite as straight forward as I was thinking it would be...
Still needs work, but:
Hi @kmhess , sorry for the late reaction on this.
I've given this a try. While it may work well for sources with absorption, plotting negative contours can be confusing and not very useful in the case of regular, emission-only sources. See example below, where the outer, negative contour overlaid on the greyscle HI is not useful.
I'm also finding a different behaviour depending on whether the contours are plotted before regridding (as in the HI-optical overlay) or after regridding (as in the HI-HI overlay). Before regridding, nothing is plotted. After regridding, sometimes a contour is plotted. See example below.
In fact, I'm now often getting an annoying message about No contour levels were found within the data range
, probably because the mom0 image rarely has negative emission at -1 * base_contour
.
In summary, I think we need to trigger the use of negative contours only for sources that need them.
Hey @paoloserra I think the contours may not have been plotted in the HI-opt because I apparently forgot to implement it for user supplied images, just for downloaded surveys. I could see two possible solutions: (1) simply keep the automatic plotting but start at a lower level -1 basecontour 2^1 rather than 2^0 and embed this in a try/except or (2) test if there are pixels at say -5*basecontour before plotting.
@kmhess I've now implemented your suggestion nr 2 (kind of) in #55 (same PR where I'm fixing the regridding issue and a few other things). It should be OK now, but please have a look!
@paoloserra Okay...I'm going to do some debugging...it looks like the non-regridding doesn't work for cubes in B1950 yet, but hopefully is just a matter of correctly transforming the HI center... Also, when I ran #55 on arp 220, the lowest positive HI contour in the pv diagram disappeared, and there was actually an additional negative contour in the mom0 maps.
For the PVD, the lowest positive contour is supposed to be 3*pvd_rms
, right?
For the mom0 map negative contours, is it possible that you used to start from -2*base_contour
? I thought that was a mistake, and that we actually want to start from -1*base_contour
, but let me know if that's not correct.
Yeah, hadn't thought about B1950... :(
For the mom0 maps, I think you're right. I was doing range(10,0,-1) but forgot that it's exclusive of the last value. I think your fix is correct, so will leave as is.
For the pvd, it was a typo of np.nanmin vs np.nanmax for the positive contours. Easy fix that I'll implement.
I'll now test on B1950 and the Galactic Coords maps I have.
OK, thanks!
Thank you for working to close all these outstanding issues. :)
@paoloserra Yeah... this isn't working for I think the same reasons that the non-regridding didn't work before. The problem is that the optical image is always retrieved in ICRS (because SkyView was failing for B1950), but then the optical and HI images are in different coordinate systems, and even if I can transform individual positions, there is no way to transform WCS's, without regridding the whole image. (The transformation can potentially include rotation.) So...I don't think I can accept this PR. If you want a test data set in B1950 to keep banging away at this, I can send you one.
Maybe we should move this discussion to #55 :)
I think there are two outstanding questions for this issue. First is how to possibly fix the gray scale map. One possibility would be to make a dual color map like what is done for the pvd, but in this case I would try to only apply the second color map if there is strong negative emission. The second issue is whether the absorption should be represented in the SNR map or not. Finally, based on the SoFiA discussion on Monday, I think the mom1 map has to stay as is.
Are there any other considerations?
Dashed contours in white on the multiwavelength images, dashed in a different color (blue?) on the gray-scale image.