Skip to content

Commit

Permalink
Moved plotting to after drawing SDSS galaxies so that plots accuratel…
Browse files Browse the repository at this point in the history
…y reflect compared distributions
  • Loading branch information
adam-broussard committed Nov 21, 2019
1 parent c4ceebe commit 7a17cbc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions descqa/EmlineRatioTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ def run_on_single_catalog(self, catalog_instance, catalog_name, output_dir):
'mag_y_lsst',
'emissionLines/totalLineLuminosity:oxygenII3726',
'emissionLines/totalLineLuminosity:oxygenII3729',
'redshift',
'emissionLines/totalLineLuminosity:balmerAlpha6563',
'emissionLines/totalLineLuminosity:balmerBeta4861',
'emissionLines/totalLineLuminosity:nitrogenII6584',
Expand Down Expand Up @@ -247,14 +246,14 @@ def makeplot(self, catalog_name):
dist1 = np.array(dist1)
dist2 = np.array(dist2)

sp1.hist2d(*dist1, bins=50, range=[[-1.2, 1.2], [-1.25, 1]], norm=LogNorm(), cmap='plasma_r')
sp2.hist2d(*dist2, bins=50, range=[[-1.2, 1.2], [-1.25, 1]], norm=LogNorm(), cmap='plasma_r')

# Draw a number of SDSS galaxies equal to self.sdss_drawnum

sdss_draw_inds = np.random.choice(np.arange(len(dist1[0])), size=self.sdss_drawnum)
dist1 = dist1[:, sdss_draw_inds]

sp1.hist2d(*dist1, bins=50, range=[[-1.2, 1.2], [-1.25, 1]], norm=LogNorm(), cmap='plasma_r')
sp2.hist2d(*dist2, bins=50, range=[[-1.2, 1.2], [-1.25, 1]], norm=LogNorm(), cmap='plasma_r')

# Shift the median of the simulated galaxies to match that of the SDSS galaxies
# before performing the comparison

Expand Down

0 comments on commit 7a17cbc

Please sign in to comment.