예제 #1
0
    def test_make_interpolation(self):
        """ Test Keplerian circular orbit model. """
        # Instantiate emissivity object in setup mode.
        emissivity_setup = Emissivity(setup_mode=True)
        emissivity_setup.rt_results_db = 'test_jar/mock_rt_results.db'
        emissivity_setup.rt_results_table = 'mock_data'

        # Setup spectral line and wind velocity profile.
        emissivity_setup.set_spectral_line(line=3)
        emissivity_setup.set_wind_velocity_profile(
            wind_velocity_solution='beta_1',
            initial_velocity=20,
            stellar_radius=50,
            sonic_radius=60)

        # Build interpolation object.
        Mdot = 5e-4
        Vinf = 500
        Time = np.linspace(0, 1000, 10)
        emissivity_setup.build_static_interpolation_object(Mdot, Vinf, Time)
예제 #2
0
# to available param space output from radiative transfer. N.B
# limiting times provides a kernel size which ensures complete
# overlap in the convolution's valid mode for a given
# number/fraction of signal/periods.
Mdot = 1e-5
Vinf = 1300
Time = np.linspace(0, 10, 100)

# Iterate spectral lines.
spectral_lines = [1, 2]
for line in spectral_lines:

    # Instantiate emissivity object in setup mode.
    # N.B see line_label for verbose transition name.
    emissivity_setup = Emissivity(setup_mode=True)
    emissivity_setup.rt_results_db = RT_DB_PATH
    emissivity_setup.rt_results_table = RT_TABLE

    # Setup spectral line and wind velocity profile.
    emissivity_setup.set_spectral_line(line)
    emissivity_setup.set_wind_velocity_profile(
        wind_velocity_solution=WIND_VELOCITY_SOL,
        initial_velocity=INITIAL_VELOCITY,
        stellar_radius=STELLAR_RADIUS,
        sonic_radius=SONIC_RADIUS)

    # Build interpolation object.
    emissivity_setup.build_static_interpolation_object(Mdot, Vinf, Time)

    # Write interpolation object to disk.
    emissivity_setup.pickle_interpolation_object(INTERP_LABEL)