From 4c48221699d23ee0d53a43a44541a1311a38675d Mon Sep 17 00:00:00 2001 From: "Paul M. Sutter" Date: Tue, 22 Apr 2025 21:38:13 -0400 Subject: [PATCH] continued removal of extranneous parameters --- .../example_observation.py | 6 --- python_source/backend/launchers.py | 2 +- python_source/backend/surveyTools.py | 44 +------------------ 3 files changed, 2 insertions(+), 50 deletions(-) diff --git a/examples/example_observation/example_observation.py b/examples/example_observation/example_observation.py index 2d1a273..3e8522f 100644 --- a/examples/example_observation/example_observation.py +++ b/examples/example_observation/example_observation.py @@ -85,13 +85,11 @@ newSample = Sample( # HEALpix mask file - set to None to auto-compute # NOTE: auto-computed masks are pretty terrible, so # only do that if you have no other options - #maskFile = "", maskFile = inputDataDir+"/example_observation_mask.fits", # resolution for HEALpix mapping of survey edge contours # Set to -1 to use nside from given fits file # MUST be set if auto-computing mask - #nsideForContour = -1, nsideForContour = 128, # radial selection function (if not volume limited) @@ -100,10 +98,6 @@ newSample = Sample( # max and min redshifts of galaxies in your sample zBoundary = (0.0, 0.15), - # width of redshift boundaries to flag edge galaxies - # (interpreted as boundaryWidth*(zMax-zMin)) - boundaryWidth = 0.01, - # leave this at -1 for mean particle separation, # or specify your own in Mpc/h minVoidRadius = -1, diff --git a/python_source/backend/launchers.py b/python_source/backend/launchers.py index 0de8cd7..bc00c6d 100644 --- a/python_source/backend/launchers.py +++ b/python_source/backend/launchers.py @@ -129,7 +129,7 @@ def launchPrep(sample, binPath, workDir=None, inputDataDir=None, contourFile = outputDir + "/contour_map.fits" findEdgeGalaxies(galFile, sample.maskFile, edgeGalFile, contourFile, sample.zBoundary[0], sample.zBoundary[1], sample.omegaM, - useComoving, sample.boundaryWidth, sample.meanPartSep, + useComoving, sample.meanPartSep, outputDir, log) log.write("Done!\n") diff --git a/python_source/backend/surveyTools.py b/python_source/backend/surveyTools.py index e35af80..22fe628 100644 --- a/python_source/backend/surveyTools.py +++ b/python_source/backend/surveyTools.py @@ -136,7 +136,7 @@ def figureOutMask(galFile, nside, outMaskFile): # ----------------------------------------------------------------------------- # figures out which galaxies live on a mask or redshift edge def findEdgeGalaxies(galFile, maskFile, edgeGalFile, contourFile, - zmin, zmax, omegaM, useComoving, boundaryWidth, + zmin, zmax, omegaM, useComoving, meanPartSep, outputDir, log): if useComoving: @@ -271,46 +271,4 @@ def findEdgeGalaxies(galFile, maskFile, edgeGalFile, contourFile, overwrite=True, dtype=np.dtype('float64')) - -# # output galaxy edge flags -# edgeFile = open(edgeGalFile, "w") -# -# for line in open(galFile): -# line = line.split() -# RA = float(line[3]) -# Dec = float(line[4]) -# z = float(line[5]) -# -# if useComoving: -# z = comovingDistance(z/LIGHT_SPEED, Om=omegaM) -# else: -# z *= LIGHT_SPEED/100. -# -# phi, theta = convertAngle(RA, Dec) -# -# # check the mask edges -# ipix = healpy.ang2pix(nside, theta, phi) -# neighbors = healpy.get_all_neighbours(nside, ipix) -# isOnMaskEdge = any(mask[p] == 0 for p in neighbors) -# -# # check the redshift boundaries -# zbuffer = (zmax-zmin)*boundaryWidth -# isOnHighZEdge = (z >= zmax-zbuffer) -# isOnLowZEdge = (z <= zmin+zbuffer) -# -# if isOnMaskEdge: -# edgeFile.write("1\n") -# edgeMask[ipix] = 1 -# elif isOnHighZEdge: -# edgeFile.write("2\n") -# elif isOnLowZEdge: -# -#edgeFile.write("3\n") -# else: -# edgeFile.write("0\n") -# -# edgeFile.close() -# healpy.write_map(edgeMaskFile, edgeMask, overwrite=True, -# dtype=np.dtype('float64')) - return