mock_lc

QhX.utils.mock_lc.artificial_lc_sampled(mjd, t, y)[source]

Returns a hypothetical light curve sampled in a given OpSim strategy. User needs to provide a reference light curve for sampling (usually a continuous light curve with 1-day cadence, see LC_conti() function).

Parameters:

mjd: np.array

Modified Julian Date obtained from OpSim. It is the time of each sampling of the light curve during the LSST operation period in one of the filters and specified sky coordinates.

t: np.array

Days during the survey on which we had an observation for a continuous reference light curve.

y: np.array

Light curve magnitudes for continuous reference light curve.

Returns:

top: np.array

Days during the survey when we had an observation (sampling) in a given OpSim strategy.

yop: np.array

Light curve magnitude taken from the reference light curve on days we had an observation (sampling) in a given OpSim strategy.

QhX.utils.mock_lc.artificial_stochastic_mock_lc(T, deltatc=1, oscillations=True, A=0.14, noise=5e-05, z=0, frame='observed')[source]

Generate one artificial light curve using a stochastic model based on the Damped random walk (DRW) process.

Parameters:

T: int

Total time span of the light curve. It is recommended to generate light curves to be at least 10 times longer than their characteristic timescale (Kozłowski 2017).

deltatc: int, default=1

Cadence (or sampling rate) - time interval between two consecutive samplings of the light curve in days.

oscillations: bool, default=True

If True, light curve simulation will take an oscillatory signal into account.

A: float, default=0.14

Amplitude of the oscillatory signal in magnitudes (used only if oscillations=True).

noise: float, default=0.00005

Amount of noise to include in the light curve simulation.

z: float, default=0

Redshift.

frame: {‘observed’, ‘rest’}, default=’observed’

Frame of reference.

Returns:

tt: np.array

Days when the light curve was sampled.

yy: np.array

Magnitudes of the simulated light curve.

QhX.utils.mock_lc.remove_fraction_with_seed(data, fraction, seed=0)[source]

Removes a fraction of data at random with given seed.

Parameters:

data: np.array

Data to remove values from.

fraction: float

Fraction of data to remove.

seed: int, default=0

Seed for randomness.

Returns:

np.array

Data with fraction removed.

QhX.utils.mock_lc.simple_mock_lc(time_interval, num_points, frequency, amplitude, percent, magnitude=20, time_unit='year', exp=1.8, mjd_start=52000)[source]

Generates a simple mock light curve using colored noise.

Parameters:

time_interval: float

The total time span of the light curve.

num_points: int

Number of points in the light curve.

frequency: float

Frequency of oscillations.

amplitude: float

Amplitude of oscillations.

percent: float

Percentage of data to randomly remove.

magnitude: float, default=20

Base magnitude for the light curve.

time_unit: str, default=’year’

Time unit for the time interval (‘year’, ‘day’, ‘hour’, ‘minute’, or ‘second’).

exp: float, default=1.8

Exponent for colored noise generation.

mjd_start: int, default=52000

Start of Modified Julian Date.