def execute_agenda(self, agenda): """ Execute agenda on workspace. Args: agenda (arts.workspace.agenda.Agenda): Agenda object to execute. Raises: ValueError: If argument is not of type arts.workspace.agenda.Agenda """ value_error = ValueError("Argument must be of type agenda.") if not type(agenda) is Agenda: raise value_error include_path_push(os.getcwd()) data_path_push(os.getcwd()) agenda.execute(self) include_path_pop() data_path_pop()
import numpy as np import pytest import artssat from artssat import ArtsSimulation from artssat.atmosphere import Atmosphere1D from artssat.atmosphere.absorption import O2, N2, H2O from artssat.scattering import ScatteringSpecies, D14 from artssat.atmosphere.surface import Tessem, Telsem, CombinedSurface from artssat.sensor import CloudSat, MWI from pyarts.workspace.api import include_path_push include_path_push("../data") from examples.data_provider import DataProvider import matplotlib.pyplot as plt import os import sys test_path = os.path.join(os.path.dirname(artssat.__file__), "..", "tests") sys.path.append(test_path) from utils.data import scattering_data, scattering_meta def test_simulation_tessem(): atmosphere = Atmosphere1D(absorbers=[O2(), N2(), H2O()], surface=Tessem()) mwi = MWI() mwi.sensor_line_of_sight = np.array([[135.0]]) mwi.sensor_position = np.array([[600e3]])
from artssat.retrieval.a_priori import FixedAPriori, Diagonal, \ SensorNoiseAPriori import pyarts from pyarts.workspace.api import include_path_push import numpy as np import os import sys base_path = os.path.join(os.path.dirname(artssat.__file__), "..") sys.path.append(base_path) sys.path.append(os.path.join(base_path, "tests")) from utils.data import scattering_data, scattering_meta include_path_push(os.path.join(base_path, "tests", "data")) def arts_simulation(scattering=False, multiview=False): # Sensors if multiview: lines_of_sight = np.array([[135.0], [150.0], [180.0]]) positions = np.array([[600e3], [500e3], [600e3]]) ici = ICI(channel_indices=[0, -1], lines_of_sight=lines_of_sight, stokes_dimension=1, positions=positions) else: ici = ICI(channel_indices=[0, -1], stokes_dimension=1)