annayqho / TheCannon

a data-driven method for determining stellar parameters and abundances from stellar spectra
MIT License
42 stars 17 forks source link

Identifying Continuum Pixels #12

Closed HWRix closed 9 years ago

HWRix commented 9 years ago

Currently I'm cheating with the continuum normalization; I haven't implemented the identification of continuum pixels. I simply use the continuum pixels that Melissa identified previously.

Here is a thought on the continuum that Melissa and I came up with just pre-submission of the paper, and deemed a distraction until after the paper. It is a slight conceptual deviation from what \tc says right now. So, I want to encourage all to voice their objections... else, try it.

At the moment, we claim the finding of the continuum pixels, requires the running of \tc once on the pseudo-cont. normalized spectra. For a "good" set of reference objects, there may be an easier way:

Let's consider the ensemble of continuum-normalized spectra for the reference objects, and create two vectors that contain a) f_bar: the ensemble median (or slightly higher quantile) at each pixel, taken over the set of reference objects; b) sigma_f: the variance (formal second moment, interval enclosing the central X% of the distribution at each pixel; X=68 to 90).

Then good continuum pixels should be those that have f_bar~1 and sigma_f<<1. Then an (initially by eye) cut on f_bar and sigma_f may identify (in a very simple fashion) good continuum pixels.

Drawbacks: let's presume label space is covered by the reference objects, but rather unevenly (e.g. dwarfs), then what you do for sigma_f matters; but perhaps worth a try

To avoid biasing the selection away from the edges, split up the spectrum into three "ranges" and draw 5-6% (or whatever seems to work best) from each.

annayqho commented 9 years ago

Another question on the continuum fit: do we still want to fit a Chebyshev, or should we move to a sine/cosine function?

davidwhogg commented 9 years ago

We should do sines and cosines. They are much better behaved at the edges. If the full interval is L, then we should do sines and cosines of [k_n x] where k_n is [n pi / L]

annayqho commented 9 years ago

OK, so just to check: the fitting function should be a_0 sin(k_0 x) + b_0 cos(k_0 x) + a_1 sin(k_1 x) + b_1 cos(k_1 x) + ... + a_N sin(k_N x) + b_N cos(k_N x)

How should I choose N? Trial and error to see what is sufficiently comprehensive...?

davidwhogg commented 9 years ago

For now let's just try some N values -- 3, 5, 7 -- and see what they look like.