Search code examples
pythonastropyastronomyfits

How to create moment 1 map (also known as velocity filed or velocity map) using python?


I need to create a moment 1 map using Python and I cannot use SpectralCube package to produce it (.moment(order=1) method). The problem is I've stucked and basically everything I write is just a garbage. Does anyone have an experience with moment maps and can help with that? I'm working with cubes and I handle fits using astropy. Just to make you sure what I mean I'll put an explanation from CASA documentation: Moments explained


Solution

  • Stackoverflow isn't the best place to ask this question; you'd likely benefit from asking on an astronomy-specific forum.

    That said, the most likely reason your moment-1 map would look like garbage is if you include a lot of noise. Since the first moment is the intensity-weighted coordinate, if you have a large cube with a lot of noisy pixels, you may get only noise out. A good approach is to mask the data before computing the moments. If you use only pixels with significant detections above the noise, the moment maps will generally come out clean.