BEAST-Fitting / beast

Bayesian Extinction And Stellar Tool
http://beast.readthedocs.io
23 stars 35 forks source link

production run (v1.3) workflow #337

Closed lea-hagen closed 5 years ago

lea-hagen commented 5 years ago

As I'm going through an example, there are a few places in the workflow that I've been making some assumptions that I want to make sure to run by the group. So here's what I'm doing, going from catalog to final fits. I would especially appreciate input for step 5 (@benw1?), but any thoughts about the settings, ordering, etc., are welcomed.

  1. Create a source density map. Use the F475W filter, or similar filter (e.g., F555W) if that one isn't in the survey. To determine the range of magnitudes over which that filter is complete, make a histogram and find the peak (plot_mag_hist.py), and go half a magnitude brighter than the peak. Use a pixel size of 5".
  2. Create the model grid, using parameters in #322/#328. The precise number of subgrids (N_subgrid) is unlikely to be important, as long as everything fits into memory.
  3. Create artificial stars, following #328. Run them through the photometry pipeline.
  4. In the case where there all filters don't cover the entire field of view (see #301), remove sources from the photometry catalog and the AST catalog that are outside the overlapping region. We can go back and model those later if we want.
  5. ** Remove sources that are unlikely to be real objects, using some criteria (sharpness/crowding for some filter?). Apply that criteria to both the photometry and AST catalogs.
  6. Divide the photometry and AST catalogs into sub-catalogs based on their source densities (we'll say there are N_sourceden sub-catalogs). For ease of running later, some of the photometry catalogs will be additionally split into smaller catalogs (using the flux).
  7. Create noise models. There will be N_subgrid * N_sourceden of them.
  8. Do grid trimming. For each photometry sub-catalog, create a trimmed version of the matching noise model and a trimmed version of each subgrid.
  9. Fit the models. Save 500 sparsely-sampled log likelihoods for each subgrid.
  10. Merge all of the fit results together into a final set of stats, 1D PDFs, and sparsely sampled log likelihoods.
karllark commented 5 years ago

This sounds like the right ordering and steps to me.

lea-hagen commented 5 years ago

@benw1 here's an example of what's confusing me for Step 5. This is a section of the IC1613 photometry catalog:

gst_cuts

There are sources flagged in some filters but not others (and perhaps also things flagged because sharpness/crowding doesn't work well for negative fluxes), so it's not clear to me which ones to keep.

lea-hagen commented 5 years ago

As a follow-up to the conversation with @benw1 last week, I have a question.

First, to summarize the conversation, there is not an obvious "best way" to make cuts for Step 5. What CMD fitting folks have done is require that a star meets the crowding/sharpness criteria in at least 2 filters, which seems reasonable enough.

I'm currently working out which filter(s) to use for the cuts. As I'm doing that, I would like input for how to approach sources with negative fluxes. We are all agreed that negative fluxes are perfectly ok, but they (necessarily?) have crowding=99 and sharpness=99. So for whichever filter(s) are used to make the catalog cuts, there will be no sources with negative fluxes in that filter. I'm concerned that this will add some sort of bias to the catalog, which may subtly affect the BEAST results. Thoughts?

(cc @karllark)

karllark commented 5 years ago

Hummm....not sure what to do here. As long as we use the same selection effects on the catalog and ASTs, we are fine with the math used by the BEAST. So, maybe we are ok?

karllark commented 5 years ago

Agreed to close on BEAST HackDay 16 Jul 19.