diff --git a/nemo/maps.py b/nemo/maps.py index 4d6bef0..501e6e9 100644 --- a/nemo/maps.py +++ b/nemo/maps.py @@ -1756,11 +1756,8 @@ def makeModelImage(shape, wcs, catalog, beamFileName, obsFreqGHz = None, GNFWPar decDeg = row['decDeg'], beam = beam, GNFWParams = GNFWParams, amplitude = y0ToInsert, maxSizeDeg = maxSizeDeg, convolveWithBeam = True, - cosmoModel = cosmoModel, omap = modelMap) - # modelMap=modelMap+signalMap - if obsFreqGHz is not None: - modelMap=convertToDeltaT(modelMap, obsFrequencyGHz = obsFreqGHz, - TCMBAlpha = TCMBAlpha, z = z) + cosmoModel = cosmoModel, omap = modelMap, + obsFrequencyGHz = obsFreqGHz, TCMBAlpha = TCMBAlpha) else: # Sources - slower but more accurate way for row in catalog: @@ -1769,8 +1766,8 @@ def makeModelImage(shape, wcs, catalog, beamFileName, obsFreqGHz = None, GNFWPar x, y=wcs.wcs2pix(row['RADeg'], row['decDeg']) if (x >= x0 and x < x1 and y >= y0 and y < y1) == False: continue - # degreesMap=np.ones(modelMap.shape, dtype = float)*1e6 # NOTE: never move this - degreesMap, xBounds, yBounds=makeDegreesDistanceMap(modelMap, wcs, + degreesMap=np.ones(modelMap.shape, dtype = float)*1e6 # NOTE: never move this + degreesMap, xBounds, yBounds=makeDegreesDistanceMap(degreesMap, wcs, row['RADeg'], row['decDeg'], maxSizeDeg) signalMap=signals.makeBeamModelSignalMap(degreesMap, wcs, beam)*row['deltaT_c'] diff --git a/nemo/signals.py b/nemo/signals.py index 1c095f7..87d726c 100644 --- a/nemo/signals.py +++ b/nemo/signals.py @@ -757,7 +757,8 @@ def makeArnaudModelSignalMap(z, M500, shape, wcs, beam = None, RADeg = None, dec elif painter == 'pixell': # New method - using Sigurd's object painter signalMap=_paintSignalMap(shape, wcs, tckP, beam = beam, RADeg = RADeg, decDeg = decDeg, amplitude = amplitude, maxSizeDeg = maxSizeDeg, - convolveWithBeam = convolveWithBeam, omap = omap) + convolveWithBeam = convolveWithBeam, omap = omap, + obsFrequencyGHz = obsFrequencyGHz, TCMBAlpha = TCMBAlpha, z = z) else: raise Exception("'painter' must be 'legacy' or 'pixell' (given '%s')." % (painter)) @@ -766,7 +767,7 @@ def makeArnaudModelSignalMap(z, M500, shape, wcs, beam = None, RADeg = None, dec #------------------------------------------------------------------------------------------------------------ def makeBattagliaModelSignalMap(z, M500, shape, wcs, beam = None, RADeg = None, decDeg = None,\ GNFWParams = 'default', amplitude = None, maxSizeDeg = 15.0,\ - convolveWithBeam = True, cosmoModel = None,\ + convolveWithBeam = True, cosmoModel = None, omap = None,\ obsFrequencyGHz = None, TCMBAlpha = 0): """Makes a 2d signal only map containing a Battaglia+2012 model cluster (taking into account the redshift evolution described in Table 1 and equation 11 there). @@ -829,7 +830,8 @@ def makeBattagliaModelSignalMap(z, M500, shape, wcs, beam = None, RADeg = None, tckP=signalDict['tckP'] return _paintSignalMap(shape, wcs, tckP, beam = beam, RADeg = RADeg, decDeg = decDeg, amplitude = amplitude, maxSizeDeg = maxSizeDeg, - convolveWithBeam = convolveWithBeam) + convolveWithBeam = convolveWithBeam, omap = omap, + obsFrequencyGHz = obsFrequencyGHz, TCMBAlpha = TCMBAlpha, z = z) return signalMap