keflavich / cube-line-extractor

4 stars 1 forks source link

Bug (or Unexplained Result): CubeLineMoment Produces Highly-Clustered Mom2 Images #9

Open jmangum opened 7 years ago

jmangum commented 7 years ago

To see what issue this is referring to, use the most recent (just updated) NGC253-H2COJ32K02-CubeLineMomentInput.yaml file to produce H2COJ32K02 moments. The zeroth and first moments look reasonable, but the second moment is highly-clustered around 30 km/s, with just a few "high" spots near 35-40 km/s and a "noise floor" (moment2 values which are the fringes of where we detect signal, if we do at all) of about 20 km/s. I would not have expected the moment2 values to be so highly-clustered in this galaxy.

keflavich commented 7 years ago

I've started making a new set of diagnostic plots to try to understand exactly what's going on under the hood. They'll look like these:

ngc253-h2coj32k02_h2coj32k0_widthscale2 0_sncut2 0_widthcutscale1 5_spectraldiagnostics

ngc253-h2coj32k02_brightest_diagnostic

I still haven't hit the solution because I got distracted by some bugs in the 1D slicing in SpectralCube: https://github.com/radio-astro-tools/spectral-cube/pull/394

jmangum commented 7 years ago

This is an excellent idea Adam. In fact, we are thinking on the same wavelength (except that you are successful at implementing something).
Yesterday I spent a bit of time trying to come up with a visual way to verify mom0 extraction. Thought that I could find a simple peak-find and crude integrate solution for the input cube that I could compare to mom0. Didn't see a path forward and just abandoned it in the end. Your solution looks like exactly what we need to be able to verify the masking. Thanks!

-- Jeff

On 5/31/17 8:59 PM, Adam Ginsburg wrote:

I've started making a new set of diagnostic plots to try to understand /exactly/ what's going on under the hood. They'll look like these:

ngc253-h2coj32k02_h2coj32k0_widthscale2 0_sncut2 0_widthcutscale1 5_spectraldiagnostics https://cloud.githubusercontent.com/assets/143715/26660132/23319fe0-4633-11e7-8f34-c58fd6a73dbd.png

ngc253-h2coj32k02_brightest_diagnostic https://cloud.githubusercontent.com/assets/143715/26660137/2c25038a-4633-11e7-9cae-0cb9e2d60f2b.png

I still haven't hit the solution because I got distracted by some bugs in the 1D slicing in SpectralCube: radio-astro-tools/spectral-cube#394 https://github.com/radio-astro-tools/spectral-cube/pull/394

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/keflavich/mangum_galaxies/issues/9#issuecomment-305359425, or mute the thread https://github.com/notifications/unsubscribe-auth/ADeuSJx9bTlJvWLRawhsedCxt5XZQn4Eks5r_gzcgaJpZM4Nq1kR.Web Bug from https://github.com/notifications/beacon/ADeuSGoiuMIhirz60Av9iuvlxi4Prffoks5r_gzcgaJpZM4Nq1kR.gif

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/keflavich/mangum_galaxies","title":"keflavich/mangum_galaxies","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/keflavich/mangum_galaxies"}},"updates":{"snippets":[{"icon":"PERSON","message":"@keflavich in #9: I've started making a new set of diagnostic plots to try to understand exactly what's going on under the hood. They'll look like these:\r\n\r\n\r\nngc253-h2coj32k02_h2coj32k0_widthscale2 0_sncut2 
0_widthcutscale1 
5_spectraldiagnostics\r\n\r\nngc253-h2coj32k02_brightest_diagnostic\r\n\r\nI still haven't hit the solution because I got distracted by some bugs in the 1D slicing in SpectralCube:\r\nhttps://github.com/radio-astro-tools/spectral-cube/pull/394"}],"action":{"name":"View Issue","url":"https://github.com/keflavich/mangum_galaxies/issues/9#issuecomment-305359425"}}}

jmangum commented 7 years ago

I think that these diagnostic plots will help a lot with setting the my_line_width values for each transition to be extracted from the cube. At the moment one has to kind of guess what the half-width-zero-intensity is for each transition but then has no feedback as to how good or bad these HWZI values are.

keflavich commented 7 years ago

I'm a bit confused by the current set of results. It looks like there are two peaks in the H2CO data, which means all of the moments are invalid. Most likely that is another line and our selected width is too wide.

jmangum commented 7 years ago

Which H2CO line are you looking at?

keflavich commented 7 years ago
  1. There are definitely lines around.

There was a big bug in the whole width argument. I've fixed that now; width_scale=1 should do something much closer to correct.

keflavich commented 7 years ago

These are the H2CO lines selected from widthscale=1, sncut=2. They're better.

ngc253-h2coj32k02_h2coj32k0_moment0_widthscale1 0_sncut2 0_widthcutscale1 0

ngc253-h2coj32k02_h2coj32k0_moment1_widthscale1 0_sncut2 0_widthcutscale1 0

ngc253-h2coj32k02_h2coj32k0_moment2_widthscale1 0_sncut2 0_widthcutscale1 0

ngc253-h2coj32k02_h2coj32k0_widthscale1 0_sncut2 0_widthcutscale1 0_spectraldiagnostics

It still kinda looks like the linewidth is underestimated, but I'm not certain about that.

jmangum commented 7 years ago

I have been updating the yaml files with better HWZI estimates for the my_line_widths values. Pushed new versions, including NGC253-H2COJ32K02 yaml, which should include better linewidth estimates.

jmangum commented 7 years ago

With bug fix to width masking redid spot-checking of various mom0 images. Indeed results are more sensible and spot checking (where I compare by-eye integrated intensity calculation from spectral cube to mom0 image at select locations) shows quite good consistency.