from pyarts.workspace import Workspace from pyarts.classes.XsecRecord import XsecRecord from pyarts.classes.Vector import Vector, ArrayOfVector from pyarts.classes import from_workspace xr = XsecRecord() xr2 = XsecRecord() xr.spec = 1 xr.coeffs = 2 xr.ref_pressure = 3 xr.ref_temperature = 4 xr.fgrids = ArrayOfVector([Vector([5, 6])]) xr.xsecs = ArrayOfVector([Vector([7, 8])]) xr.temperature_slope = ArrayOfVector([Vector([9, 10])]) xr.temperature_intersect = ArrayOfVector([Vector([11, 12])]) xr2.set(xr) assert xr == xr2 xr3 = XsecRecord() xr.savexml("tmp.xr.xml", "binary") xr3.readxml("tmp.xr.xml") assert xr3 == xr
def grids(self): """ (ArrayOfVector) """ return ArrayOfVector( c.c_void_p(lib.getGridsRetrievalQuantity(self.__data__)))
p.data = [3, 2, 1] lat.data = [1, 2, 3, 4] lon.data = [1, 2, 3, 4, 5] ws.jacobianAddTemperature(g1=p.data, g2=lat.data, g3=lon.data) arq = from_workspace(ws.jacobian_quantities) rq = RetrievalQuantity() rq.maintag = "" rq.subtag = "HSE on" rq.subsubtag = "" rq.mode = "" rq.analytical = 1 rq.target.type = "Atm" rq.target.subtype = "Temperature" rq.target.perturbation = 0.1 rq.grids = ArrayOfVector([p, lat, lon]) assert rq == arq[0] arq.size = 2 arq[1].set(rq) assert arq[1] == arq[0] arq.append(rq) assert arq[1] == arq[2] qn = QuantumIdentifier("H2O TR UP LO") aost = [SpeciesTag(), SpeciesTag()] aost[0].setFromString("H2O-161") aost[1].setFromString("H2O-MPM89") rq2 = RetrievalQuantity() rq2.maintag = ""
def xsecs(self): """ Cross-sections (ArrayOfVector) """ return ArrayOfVector(c.c_void_p(lib.getXsecsXsecRecord(self.__data__)))
def fgrids(self): """ Frequency grids (ArrayOfVector) """ return ArrayOfVector(c.c_void_p(lib.getFgridsXsecRecord( self.__data__)))
def temperature_intersect(self): """ Intersect of temperature fits (ArrayOfVector) """ return ArrayOfVector( c.c_void_p(lib.getTemperatureIntersectXsecRecord(self.__data__)))
def temperature_slope(self): """ Slope of temperature fits (ArrayOfVector) """ return ArrayOfVector( c.c_void_p(lib.getTemperatureSlopeXsecRecord(self.__data__)))