hyperion.conf.PeeledImageConf#
- class hyperion.conf.PeeledImageConf(**kwargs)#
Method
set_aperture_radii
(n_ap, ap_min, ap_max)Set the range of apertures to use for SEDs/Images
set_depth
(d_min, d_max)Set the minimum and maximum distance between which photons should be peeled off.
set_ignore_optical_depth
(ignore_optical_depth)Ingore optical depth when creating images.
set_image_limits
(xmin, xmax, ymin, ymax)Set the extent of the output images
set_image_size
(n_x, n_y)Set the size of the output images
set_inside_observer
(position)Set the observer to be inside the model
set_output_bytes
(io_bytes)Set whether to output images/SEDs in 32-bit or 64-bit.
set_peeloff_origin
(position)Set the origin for the peeloff.
set_stokes
(stokes)Set whether to save the full Stokes vector for the images/SEDs.
set_track_origin
(track_origin[, n_scat])Set whether to track the origin of the photons.
set_uncertainties
(uncertainties)Set whether to compute uncertainties on the images/SEDs
set_viewing_angles
(theta, phi)Set the viewing angles to use
set_wavelength_index_range
(iwav_min, iwav_max)Set the range of wavelengths to use for SEDs/Images
set_wavelength_range
(n_wav, wav_min, wav_max)Set the range of wavelengths to use for SEDs/Images
Methods (detail)
- set_aperture_radii(n_ap, ap_min, ap_max)#
Set the range of apertures to use for SEDs/Images
- Parameters:
- n_apint
The number of apertures to compute SEDs in
- ap_min, ap_maxfloat
The smallest and largest aperture to use, in cm
- set_depth(d_min, d_max)#
Set the minimum and maximum distance between which photons should be peeled off.
By default, d_min and d_max are set to -inf and +inf respectively. This option can be useful to compute for example models in a spherical polar grid, but including only the photons in a slab.
- Parameters:
- d_min, d_maxfloat
The minimum and maximum distance between which photons should be peeled-off. Distance increases away from the observer, and d_min and d_max are the distances closest and furthest from the observer respectively. The origin is the position of the observer if inside the model, otherwise it is the origin of the grid.
- set_ignore_optical_depth(ignore_optical_depth)#
Ingore optical depth when creating images.
This is useful in cases where one wants to understand how much the optical depth is affecting a set of images.
- Parameters:
- ignore_optical_depthbool
Whether to ignore optical depth effects (default is False)
- set_image_limits(xmin, xmax, ymin, ymax)#
Set the extent of the output images
- Parameters:
- xmin, xmax, ymin, ymaxfloat
The extent of the images, which are either in cm (if using standard binned images or peeloff images) or in degrees (if using peeling off to a point inside the model).
- set_image_size(n_x, n_y)#
Set the size of the output images
- Parameters:
- n_x, n_yint
The number of pixels in the x and y directions
- set_inside_observer(position)#
Set the observer to be inside the model
- Parameters:
- positiontuple of 3 floats
The spatial coordinates of the observer, in cm
- set_output_bytes(io_bytes)#
Set whether to output images/SEDs in 32-bit or 64-bit.
- Parameters:
- io_bytesint
The number of bytes for the output. This should be either 4 (for 32-bit) or 8 (for 64-bit).
- set_peeloff_origin(position)#
Set the origin for the peeloff.
- Parameters:
- positiontuple of 3 floats
The coordinates of the origin of the peeling-off, in cm
- set_stokes(stokes)#
Set whether to save the full Stokes vector for the images/SEDs.
If set to False, only the I component is saved.
- Parameters:
- stokesbool
Whether to save the full Stokes vector for the images/SEDs.
- set_track_origin(track_origin, n_scat=None)#
Set whether to track the origin of the photons. The options are:
‘no’ - does not split up the images/SEDs by origin
‘basic’ - this splits up the images/SEDs into:
The photons last emitted from a source and did not undergo any subsequent interactions.
The photons last emitted from dust and did not undergo any subsequent interactions
The photons last emitted from a source and subsequently scattered
The photons last emitted from dust and subsequently scattered
- ‘detailed’ - as above, but in each category, the origin is further
refined into each individual source and dust type.
- ‘scatterings’ - as for ‘basic’, but splitting the scatterings into the
images for 1, 2, 3, …,
n_scat
scatterings since the last emission.
- Parameters:
- track_originbool
Whether to track the origin of the photons as described above.
- set_uncertainties(uncertainties)#
Set whether to compute uncertainties on the images/SEDs
- Parameters:
- uncertaintiesbool
Whether to compute uncertainties on the images/SEDs.
- set_viewing_angles(theta, phi)#
Set the viewing angles to use
- Parameters:
- theta, phiiterable of floats
The viewing angles to compute SEDs for.
Examples
Set viewing angles using lists of well-defined angles:
>>> image.set_viewing_angles([30.,55.,87.],[22.,44.,34.])
Set viewing angles using generated numpy arrays:
>>> image.set_viewing_angles(np.linspace(0.,90.,10), np.repeat(30.,10))
Set a single viewing direction:
>>> image.set_viewing_angles([77.],[25.])
- set_wavelength_index_range(iwav_min, iwav_max)#
Set the range of wavelengths to use for SEDs/Images
This is intended to be used when the monochromatic option is turned on.
- Parameters:
- iwav_min, iwav_maxint
The index of the first and last frequency to compute SEDs/Images for. This is the index in the array of wavelengths used when calling
set_monochromatic
. These values should be zero-based.
- set_wavelength_range(n_wav, wav_min, wav_max)#
Set the range of wavelengths to use for SEDs/Images
- Parameters:
- n_wavint
The number of wavelengths to compute SEDs/Images for
- wav_min, wav_maxfloat
The smallest and largest wavelength to use, in microns