astromodels.functions.functions_3D module

class astromodels.functions.functions_3D.Continuous_injection_diffusion(**kwargs)[source]

Bases: Function3D

description :

Positron and electrons diffusing away from the accelerator

latex : $left(frac{180^circ}{pi}right)^2 frac{1.2154}{sqrt{pi^3} r_{rm diff} ({rm angsep} ({rm x, y, lon_0, lat_0})+0.06 r_{rm diff} )} , {rm exp}left(-frac{{rm angsep}^2 ({rm x, y, lon_0, lat_0})}{r_{rm diff} ^2} right)$

parameters :

lon0 :

desc : Longitude of the center of the source initial value : 0.0 min : 0.0 max : 360.0

lat0 :

desc : Latitude of the center of the source initial value : 0.0 min : -90.0 max : 90.0

rdiff0 :

desc : Projected diffusion radius limited by the cooling time. The maximum allowed value is used to define the truncation radius. initial value : 1.0 min : 0 max : 20

rinj :

desc : Ratio of diffusion radius limited by the injection time over rdiff0. The maximum allowed value is used to define the truncation radius. initial value : 100.0 min : 0 max : 200 fix : yes

delta :

desc : index for the diffusion coefficient initial value : 0.5 min : 0.3 max : 0.6 fix : yes

b :

desc : b field strength in uG initial value : 3 min : 1 max : 10. fix : yes

piv :

desc : Pivot for the diffusion radius initial value : 2e10 min : 0 fix : yes

piv2 :

desc : Pivot for converting gamma energy to electron energy (always be 1 TeV) initial value : 1e9 min : 0 fix : yes

evaluate(x, y, z, lon0, lat0, rdiff0, rinj, delta, b, piv, piv2)[source]
get_boundaries()[source]

Returns the boundaries of this function. By default there is no boundary, but subclasses can override this.

Returns:

a tuple of tuples containing the boundaries for each coordinate (ra_min, ra_max), (dec_min, dec_max)

get_total_spatial_integral(z=None)[source]

Returns the total integral (for 2D functions) or the integral over the spatial components (for 3D functions). needs to be implemented in subclasses.

Returns:

an array of values of the integral (same dimension as z).

static info()
class astromodels.functions.functions_3D.Continuous_injection_diffusion_ellipse(**kwargs)[source]

Bases: Function3D

description :

Positron and electrons diffusing away from the accelerator

latex : $left(frac{180^circ}{pi}right)^2 frac{1.2154}{sqrt{pi^3} r_{rm diff} ({rm angsep} ({rm x, y, lon_0, lat_0})+0.06 r_{rm diff} )} , {rm exp}left(-frac{{rm angsep}^2 ({rm x, y, lon_0, lat_0})}{r_{rm diff} ^2} right)$

parameters :

lon0 :

desc : Longitude of the center of the source initial value : 0.0 min : 0.0 max : 360.0

lat0 :

desc : Latitude of the center of the source initial value : 0.0 min : -90.0 max : 90.0

rdiff0 :

desc : Projected diffusion radius. The maximum allowed value is used to define the truncation radius. initial value : 1.0 min : 0 max : 20

delta :

desc : index for the diffusion coefficient initial value : 0.5 min : 0.3 max : 0.6 fix : yes

b :

desc : b field strength in uG initial value : 3 min : 1 max : 10. fix : yes

piv :

desc : Pivot for the diffusion radius initial value : 2e10 min : 0 fix : yes

piv2 :

desc : Pivot for converting gamma energy to electron energy (always be 1 TeV) initial value : 1e9 min : 0 fix : yes

incl :

desc : inclination of semimajoraxis to a line of constant latitude initial value : 0.0 min : -90.0 max : 90.0 fix : yes

elongation :

desc : elongation of the ellipse (b/a) initial value : 1. min : 0.1 max : 10.

evaluate(x, y, z, lon0, lat0, rdiff0, delta, b, piv, piv2, incl, elongation)[source]
get_boundaries()[source]

Returns the boundaries of this function. By default there is no boundary, but subclasses can override this.

Returns:

a tuple of tuples containing the boundaries for each coordinate (ra_min, ra_max), (dec_min, dec_max)

get_total_spatial_integral(z=None)[source]

Returns the total integral (for 2D functions) or the integral over the spatial components (for 3D functions). needs to be implemented in subclasses.

Returns:

an array of values of the integral (same dimension as z).

static info()
class astromodels.functions.functions_3D.Continuous_injection_diffusion_legacy(**kwargs)[source]

Bases: Function3D

description :

Positron and electrons diffusing away from the accelerator

latex : $left(frac{180^circ}{pi}right)^2 frac{1.2154}{sqrt{pi^3} r_{rm diff} ({rm angsep} ({rm x, y, lon_0, lat_0})+0.06 r_{rm diff} )} , {rm exp}left(-frac{{rm angsep}^2 ({rm x, y, lon_0, lat_0})}{r_{rm diff} ^2} right)$

parameters :

lon0 :

desc : Longitude of the center of the source initial value : 0.0 min : 0.0 max : 360.0

lat0 :

desc : Latitude of the center of the source initial value : 0.0 min : -90.0 max : 90.0

rdiff0 :

desc : Projected diffusion radius. The maximum allowed value is used to define the truncation radius. initial value : 1.0 min : 0 max : 20

delta :

desc : index for the diffusion coefficient initial value : 0.5 min : 0.3 max : 0.6 fix : yes

uratio :

desc : ratio between u_cmb and u_B initial value : 0.5 min : 0.01 max : 100. fix : yes

piv :

desc : Pivot for the diffusion radius initial value : 2e10 min : 0 fix : yes

piv2 :

desc : Pivot for converting gamma energy to electron energy (always be 1 TeV) initial value : 1e9 min : 0 fix : yes

evaluate(x, y, z, lon0, lat0, rdiff0, delta, uratio, piv, piv2)[source]
get_boundaries()[source]

Returns the boundaries of this function. By default there is no boundary, but subclasses can override this.

Returns:

a tuple of tuples containing the boundaries for each coordinate (ra_min, ra_max), (dec_min, dec_max)

get_total_spatial_integral(z=None)[source]

Returns the total integral (for 2D functions) or the integral over the spatial components (for 3D functions). needs to be implemented in subclasses.

Returns:

an array of values of the integral (same dimension as z).

static info()
class astromodels.functions.functions_3D.GalPropTemplate_3D(name: str | None = None, function_definition: str | None = None, parameters: Dict[str, Parameter] | None = None, properties: Dict[str, FunctionProperty] | None = None)[source]

Bases: Function3D

description :

Use a 3D template that has morphology and flux information. GalProp, DRAGON or a similar model in fits format would work. Only parameter is a normalization factor.

latex : $ K $

parameters :

K :

desc : normalization initial value : 1 fix : yes

hash :

desc : hash of model map [needed for memoization] initial value : 1 fix : yes

define_region(a, b, c, d, galactic=False)[source]
evaluate(x, y, z, K, hash)[source]
get_boundaries()[source]

Returns the boundaries of this function. By default there is no boundary, but subclasses can override this.

Returns:

a tuple of tuples containing the boundaries for each coordinate (ra_min, ra_max), (dec_min, dec_max)

load_file(fitsfile, phi1, phi2, theta1, theta2, galactic=False, ihdu=0)[source]
set_frame(new_frame)[source]

Set a new frame for the coordinates (the default is ICRS J2000)

Parameters:

new_frame – a coordinate frame from astropy

Returns:

(none)

to_dict(minimal=False)[source]
which_model_file()[source]