slsim.Sources.SourceVariability package¶
Submodules¶
slsim.Sources.SourceVariability.accretion_disk_reprocessing module¶
- class slsim.Sources.SourceVariability.accretion_disk_reprocessing.AccretionDiskReprocessing(reprocessing_model, **kwargs_agn_model)[source]¶
Bases:
object- define_intrinsic_signal(time_array=None, magnitude_array=None)[source]¶
Multi-purpose method to define an intrinsic signal of the AccretionDiskReprocessing() class. Passing in the time_array and magnitude_array arguments will write the signal to the object, while a call with no arguments will return the stored signal.
- Parameters:
time_array – The times which the light curve is sampled at, in [days].
magnitude_array – The amplitudes of the signal at each time in time_array.
- Returns:
The time_array and magnitude_array associated with the AccretionDiskReprocessing() object’s intrinsic (driving) signal.
- define_new_response_function(rest_frame_wavelength_in_nanometers)[source]¶
Define a response function of the agn accretion disk to the flaring corona in the lamppost geometry.
- Parameters:
rest_frame_wavelength_in_nanometers – The rest frame wavelength (not the observer’s frame!) in [nanometers].
- Returns:
An array representing the response function of the accretion disk with time lag spacing of [R_g / c].
- define_passband_response_function(passband, redshift=0, delta_wavelength=10, passband_wavelength_unit=Unit('Angstrom'))[source]¶
Calculates the response function of the agn accretion disk to the flaring corona in the lamppost geometry for an input passband.
- Parameters:
passband – Str or List representing passband data. Either from speclite or a user defined passband represented as a list of lists or arrays. The first must be wavelengths, and the second must be the throughput of signature: [wavelength, throughput].
redshift – Float value of source redshift. Used to convert wavelengths of the passband into emitted wavelengths.
delta_wavelength – Desired wavelength spacing in passband in [nanometers]. The passband will be resampled to allow for faster calculations.
passband_wavelength_unit – Astropy unit representing the wavelength units used to define the original passband. Speclite filters typically use angstroms.
- Returns:
An array representing the response function of the accretion disk with time lag spacing of [R_g / c].
- determine_agn_luminosity_from_known_luminosity(known_band, known_magnitude, redshift, mag_zero_point, cosmo=FlatLambdaCDM(name=None, H0=<Quantity 70. km / (Mpc s)>, Om0=0.3, Tcmb0=<Quantity 0. K>, Neff=3.04, m_nu=None, Ob0=0.0), band=None, observer_frame_wavelength_in_nm=None)[source]¶
Takes in the known luminosity of the AGN and defines the expected magnitude at other bands or wavelengths based on black body radiation. Speclite bands will be calculated at their effective wavelength.
- Parameters:
i_band_magnitude – Float representing magnitude of i band
redshift – Float representing redshift of AGN
cosmo – Astropy cosmology object used to calculate distances
bands – Float representing a speclite filter
wavelengths – Float representing wavlength in nm.
- reprocess_signal(rest_frame_wavelength_in_nanometers=None, response_function_time_lags=None, response_function_amplitudes=None)[source]¶
Multi-purpose method to calculate the response of the accretion disk to a reprocessing of the intrinsic signal. Passing the rest_frame_wavelength_in_nanometers argument will calculate a response function using define_new_response_function(). Passing in a response function (e.g. from an external source) to the response_function arguments will perform the convolution of the stored intrinsic signal with the chosen response function.
- Parameters:
rest_frame_wavelength_in_nanometers – Int representing the rest frame (not the observer’s frame!) wavelength to calculate the response function at, in [nanometers].
response_function_time_lags – An optional array representing the time_array associated with the response function with units [days]. Time lags are defined in the rest frame (not the observer’s frame!). If None and response_function_amplitudes is given, the time lags will be assumed to be in units [Rg / c].
response_function_amplitudes – An array representing the response function at each time lag. The amplitudes may use arbitrary units.
- Returns:
The magnitude_array of the reprocessed signal. Note that this is calculated in the rest frame, not the observer’s frame!
- slsim.Sources.SourceVariability.accretion_disk_reprocessing.lamppost_model(rest_frame_wavelength_in_nanometers, r_out=1000, r_resolution=500, inclination_angle=0, black_hole_mass_exponent=8.0, black_hole_spin=0.0, corona_height=10, eddington_ratio=0.1)[source]¶
Uses astro_util.calculate_accretion_disk_response_function() to define the response of the accretion disk due to a driving signal in the lamppost geometry.
- Parameters:
rest_frame_wavelength_in_nanometers – The wavelength to calculate the response function at, in [nanometers]. This is in the frame of the accretion disk, not the frame of the observer.
r_out – Maximum radius of the accretion disk in gravitational radii [R_g = GM/c^2], typically 10^3 to 10^5.
r_resolution – Number of gridpoints to use between 0 and r_out. Final map will be calculated at (2*r_resolution) x (2*r_resolution).
inclination_angle – The tilt of the accretion disk with respect to the observer [degrees]
black_hole_mass_exponent – The log of the black hole mass normalized by the mass of the sun; black_hole_mass_exponent = log_10(black_hole_mass / mass_sun). Typical AGN have an exponent ranging from 6 to 10.
black_hole_spin – The dimensionless spin parameter of the black hole, where the spinless case represents the Schwarzschild black hole. Maximum values of +/- 1.
corona_height – The height of the corona lamppost in gravitational radii [R_g]. Typical choices range from 0 to 100.
eddington_ratio – The desired Eddington ratio defined as a fraction of bolometric luminosity / Eddington luminosity.
- Returns:
The response function of the accretion disk with respect to variability in the corona.
slsim.Sources.SourceVariability.agn module¶
- class slsim.Sources.SourceVariability.agn.Agn(agn_known_band, agn_known_mag, redshift, cosmo=FlatLambdaCDM(name=None, H0=<Quantity 70. km / (Mpc s)>, Om0=0.3, Tcmb0=<Quantity 0. K>, Neff=3.04, m_nu=None, Ob0=0.0), lightcurve_time=None, agn_driving_variability_model=None, agn_driving_kwargs_variability=None, **kwargs_agn_model)[source]¶
Bases:
object- get_mean_mags(bands)[source]¶
Method to get mean magnitudes for AGN in multiple filters. Creates an accretion disk using the AccretionDiskReprocessing class in order to integrate the surface flux density over the accretion disk.
- Parameters:
bands – list of speclite filter names.
- Returns:
list of magnitudes based on the speclite bands given.
- slsim.Sources.SourceVariability.agn.RandomAgn(known_band, known_mag, redshift, cosmo=FlatLambdaCDM(name=None, H0=<Quantity 70. km / (Mpc s)>, Om0=0.3, Tcmb0=<Quantity 0. K>, Neff=3.04, m_nu=None, Ob0=0.0), lightcurve_time=None, agn_driving_variability_model=None, agn_driving_kwargs_variability=None, random_seed=None, input_agn_bounds_dict=None, **kwargs_agn_model)[source]¶
Generate a random agn.
- Parameters:
known_band – speclite filter string defining the known band
known_mag – magnitude of the AGN in a known band.
redshift – redshift of the AGN
cosmo – Astropy cosmology to use
kwargs_agn_model – Dictionary containing any fixed agn parameters. This will populate random agn parameters for keywords not given.
slsim.Sources.SourceVariability.light_curve_interpolation module¶
slsim.Sources.SourceVariability.sinusoidal_variability module¶
slsim.Sources.SourceVariability.variability module¶
- class slsim.Sources.SourceVariability.variability.Variability(variability_model, **kwargs_variability_model)[source]¶
Bases:
object
- slsim.Sources.SourceVariability.variability.parse_kwargs_for_lamppost_reprocessed_model(variability)[source]¶
Separates categories of variability.kwargs for lamppost reprocessing.
- Parameters:
variability – Variability class object following model ‘lamppost_reprocessed’.
- Result:
Parses variability.kwargs into variability dictionaries for: - agn kwargs - driving signal kwargs - reprocessing kwargs - signal kwargs
- slsim.Sources.SourceVariability.variability.reprocess_with_lamppost_model(variability)[source]¶
Reprocesses the signal based on the type of accretion disk reprocessor.
- Parameters:
variability – Variability class object model ‘lamppost_reprocessed’.
- Returns:
dict containing a light curve object parameters