galsci / pysm

PySM 3: Sky emission simulations for Cosmic Microwave Background experiments
https://pysm3.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
36 stars 23 forks source link

Return shape of `ModifiedBlackBody.get_emission` for array inputs #36

Closed b-thorne closed 4 years ago

b-thorne commented 4 years ago

When executing the following code:

import numpy as np
import pysm
freqs = np.linspace(10, 400, 100) * u.GHz
sky = pysm.Sky(nside=nside, preset_strings=['d1'])
emission_d1 = sky.get_emission(freqs)
print(emission_d1.shape)

I get an array of shape (3, npix), rather than (nfreqs, 3, npix). This is not the expected behavior according to the docstring. It looks like the code automatically defines a 'bandpass' with equal weight at each of these frequencies, and averages over them.

zonca commented 4 years ago

Sorry, I need to update the docstring. I decided to simplify the API, if you want separate frequencies not integrated you need to run the method multiple times