NCAR / ucomp-pipeline

Data processing pipeline for UCoMP
Other
6 stars 3 forks source link

Change line width computation #160

Closed mgalloy closed 11 months ago

mgalloy commented 1 year ago

Use FWHM instead.

Change extension name and multiply by the correct constant.

This should just be multiplying our current line width by a constant, but I need the constants.

I need:

[!NOTE] Time estimate: Once I have the items listed above, this issue should be done in less than an hour.

detoma commented 1 year ago

Currently we use the line width W defined in equation (1) of Hui Tian et al. 2013 paper as:

W^2 = 2 * sigma^2 or sigma = W/sqrt(2)

We want to change to the FWHM = 2 sqrt(2ln2) sigma = 2.35482 * sigma

FWHM = sqrt(2)sqrt(2ln2) W = 1.66511 * W

To adjust the scaling in the plots of W, just multiply the current min and max values by 1.66511

Same for the where conditions that use W, e.g. in the level2 analytical code

mgalloy commented 1 year ago

Use "Line width (FWHM)" for extension name and GIF annotation.

mgalloy commented 1 year ago

Be careful using line width in thresholding conditions. Units for line width will stay in "km/s".

mgalloy commented 1 year ago

Check line width vs. Maurice's results.

detoma commented 1 year ago

I updated the line width factor.

Steve please look it up. I think it is correct based on the definition of W used in equation (1) of the Hui Tian et al. 2013 paper.

There is a typo in equation (6) of Tian et al. 2013 paper but the COMP and UCOMP codes are correct and use :

W = sqrt(-2.0 * d_lambda^2 / (a + b))

detoma commented 11 months ago

I just noticed that in the old CoMP pipeline, we defined the line width as W/sqrt(2), i.e., what we reported as line width was sigma. This seems different from what we did for UCoMP in the first data release. We need to compare codes and make sure we use consistent definitions when we reprocess CoMP and UCoMP.

mgalloy commented 11 months ago

@detoma's comment above might change the threshold's we use for masking in the level 2.