GithubHelp home page GithubHelp logo

Update BGS n(z) about desimodel HOT 10 CLOSED

desihub avatar desihub commented on June 22, 2024
Update BGS n(z)

from desimodel.

Comments (10)

dkirkby avatar dkirkby commented on June 22, 2024

Copying a question from @moustakas to @amjsmith in desi-bgs:

Are these samples selected in the SDSS or DECaLS r-band? There's
about an 0.1-magnitude shift between the two filter curves, which will
affect the distribution and overall normalization (but perhaps not at
a level we care about).

Whatever the answer, the headers of these files should be updated to specify the filter used.

from desimodel.

amjsmith avatar amjsmith commented on June 22, 2024

These samples are selected in the SDSS r-band. Below are attached new versions of these files where I've changed the file headers to specify that the filter is SDSS. I've also attached files where the samples are selected in the DECaLS r-band. Note that I had to change the file extensions from .dat to .txt to upload them here, and feel free to rename them.

For the DECaLS r-band selected samples, the integrals have increased to 866.9 and 699.4 per sq deg for the bgs_bright and bgs_faint samples, respectively.

nz_BGS_bright.txt
nz_BGS_bright_decals.txt
nz_BGS_faint.txt
nz_BGS_faint_decals.txt

from desimodel.

dkirkby avatar dkirkby commented on June 22, 2024

Presumably DECam-r is what we want here, since that's what the imaging surveys use?

from desimodel.

amjsmith avatar amjsmith commented on June 22, 2024

In desi-bgs, Shaun Cole said

The mocks on which these are based are nominally tuned to SDSS Petrosian r-band magnitude which differs both in pass band and magnitude definition from the DECaLS Tractor magnitudes.
I think we should stick to the stated (800 and 600) objects per sq deg.
Alex, could you remake the n(z) file cutting in magnitude so that you get these surface densities.
(I think when this catalogue is processed to DECaLS magnitudes we should again adjust the magnitude limits to hit these same surface densities. I know the BGS plan is written in terms of magnitude cuts but nowhere does it say what magnitude we are talking about. For now it is better to keep the surface density fixed as otherwise things will be hard to compare.)

I've attached new versions of the files, in the same format as before, but adjusted the magnitude limits so that the number densities are 800 and 600 per sq deg for the bright and faint samples. In the SDSS r-band, this corresponds to r < 19.5255 and 19.5255 < r < 19.9957.

nz_BGS_bright_800.txt
nz_BGS_faint_600.txt

from desimodel.

djschlegel avatar djschlegel commented on June 22, 2024

Alex- The DESI imaging catalogs only have a single flux measure, so there's no choice to make there. SDSS Petrosian magnitudes were designed for the SDSS main sample (rPetro < 17.6), and won't be particularly well-behaved at much fainter magnitudes as they become an unstable parametric fit.

I find that r < 19.5 selects about 550 extended sources per sq deg in DECaLS DR5. But such a sample extends down to a fiber magnitude of 22, which will be impossible to get a redshift for. We've got to take that question up!

from desimodel.

moustakas avatar moustakas commented on June 22, 2024

This issue has remained open far too long and I've found myself with the need for a proper BGS dn/dz in desimodel. Unless there are any objections I'm going to check @amjsmith's most recent distributions into desimodel/data/targets as nz_bgs_bright.dat, nz_bgs_faint.dat and nz_bgs.dat (the sum of the two distributions), and remove the _BG.dat file as being obsolete.

This will likely break something in desisim but I'll fix that separately.

from desimodel.

moustakas avatar moustakas commented on June 22, 2024

OK, changes have been checked into the desimodel SVN, which probably means we need a new tag for 18.12. Do we want to update any of the other dn/dz files while we're at it?

bgs

from astropy.io.ascii import read
import matplotlib.pyplot as plt

faint = read('nz_bgs_faint.dat', names=('zmin', 'zmax', 'dndz'))
bright = read('nz_bgs_bright.dat', names=('zmin', 'zmax', 'dndz'))
sum = faint.copy()
sum['dndz'] = faint['dndz'] + bright['dndz']
sum.write('nz_bgs.dat', overwrite=True, format='ascii.basic')

fig, ax = plt.subplots()
zz = sum['zmin'] + (sum['zmax'] - sum['zmin']) / 2
ax.step(zz, sum['dndz'], label='BGS')
ax.step(zz, faint['dndz'], label='BGS Faint')
ax.step(zz, bright['dndz'], label='BGS Bright')
ax.legend(loc='upper right')
ax.set_xlabel('BGS Redshift')
ax.set_ylabel(r'BGS Target Density (deg$^{-2}$)')
ax.margins(0.02)

Note that I put in the following header comment by hand:
# Number of BGS galaxies (r_SDSS < 19.9957) per square degree from v0.0.4 of MXXL HOD mock.

from desimodel.

moustakas avatar moustakas commented on June 22, 2024

This will likely break something in desisim but I'll fix that separately.

Actually, it looks like desisim.targets.sample_nz doesn't read / use nz_BG.dat, so I think we're set.

@sbailey @dkirkby if all this looks OK please let's close this issue.

from desimodel.

sbailey avatar sbailey commented on June 22, 2024

Looks ok; closing. Re-open or re-post if new problems come up.

from desimodel.

sbailey avatar sbailey commented on June 22, 2024

With apologies for the spam, github isn't allowing me to close the issue. Trying again...

from desimodel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.