det_sens
- Tools for detector and array sensitivity¶
The det_sens
module lives in python/analysis/det_sens. This
module includes supporting code for:
TOD power spectrum computation
Blackbody and RJ spectral radiance calculations (see blackbody).
Planetary brightness models and relevant ephemeris info
Getting the Array Sensitivity from Planet Observations¶
This section describes using observations of Uranus (or possibly some other planet, if a reasonable brightness model exists) to measure array sensitivities. Going in to this you will need to already have:
a list of observations, perhaps in a file called list.txt
fp_fit results for those observations
glitch cuts and planet position cuts for those observations
approximate solid angles and band centers for each array and band.
Some template configuration files are found here:
:get_solid_angle.in
There are 4 or so steps to follow.
Convert fp_fit to absolute calibration results¶
The fp_fit results store a peak height, in DAC units. This can be used to determine the DAC to uK calibration, using assumptions about the band center and the beam solid angle. Before running, update those values in the configuration file (along with the location of the fp_fit results). Then run:
moby2 get_fpfit_planetcal get_fpfit_planetcal.cfg
Get calibrated TOD power spectra¶
Now on each TOD of interest, run the code that measures the spectrum. This is the most computationally expensive step, though it only takes a few core seconds per TOD.
moby2 get_tod_spec get_tod_spec.cfg
Extract calibrated noise levels¶
This code will analyze the spectra and extract the white noise level and store it for the next step.
moby2 get_cal_noise get_cal_noise.cfg
If that goes well, you can combine the results into an array sensitivity:
moby2 get_array_sens get_cal_noise.cfg
Other useful sub-modules¶
blackbody¶
This module contains functions for converting between Blackbody, RJ, and CMB spectra.
>>> from moby2.analysis import det_sens
>>> help(det_sens.blackbody)
Here’s an example, for getting the conversion from RJ to CMB uK:
>>> from moby2.analysis import det_sens
>>> BB = det_sens.blackbody
>>> f = 150.
>>> BB.spectrumToDCMB(BB.rayleigh(1., f), f)
1.7351210431239954
Some key functions are auto-documented here. Throughout this module,
the argument T
is a temperature in Kelvin, and f
is a
frequency in GHz. The units of radiance are non-standard; see
docstrings. The symbol DCMB
(and also dT
) is used to denote
CMB anisotropy temperature units, where a temperature \(\delta T\) at
frequency \(f\) corresponds to spectral radiance
-
moby2.analysis.det_sens.blackbody.
blackbody_x
(T, f)[source]¶ - Return dimensionless parameter
x = h f / k T
-
moby2.analysis.det_sens.blackbody.
rayleigh
(T, f)[source]¶ RJ spectral radiance, in (pW / m**2 / s / steradian) / (GHz).
-
moby2.analysis.det_sens.blackbody.
blackbody
(T, f)[source]¶ Blackbody spectral radiance, in (pW / m**2 / s / steradian) / (GHz).
-
moby2.analysis.det_sens.blackbody.
spectrumToBrightness
(S, f)[source]¶ Given spectral radiance at f, returns the corresponding blackbody temperature.
-
moby2.analysis.det_sens.blackbody.
spectrumToRJ
(S, f)[source]¶ Given spectral radiance at f, returns the corresponding RJ temperature.
-
moby2.analysis.det_sens.blackbody.
DCMB_factor
(f)[source]¶ Returns differential CMB temperature linearization factor X such that spectral radiance I is
I = X * dT
-
moby2.analysis.det_sens.blackbody.
DCMB
(dT, f)[source]¶ Returns spectral radiance associated with source with temperature dT measured in differential CMB blackbody units.