# Activity Module (sbpy.activity)¶

## Introduction¶

sbpy.activity models cometary dust and gas activity. It is separated into two main sub-modules: Dust comae (sbpy.activity.dust) and Gas Comae (sbpy.activity.gas). The base module itself defines photmetric apertures that may be useful for observations of comets.

## Apertures¶

Four photometric apertures are defined:

All apertures assume they are centered on the source, i.e., offsets are not supported, but may be added in the future.

Each object is initialized with the dimensions of the aperture, which may be in linear or angular units:

>>> import astropy.units as u
>>> import sbpy.activity as sba
>>>
>>> sba.CircularAperture(10 * u.arcsec)
>>>
>>> sba.RectangularAperture((2000, 5000) * u.km)
<RectangularAperture: dimensions 2000.0×5000.0 km>


Apertures may be converted between linear and angular units using as_angle() and as_length(). The conversion requires the observer-target distance ('delta') as a Quantity or Ephem.

>>> ap = sba.CircularAperture(1 * u.arcsec)
>>> ap.as_length(1 * u.au)  # doctest: +FLOAT_CMP


Ideal comae (constant production rate, free-expansion, infinite lifetime) have 1/ρ surface brightness distributions. With coma_equivalent_radius(), we may convert the aperture into a circular aperture that would contain the same total flux at the telescope:

>>> ap = sba.RectangularAperture((2000, 5000) * u.km)


## Reference/API¶

SBPy Module for simulating cometary activity and observations.

### Functions¶

 beta_factor(mol_data, ephemobj) Returns beta factor based on timescales from gas and distance from the Sun using an ephem object. einstein_coeff(mol_data) Einstein coefficient from molecular data fluorescence_band_strength(species[, eph, …]) Fluorescence band strength. from_Haser(coma, mol_data[, aper]) Calculate production rate for GasComa intensity_conversion(mol_data) Returns conversion of the integrated line intensity at 300 K (from the JPL molecular spectra catalog) to a chosen temperature phase_HalleyMarcus(phase) Halley-Marcus composite dust phase function. photo_lengthscale(species[, source]) Photodissociation lengthscale for a gas species. photo_timescale(species[, source]) Photodissociation timescale for a gas species. total_number(mol_data, aper, b) Equation relating number of molecules with column density, the aperture, and geometry given and accounting for photodissociation, derived from data provided.

### Classes¶

 Afrho Coma dust quantity for scattered light. AnnularAperture(shape) Annular aperture projected at the distance of the target. Aperture(dim) Abstract base class for photometric apertures. CircularAperture(radius) Circular aperture projected at the distance of the target. Efrho Coma dust quantity for thermal emission. GaussianAperture([sigma, fwhm]) Gaussian-shaped aperture, e.g., for radio observations. Haser(Q, v, parent[, daughter]) Haser coma model. LTE LTE Methods for calculating production_rate NonLTE Class method for non LTE production rate models Not Yet implemented Rectangular aperture projected at the distance of the target.