Пример #1
0
def test_simple_manual():
    tm = TimingModel(
        name="test_manual", components=[AstrometryEquatorial(), Spindown()]
    )
    tm.setup()
    assert "F0" in tm.phase_deriv_funcs.keys()
    assert "F1" in tm.phase_deriv_funcs.keys()
    assert "RAJ" in tm.delay_deriv_funcs.keys()
    assert "DECJ" in tm.delay_deriv_funcs.keys()

    with pytest.raises(MissingParameter):  # No RA and DEC input
        tm.validate()

    tm.RAJ.value = "19:59:48"
    tm.DECJ.value = "20:48:36"
    tm.F0.value = 622.122030511927 * u.Hz
    tm.validate()  # This should work.
Пример #2
0
def test_simple_manual():
    tm = TimingModel(
        name="test_manual", components=[AstrometryEquatorial(), Spindown()]
    )
    tm.setup()
    assert "F0" in tm.phase_deriv_funcs.keys()
    assert "RAJ" in tm.delay_deriv_funcs.keys()
    assert "DECJ" in tm.delay_deriv_funcs.keys()

    with pytest.raises(MissingParameter):  # No RA and DEC input
        tm.validate()

    tm.RAJ.value = "19:59:48"
    tm.DECJ.value = "20:48:36"
    tm.F0.quantity = 622.122030511927 * u.Hz
    tm.PEPOCH.value = 48196.0
    tm.validate()  # This should work.

    # When there is no POSEPOCH set, it should just be unset
    assert tm.POSEPOCH.value is None
Пример #3
0
from pint.models.binary_dd import BinaryDD
from pint.models.binary_ddk import BinaryDDK
from pint.models.binary_ell1 import BinaryELL1, BinaryELL1H
from pint.models.dispersion_model import DispersionDM, DispersionDMX
from pint.models.frequency_dependent import FD
from pint.models.glitch import Glitch
from pint.models.jump import DelayJump, PhaseJump
from pint.models.model_builder import get_model
from pint.models.noise_model import EcorrNoise, PLRedNoise, ScaleToaError
from pint.models.solar_system_shapiro import SolarSystemShapiro
from pint.models.solar_wind_dispersion import SolarWindDispersion
from pint.models.spindown import Spindown

# Import the main timing model classes
from pint.models.timing_model import TimingModel, DEFAULT_ORDER
from pint.models.wave import Wave
from pint.models.ifunc import IFunc

# Define a standard basic model
StandardTimingModel = TimingModel(
    "StandardTimingModel",
    [AstrometryEquatorial(),
     Spindown(),
     DispersionDM(),
     SolarSystemShapiro()],
)
# BTTimingModel = generate_timing_model("BTTimingModel",
#         (Astrometry, Spindown, Dispersion, SolarSystemShapiro, BT))
# DDTimingModel = generate_timing_model("DDTimingModel",
#         (Astrometry, Spindown, Dispersion, SolarSystemShapiro, DD))
Пример #4
0
# Import all standard model components here
from pint.models.astrometry import AstrometryEcliptic, AstrometryEquatorial
from pint.models.binary_bt import BinaryBT
from pint.models.binary_dd import BinaryDD
from pint.models.binary_ddk import BinaryDDK
from pint.models.binary_ell1 import BinaryELL1, BinaryELL1H
from pint.models.dispersion_model import DispersionDM, DispersionDMX
from pint.models.frequency_dependent import FD
from pint.models.glitch import Glitch
from pint.models.jump import DelayJump, PhaseJump
from pint.models.model_builder import get_model
from pint.models.noise_model import EcorrNoise, PLRedNoise, ScaleToaError
from pint.models.solar_system_shapiro import SolarSystemShapiro
from pint.models.solar_wind_dispersion import SolarWindDispersion
from pint.models.spindown import Spindown

# Import the main timing model classes
from pint.models.timing_model import TimingModel
from pint.models.wave import Wave
from pint.models.ifunc import IFunc

# Define a standard basic model
StandardTimingModel = TimingModel(
    "StandardTimingModel",
    (AstrometryEquatorial(), Spindown(), DispersionDM(), SolarSystemShapiro()),
)
# BTTimingModel = generate_timing_model("BTTimingModel",
#         (Astrometry, Spindown, Dispersion, SolarSystemShapiro, BT))
# DDTimingModel = generate_timing_model("DDTimingModel",
#         (Astrometry, Spindown, Dispersion, SolarSystemShapiro, DD))