spiral_profile¶
-
simcado.source.
spiral_profile
(r_eff, ellipticity=0.5, angle=45, n_arms=2, tightness=4.0, arms_width=0.1, central_brightness=10, normalization='total', width=1024, height=1024, oversample=1, **kwargs)[source]¶ Creates a spiral profile with arbitary parameters
- Parameters
- r_efffloat
[pixel] Effective (half-light) radius
- ellipticityfloat
Ellipticity is defined as (a - b)/a. Default = 0.5
- anglefloat
[deg] Default = 45. Rotation anti-clockwise from the x-axis
- n_armsint
Number of spiral arms
- tightnessfloat
How many times an arm crosses the major axis. Default = 4.
- arms_widthfloat
An arbitary scaling factor for how think the arms should be. Seems to scale with central_brightness. Default = 0.1
- central_brightnessfloat
An arbitary scaling factor for the strength of the central region. Has some connection to ars_width. Default = 10
- normalizationstr, optional
[“half-light”, “centre”, “total”] Where the profile equals unity If normalization equals: - “centre” : the maximum values are set to 1 - “total” : the image sums to 1
- width, heightint, int
[pixel] Dimensions of the image
- x_offset, y_offsetfloat
[pixel] The distance between the centre of the profile and the centre of the image
- oversampleint
Factor of oversampling, default factor = 1. If > 1, the model is discretized by taking the average of an oversampled grid.
- Returns
- imgnp.ndarray
A 2D image of a spiral disk
See also
Notes
The intensity drop-off is dictated by a sersic profile of with indes n=1, i.e. an exponential drop-off. This can be altered by passing the keyword “n=” as an optional parameter.
Spiral structure taken from here: https://stackoverflow.com/questions/36095775/creating-a-spiral-structure-in-python-using-hyperbolic-tangent