HIFI data can be converted from temperature scale to Jy using the
task. The task works for spectra in ObservationContexts (
and in SimpleSpectrum format (spectrum). The conversion can be
done assuming a disk-like (top-hat), a Gaussian source morphology,
or an ad hoc source model morphology. In the first two cases, a
source diameter needs to be entered (
task also allows you to convert data back from Jy to whatever
temperature scale the data was originally on.
In the GUI, the
convertK2Jy task is found under Applicable in the Tasks
view panel when you have selected an
ObservationContext in the Variables view panel. To open
convertK2Jy task GUI, double click on its name in the Task panel, the GUI will open with the
ObservationContext you had selected in the Variables panel loaded into the
parameter in the GUI. If you have selected an
SimpleSpectrum in the Variables panel, you can find the
or under All in the Tasks panel. You will need to drag the name of the variable containing the
data you want to convert into the appropriate field in the GUI.
The simplest call to the task requires only the input data and the diameter of the source in arcsec (
MyConvertedObs = convertK2Jy(obs=obs, size=10.0)
By default, the output name from
result. You can change this in the
GUI by typing a different name into the Variable name for result field. In the command line, you can set the result
name as you call the task, as was done in all the example above and other examples below.
All other parameters have default values, as described below. Depending on your science goals and your data, it is expected that you will to modify the defaults parameter values.
As described above, for the
size parameter, you should fill in the size of your source, in arcsec. The meaning of
size depends on what you assume for your source geometry (see next bullet). For
size is the diameter of your source, while for
is the FWHM of your source.
This is a mandatory parameter, so for a point source you must specify
Note that you must include a decimal point, so
size=10.0 rather than
size=10, in order for the task to work.
The conversion can be made assuming a disk (top-hat), or Gaussian morphology for the source. The latter is generally more appropriate for the semi-extended sources typically observed with HIFI. The default is to assume a disk shape.
To change the parameter in the GUI, type
disk. In the command line, it is
used like this:
MyConvertedObs = convertK2Jy(obs=obs, size=10.0, shape='gaussian')
A user-provided source brightness distribution model can be provided by
the user using this option. This option will only work if the option
is selected, i.e. when the detailed 2-D HIFI beam is used. When such an
input is provided, the source coupling factor (see below) is will be
the same for each position contained in the input products, and is
computed at the averaged position of the products passed in, see
For a mapping observation,
this means that the same correction will apply to all positions,
and this correction is computed from the coupling to the source
model at the centre of the mapped area. This behaviour is
similar to what is done when e.g. a simple Gaussian or Disk
source model is used.
convertK2Jy task adds a new matadatum at the
SpectrumDataset level called
temperatureScaleOrigin, with the original temperature scale (T_A*, T_A', T_MB) as a value. This metadata
item can then be used by the task in order to reverse the calculation back from Jy to the original temperature scale.
To use the
reverse option, check the
reverse box in the GUI. In the command line use:
MyObs = convertK2Jy(obs=MyConvertedObs, size=10.0, shape='gaussian', reverse=True)
Note that you need to provide the same
shape values as used in the conversion to
Jy in order to get correct results.
The data in an
observationContext will always be overwritten, in order to conserve memory. In the
SimpleSpectrum, you can
choose not to overwrite the input data. In the GUI, do this by unchecking the
overwrite box. In the command
If you pass an
convertK2Jy, it will automatically use the
beam widths and beam efficiencies found in the Calibration Tree. If you want to use the beam parameters from the calibration
to convert fluxes in an
you need to pass the calibration tree directly to the task.
# Extract a calibration context from an observation context named
obscal = obs.getCalibration() # Pass the calibration to
convertK2JyconvertedHtp = convertK2Jy(htp=htp, size=10.0, shape='gaussian', cal=cal)
In the GUI, you can drag the calibration context from an
observationContext viewed in the Context
Viewer into the Variables panel. From there, drag the variable created to the
If you pass an
convertK2Jy and do not specify a calibration context to use, the task will use hard coded values to calculate
ηA and ηB for the conversion. See below for more details about the calculations
carried out by
You can force
convertK2Jy to use the hard-coded values to calculate ηA and
ηB by checking the
useInterpolation box in the GUI. In the command line, use
The forward and beam efficiencies are calculated in the following way:
ηA=ηA0 × exp[-(4 × π × σ/λ)2]
ηB=ηB0 × exp[-(4 × π × σ/λ)2].
where, σ = 3.8 micron, ηA0 = 0.68 and ηB0 = 0.76, in bands 1-4, 6 and 7 and ηA0 = 0.58 and ηB0 = 0.66, in band 5
The frequency used to determine λ in the expressions above is printed out to the console, along with the values found for ηA and ηB.
You can choose whether the calculations are made using the LO frequency (or frequencies) in the observation, or the frequency
each spectrum with the
useLo parameter. Using the LO frequency (
useLo=True) is most
efficient, and the recommended approach for all types of observations, except Spectral Scans. In the case of Spectral Scans,
the LO frequency changes for each spectrum at Level 2, it is recommended to use
useLo=False. In the GUI,
this option is toggled on and off via a check box.
You can limit (or increase) the number of calculations
convertK2Jy does with the
parameter. This is the delta frequency for the calculations of the forward and beam efficiencies so, for example, a
tol=0 will result in a calculation for every LO or spectrum frequency in the dataset. The default value is
0.1 and it takes the units the data are in. However, the default value is chosen assuming that Level 2 data is passed to the
To change this parameter in the GUI, type a new value in the
tol parameter field. In the command line, use
convertK2Jy uses the values of the HIFI beam model introduced to the calibration tree in HIPE 13,
and the parameter
hifiBeam is set to True. If you prefer to use the old (Gaussian) model and efficiencies, you can
hifiBeam=False. In the GUI, do this by unchecking the tick box.
It is strongly recommended to use the new beam model, see the release note for more details. The possibility to use the Gaussian beam assumption is provided for backwards compatibility, and to allow the task to be used with data from another instrument (in which case the appropriate beam width and efficiencies must be passed manually to the task).
Figure 18.1. Illustration of the beam coupling computation in case of a user-provided source brightness distribution model. In this case, the model is passed as a PACS continuum image (background image) and the corresponding position of the HIFI observations where it is computed is shown as a circular footprint of the size of the HPBW.
The temperature values in the spectrum are converted by
convertK2Jy from TA* or
TMB to TA' using the forward and beam efficiencies available from the calibration tree
or hard-coded values, as described above. The conversion to Jy is dependent on the size of your source, and is computed differently
for point sources and extended sources.
Point source (size=0.0)
where S is the Energy flux expressed in Jansky, TA' is the Antenna Temperature measured in Kelvin, k is the Boltzmann's constant, and ηA is the aperture efficiency. Ageom is the effective area of the telescope, which we take to be 3.283 m, so Ageom = 8.465091 m2.
Extended source (size >0.0).
For extended sources, assumptions about the HIFI beam and the source geometry become important and a flux dilution factor, K, is introduced into the expression above:
The flux dilution comes from the ratio of the beam and source solid angles. The following expressions are extracted from the HIFI beam model release note , to which you are directed for a detailed discussion.
The source solid angle is given by:
the beam-weighted solid source angle by:
and the total integrated source flux by:
The computation of K depends on the assumption made about the HIFI beam profile.
HIFI beam model
If the (non-Gaussian) beam model is employed (
True), the integrals above
are performed numerically, using the source shape as specified by the
and using the beam model extracted from the calibration tree. Note that due to the azimuthal symmetry of the source models
fact that central pointing is assumed), the azimuthal integral does not depend on the source. Equivalently, for our assumptions
source, the 1D beam model can be used without loss of generality (see Chapter 8 for more
information about the 1D and 2D beam models). This is done by
Gaussian beam assumption
hifiBeam is set to False then
covertK2Jy uses a less accurate
Gaussian beam assumption. In this case, the integrals defining K can be performed analytically for the assumption
of a disk or a Gaussian source geometry as follows: