Post-processes the obiwan/, tractor/, data products. Joins the psql db, input properties, and tractor catalogue measurements for easy anaylsis later. Uses mpi4py to parallelize to a full production runs’ outputs.
Classes
Bit |
bitmask arithmetic |
RandomsTable(data_dir, dr3_or_dr5, …[, date]) |
Creates the uniform,obiwan_a,obiwan_b randoms tables for a single brick |
SummaryTable(data_dir, dr3_or_dr5[, date]) |
Writes one table per brick, with brick averaged quantities |
TargetSelection |
Applies ELG target selection using either DESI or eBOSS criteria |
Functions
bin_by_mag(randoms, func_to_apply[, band, …]) |
bins data and result of func_to_apply(randoms) into the bucket | ||
datarelease_dir(drNumber) |
the tractor catalogues for this DR are the real galaxy catalogues | ||
depth_at_half_recovered(randoms, band) |
bin by mag in given mag, return bin center where frac recovered first drops below 50% | ||
derived_field_dir(brick, data_dir, date) |
directory to save post-processed tables to | ||
flux2mag(nmgy) |
converts nanomaggies to AB mag | ||
fraction_recovered(randoms) |
Return fraction of randoms detected and measured by Legacypipe | ||
is_bool(obj) |
|||
is_numeric(obj) |
|||
main_mpi([bricks, doWhat, dr3_or_dr5, …]) |
|
obiwan.runmanager.derived_tables.RandomsTable(data_dir, dr3_or_dr5, db_randoms_table, date='mm-dd-yyyy')[source]¶Creates the uniform,obiwan_a,obiwan_b randoms tables for a single brick
add_flag_for_realsources(tab, brick)[source]¶Flag sources also in DR3, DR5
| Parameters: | tab – table returned by merged_randoms_table() |
|---|
add_psql_to_uniform_table(uniform, db_randoms_table)[source]¶Add randoms db columns from psql to the uniform randoms table
| Parameters: |
|
|---|
get_rsdirs(brick)[source]¶get list of rsdirs for a given brick
| Returns: | tuple of rsdirs list and whether the brick is finished or not |
|---|
merge_randoms_tables(brick, rsdirs)[source]¶Computes final joined randoms tables
| Parameters: | brick – brickname |
|---|---|
| Returns: | joined randoms table |
obiwan.runmanager.derived_tables.SummaryTable(data_dir, dr3_or_dr5, date='mm-dd-yyyy')[source]¶Writes one table per brick, with brick averaged quantities
derived table “randoms.fits” must exist. Joins the brick summary quantities from a data release with a similar set from the randoms.fits table. Each brick’s table has one row and all tables get merged to make the eatmap plots
add_obiwan_to_DR_table(summary_DR, summary_obi)[source]¶adds the summary_obi columsn to the summary_DR table
| Parameters: |
|
|---|
brick_summary(bricklist=[])[source]¶| Parameters: | bricklist – Give a single brick as a list of length 1, e.g. [brick] |
|---|
obiwan.runmanager.derived_tables.TargetSelection[source]¶Applies ELG target selection using either DESI or eBOSS criteria
_desi_elg(gflux=None, rflux=None, zflux=None, primary=None)[source]¶VERBATIM from https://github.com/desihub/desitarget/blob/master/py/desitarget/cuts.py
| Parameters: |
|
|---|---|
| Returns: |
|
| Return type: | mask |
_eboss_elg(ngc_or_sgc, primary=None, ra=None, dec=None, gmag=None, rmag=None, zmag=None, anymask_g=None, anymask_r=None, anymask_z=None, allmask_g=None, allmask_r=None, allmask_z=None, psfdepth_g=None, psfdepth_r=None, psfdepth_z=None)[source]¶Johan’s target selection
obiwan.runmanager.derived_tables.bin_by_mag(randoms, func_to_apply, band=None, bin_minmax=(18.0, 26.0), nbins=20)[source]¶bins data and result of func_to_apply(randoms) into the bucket
| Parameters: |
|
|---|
obiwan.runmanager.derived_tables.datarelease_dir(drNumber)[source]¶the tractor catalogues for this DR are the real galaxy catalogues
obiwan.runmanager.derived_tables.depth_at_half_recovered(randoms, band)[source]¶bin by mag in given mag, return bin center where frac recovered first drops below 50%
obiwan.runmanager.derived_tables.derived_field_dir(brick, data_dir, date)[source]¶directory to save post-processed tables to