astrocook.mocks package#
Submodules#
- astrocook.mocks.generate module
- astrocook.mocks.physics module
- astrocook.mocks.populations module
- astrocook.mocks.truth module
MockComponentEmissionLineQSO_EMISSION_LINESMockTruthMockTruth.componentsMockTruth.lam_min_nmMockTruth.lam_max_nmMockTruth.dv_kmsMockTruth.resolMockTruth.snrMockTruth.z_emMockTruth.seedMockTruth.oversampleMockTruth.cont_amplitudeMockTruth.cont_slopeMockTruth.cont_ref_nmMockTruth.emission_linesMockTruth.n_spikesMockTruth.spike_amplitudeMockTruth.lyman_limitMockTruth.noise_floorMockTruth.to_dict()MockTruth.from_dict()MockTruth.to_json()MockTruth.from_json()MockTruth.__init__()
Module contents#
Synthetic quasar spectra with known parameters (mocks).
The generator is independent of the V2 fitting code: it has its own Voigt
profile, convolution and pixel integration, so that the fitting code can be
tested against it. It shares only the atomic data table
(astrocook.core.atomic_data.ATOM_DATA).
Typical use:
from astrocook.mocks import MockComponent, MockTruth, generate
truth = MockTruth(
components=[MockComponent("CIV", z=2.97, logN=13.5, b=10.0)],
lam_min_nm=612.0, lam_max_nm=620.0, dv_kms=2.5,
resol=45000.0, snr=50.0, z_em=3.1, seed=1)
spectrum = generate(truth) # Spectrum
truth.to_json("mock_truth.json") # ground truth, for later comparison