A DiskShape models the spatial distribution of radiation from the sky as a using a uniform brightness elliptical disk with user specified major axis width, minor axis width and position angle.
This class like the other component shapes becomes more useful when used through the SkyComponent class, which incorperates the flux and spectral variation of the emission, or through the ComponentList class, which handles groups of SkyComponent objects.
The reference direction is defined in celestial co-ordinates, using a MDirection object. It indicates where the centre of the disk is on the sky. The direction can be specified both in the constructor or with the setRefDirection function.
The width of the disk is defined as the angular diameter along the specified axis. The major axis has the larger width and is aligned North-South when the position angle is zero. A positive position angle moves the Northern side of the disk to the East. The axial ratio is the ratio of the minor to major axis widths. The major axis MUST not be smaller than the minor axis otherwise an AipsError is thrown.
These parameters of the disk (width, position angle, direction etc.) can be specified at construction time, using the *inRad functions or through functions, in the base classes. The base classes also implement functions for inter-converting this object into a record representation.
The flux, or integrated intensity, is always normalised to one. This class does not model the actual flux or its variation with frequency. It solely models the way the emission varies with position on the sky.
The sample member function is used to sample the component at any point on the sky. The scale factor calculated by this function is the proportion of the flux that is within a specified pixel size centered on the specified direction. This is not accurate for pixels which are partially covered by the disk. Ultimately this function will integrate the emission from the disk over the entire pixel but currently the returned flux will be either zero or a constant value with the returned value depending on whether the centre of the pixel in within the disk or not. This inaccuracy becomes more important when the pixel size become large compared to the disk width.
This class contains functions that return the Fourier transform of the disk at a specified spatial frequency. There are described more fully in the description of the visibility functions below.
{ // construct a model for Jupiter. Quantity clk_time; MVTime::read(clk_time, "01-10-2000/12:59"); MEpoch obs_epoch(clk_time, MEpoch::UTC); MeasFrame obs_frame(obs_epoch); MDirection jupiter_dir(MVDirection(0), MDirection::Ref(MDirection::JUPITER, obs_frame)); DiskShape jupiter_shape; jupiter_shape.setRefDirection(jupiter_dir); jupiter_shape.setWidth(Quantity(4,"arcmin"), Quantity(3.9,"arcmin"), Quantity(3, "deg")); printShape(jupiter_shape); MDirection sample_dir(MVDirection(1.218, 0.37), MDirection::J2000); if (jupiter_shape.sample(sample_dir, MVAngle(0.1)) > 0.0) { cout << "The position in J2000 coordinates is near: " << sample_dir.getAngle("deg") << endl; } }The printShape function is the example shown for the TwoSidedShape class.
Construct a disk shape centred in the specified direction, specifying the widths & position angle.
The copy constructor uses copy semantics.
The destructor does nothing special.
The assignment operator uses copy semantics.
get the type of the shape. This function always returns ComponentType::DISK.
set or return the width and orientation of the disk. All numerical values are in radians. There are also functions in the base class for doing this with other angular units.
Calculate the proportion of the flux that is in a pixel of specified size centered in the specified direction. The returned value will always be between zero and one (inclusive).
Same as the previous function except that many directions can be sampled at once. The reference frame and pixel size must be the same for all the specified directions.
Return the Fourier transform of the component at the specified point in the spatial frequency domain. The point is specified by a 3 element vector (u,v,w) that has units of meters and the frequency of the observation, in Hertz. These two quantities can be used to derive the required spatial frequency (s = uvw*freq/c). The w component is not used in these functions.
The reference position for the transform is the direction of the component. As this component is symmetric about this point the transform is always a real value.
Same as the previous function except that many (u,v,w) points can be sampled at once. The uvw Matrix must have a first dimension of three, and a second dimension that is the same as the length of the scale Vector. Otherwise and exception is thrown (when compiled in debug mode).
Return a pointer to a copy of this object upcast to a ComponentShape object. The class that uses this function is responsible for deleting the pointer. This is used to implement a virtual copy constructor.
Function which checks the internal data of this class for correct dimensionality and consistent values. Returns True if everything is fine otherwise returns False.