def __eq__(self, other): if isinstance(other, GriddedField4) and \ self.fieldname == other.fieldname and \ self.gridnames == other.gridnames and \ self.grids == other.grids and \ self.data == other.data: return True else: return False def __bool__(self): return bool(self.data) exec(array_base(GriddedField4)) lib.createGriddedField4.restype = c.c_void_p lib.createGriddedField4.argtypes = [] lib.deleteGriddedField4.restype = None lib.deleteGriddedField4.argtypes = [c.c_void_p] lib.printGriddedField4.restype = None lib.printGriddedField4.argtypes = [c.c_void_p] lib.xmlreadGriddedField4.restype = c.c_long lib.xmlreadGriddedField4.argtypes = [c.c_void_p, c.c_char_p] lib.xmlsaveGriddedField4.restype = c.c_long lib.xmlsaveGriddedField4.argtypes = [
self.analytical == other.analytical and \ self.perturbation == other.perturbation and \ self.grids == other.grids and \ self.quantumidentity == other.quantumidentity and \ self.transformation_func == other.transformation_func and \ self.t_func_parameters == other.t_func_parameters and \ self.transformation == other.transformation and \ self.offset == other.offset and \ self.type == other.type and \ self.integration == other.integration: return True else: return False exec(array_base(RetrievalQuantity)) lib.createRetrievalQuantity.restype = c.c_void_p lib.createRetrievalQuantity.argtypes = [] lib.deleteRetrievalQuantity.restype = None lib.deleteRetrievalQuantity.argtypes = [c.c_void_p] lib.printRetrievalQuantity.restype = None lib.printRetrievalQuantity.argtypes = [c.c_void_p] lib.xmlreadRetrievalQuantity.restype = c.c_long lib.xmlreadRetrievalQuantity.argtypes = [c.c_void_p, c.c_char_p] lib.xmlsaveRetrievalQuantity.restype = c.c_long lib.xmlsaveRetrievalQuantity.argtypes = [
def __rmul__(self, val): return Tensor5(np.array(val) * self.data) def __rmatmul__(self, val): return np.array(val) @ self.data def __rtruediv__(self, val): return Tensor5(np.array(val) / self.data) def __rpow__(self, val): return Tensor5(np.array(val)**self.data) # ArrayOfTensor5 exec(array_base(Tensor5)) # ArrayOfArrayOfTensor5 # exec(array_base(ArrayOfTensor5)) lib.createTensor5.restype = c.c_void_p lib.createTensor5.argtypes = [] lib.deleteTensor5.restype = None lib.deleteTensor5.argtypes = [c.c_void_p] lib.printTensor5.restype = None lib.printTensor5.argtypes = [c.c_void_p] lib.xmlreadTensor5.restype = c.c_long lib.xmlreadTensor5.argtypes = [c.c_void_p, c.c_char_p]
clobber: Allow clobbering files? (any boolean) """ if lib.xmlsaveCIARecord(self.__data__, *correct_save_arguments(file, type, clobber)): raise OSError("Cannot save {}".format(file)) def __eq__(self, other): if isinstance(other, CIARecord) and self.specs == other.specs and self.data == other.data: return True else: return False exec(array_base(CIARecord)) lib.createCIARecord.restype = c.c_void_p lib.createCIARecord.argtypes = [] lib.deleteCIARecord.restype = None lib.deleteCIARecord.argtypes = [c.c_void_p] lib.printCIARecord.restype = None lib.printCIARecord.argtypes = [c.c_void_p] lib.xmlreadCIARecord.restype = c.c_long lib.xmlreadCIARecord.argtypes = [c.c_void_p, c.c_char_p] lib.xmlsaveCIARecord.restype = c.c_long
raise OSError("Cannot save {}".format(file)) def __eq__(self, other): if isinstance(other, JacobianTarget) and \ self.type == other.type and\ self.subtype == other.subtype and \ (self.perturbation == other.perturbation or (isnan(self.perturbation) and isnan(other.perturbation))) and \ self.quantumidentity == other.quantumidentity and \ self.string_key == other.string_key and \ self.specieslist == other.specieslist: return True else: return False exec(array_base(JacobianTarget)) lib.createJacobianTarget.restype = c.c_void_p lib.createJacobianTarget.argtypes = [] lib.deleteJacobianTarget.restype = None lib.deleteJacobianTarget.argtypes = [c.c_void_p] lib.printJacobianTarget.restype = None lib.printJacobianTarget.argtypes = [c.c_void_p] lib.xmlreadJacobianTarget.restype = c.c_long lib.xmlreadJacobianTarget.argtypes = [c.c_void_p, c.c_char_p] lib.xmlsaveJacobianTarget.restype = c.c_long
correct_read_arguments(file)): raise OSError("Cannot read {}".format(file)) def savexml(self, file, type="ascii", clobber=True): """ Saves the class to XML file Input: file: Filename to writable file (str) type: Filetype (str) clobber: Allow clobbering files? (any boolean) """ if lib.xmlsaveQuantumIdentifier( self.__data__, *correct_save_arguments(file, type, clobber)): raise OSError("Cannot save {}".format(file)) BasicInterfaceCAPI(lib, "QuantumIdentifier") VoidStructGetterCAPI(lib, "QuantumIdentifier", "isotopologue_index") VoidStructGetterCAPI(lib, "QuantumIdentifier", "val") lib.fromstringQuantumIdentifier.restype = c.c_long lib.fromstringQuantumIdentifier.argtypes = [c.c_void_p, c.c_char_p] # Generate ArrayOfQuantumIdentifier exec(array_base(QuantumIdentifier))
def __rmul__(self, val): return Matrix(np.array(val) * self.data) def __rmatmul__(self, val): return np.array(val) @ self.data def __rtruediv__(self, val): return Matrix(np.array(val) / self.data) def __rpow__(self, val): return Matrix(np.array(val) ** self.data) # ArrayOfMatrix exec(array_base(Matrix)) # ArrayOfArrayOfMatrix exec(array_base(ArrayOfMatrix)) lib.createMatrix.restype = c.c_void_p lib.createMatrix.argtypes = [] lib.deleteMatrix.restype = None lib.deleteMatrix.argtypes = [c.c_void_p] lib.printMatrix.restype = None lib.printMatrix.argtypes = [c.c_void_p]
self.end_los == other.end_los and \ self.end_lstep == other.end_lstep and \ self.nreal == other.nreal and \ self.ngroup == other.ngroup and \ self.gp_p == other.gp_p and \ self.gp_lat == other.gp_lat and \ self.gp_lon == other.gp_lon: return True else: return False def __bool__(self): return not self.np <= 0 exec(array_base(Ppath)) lib.createPpath.restype = c.c_void_p lib.createPpath.argtypes = [] lib.deletePpath.restype = None lib.deletePpath.argtypes = [c.c_void_p] lib.printPpath.restype = None lib.printPpath.argtypes = [c.c_void_p] lib.xmlreadPpath.restype = c.c_long lib.xmlreadPpath.argtypes = [c.c_void_p, c.c_char_p] lib.xmlsavePpath.restype = c.c_long lib.xmlsavePpath.argtypes = [c.c_void_p, c.c_char_p, c.c_long, c.c_long]
def __eq__(self, other): if isinstance(other, XsecRecord) and \ self.spec == other.spec and \ self.coeffs == other.coeffs and \ self.ref_pressure == other.ref_pressure and \ self.ref_temperature == other.ref_temperature and \ self.fgrids == other.fgrids and \ self.xsecs == other.xsecs and \ self.temperature_slope == other.temperature_slope and \ self.temperature_intersect == other.temperature_intersect: return True else: return False exec(array_base(XsecRecord)) lib.createXsecRecord.restype = c.c_void_p lib.createXsecRecord.argtypes = [] lib.deleteXsecRecord.restype = None lib.deleteXsecRecord.argtypes = [c.c_void_p] lib.printXsecRecord.restype = None lib.printXsecRecord.argtypes = [c.c_void_p] lib.xmlreadXsecRecord.restype = c.c_long lib.xmlreadXsecRecord.argtypes = [c.c_void_p, c.c_char_p] lib.xmlsaveXsecRecord.restype = c.c_long lib.xmlsaveXsecRecord.argtypes = [c.c_void_p, c.c_char_p, c.c_long, c.c_long]
return Sparse(np.array(val) - self.data) def __rmul__(self, val): return Sparse(np.array(val) * self.data) def __rmatmul__(self, val): return np.array(val) @ self.data def __rtruediv__(self, val): return Sparse(np.array(val) / self.data) def __rpow__(self, val): return Sparse(np.array(val)**self.data) exec(array_base(Sparse)) lib.createSparse.restype = c.c_void_p lib.createSparse.argtypes = [] lib.deleteSparse.restype = None lib.deleteSparse.argtypes = [c.c_void_p] lib.printSparse.restype = None lib.printSparse.argtypes = [c.c_void_p] lib.xmlreadSparse.restype = c.c_long lib.xmlreadSparse.argtypes = [c.c_void_p, c.c_char_p] lib.xmlsaveSparse.restype = c.c_long lib.xmlsaveSparse.argtypes = [c.c_void_p, c.c_char_p, c.c_long, c.c_long]
self.pos = other.pos self.lx = other.lx self.dlx = other.dlx else: raise TypeError("Expects LagrangeInterpolation") def __eq__(self, other): if isinstance( other, LagrangeInterpolation ) and self.pos == other.pos and self.lx == other.lx and self.dlx == other.dlx: return True else: return False exec(array_base(LagrangeInterpolation)) lib.createLagrangeInterpolation.restype = c.c_void_p lib.createLagrangeInterpolation.argtypes = [] lib.deleteLagrangeInterpolation.restype = None lib.deleteLagrangeInterpolation.argtypes = [c.c_void_p] lib.printLagrangeInterpolation.restype = None lib.printLagrangeInterpolation.argtypes = [c.c_void_p] lib.getposLagrangeInterpolation.restype = c.c_void_p lib.getposLagrangeInterpolation.argtypes = [c.c_void_p] lib.getlxLagrangeInterpolation.restype = c.c_void_p lib.getlxLagrangeInterpolation.argtypes = [c.c_void_p]
""" if lib.xmlsaveTransmissionMatrix( self.__data__, *correct_save_arguments(file, type, clobber)): raise OSError("Cannot save {}".format(file)) def __eq__(self, other): if isinstance(other, Sized) and len(other) == len(self): for i in range(len(self)): if (self[i] != other[i]).any(): return False return True else: return False exec(array_base(TransmissionMatrix)) exec(array_base(ArrayOfTransmissionMatrix)) lib.createTransmissionMatrix.restype = c.c_void_p lib.createTransmissionMatrix.argtypes = [] lib.deleteTransmissionMatrix.restype = None lib.deleteTransmissionMatrix.argtypes = [c.c_void_p] lib.printTransmissionMatrix.restype = None lib.printTransmissionMatrix.argtypes = [c.c_void_p] lib.xmlreadTransmissionMatrix.restype = c.c_long lib.xmlreadTransmissionMatrix.argtypes = [c.c_void_p, c.c_char_p]
def __rmul__(self, val): return Tensor7(np.array(val) * self.data) def __rmatmul__(self, val): return np.array(val) @ self.data def __rtruediv__(self, val): return Tensor7(np.array(val) / self.data) def __rpow__(self, val): return Tensor7(np.array(val)**self.data) # ArrayOfTensor7 exec(array_base(Tensor7)) # ArrayOfArrayOfTensor7 # exec(array_base(ArrayOfTensor7)) lib.createTensor7.restype = c.c_void_p lib.createTensor7.argtypes = [] lib.deleteTensor7.restype = None lib.deleteTensor7.argtypes = [c.c_void_p] lib.printTensor7.restype = None lib.printTensor7.argtypes = [c.c_void_p] lib.xmlreadTensor7.restype = c.c_long lib.xmlreadTensor7.argtypes = [c.c_void_p, c.c_char_p]
if isinstance(other, StokesVector) and \ self.frequencies == other.frequencies and \ self.stokes == other.stokes and \ self.zeniths == other.zeniths and \ self.azimuths == other.azimuths and \ self.data == other.data: return True else: return False def __bool__(self): return self.OK and bool(self.data) # ArrayOfStokesVector exec(array_base(StokesVector)) # ArrayOfArrayOfStokesVector exec(array_base(ArrayOfStokesVector)) lib.createStokesVector.restype = c.c_void_p lib.createStokesVector.argtypes = [] lib.deleteStokesVector.restype = None lib.deleteStokesVector.argtypes = [c.c_void_p] lib.printStokesVector.restype = None lib.printStokesVector.argtypes = [c.c_void_p] lib.xmlreadStokesVector.restype = c.c_long lib.xmlreadStokesVector.argtypes = [c.c_void_p, c.c_char_p]
self.population == other.population and \ self.normalization == other.normalization and \ self.lineshapetype == other.lineshapetype and \ self.t0 == other.t0 and \ self.cutofffreq == other.cutofffreq and \ self.linemixinglimit == other.linemixinglimit and \ self.quantumidentity == other.quantumidentity and \ self.broadeningspecies == other.broadeningspecies and \ self.lines == other.lines: return True else: return False # Generate ArrayOfAbsorptionLines exec(array_base(AbsorptionLines)) # Generate ArrayOfArrayOfAbsorptionLines exec(array_base(ArrayOfAbsorptionLines)) lib.createAbsorptionLines.restype = c.c_void_p lib.createAbsorptionLines.argtypes = [] lib.deleteAbsorptionLines.restype = None lib.deleteAbsorptionLines.argtypes = [c.c_void_p] lib.printAbsorptionLines.restype = None lib.printAbsorptionLines.argtypes = [c.c_void_p] lib.xmlreadAbsorptionLines.restype = c.c_long lib.xmlreadAbsorptionLines.argtypes = [c.c_void_p, c.c_char_p]
if isinstance(other, AbsorptionSingleLine) and \ (self.f0 == other.f0 or (isnan(self.f0 and isnan(other.f0)))) and \ (self.i0 == other.i0 or (isnan(self.i0 and isnan(other.i0)))) and \ (self.e0 == other.e0 or (isnan(self.e0 and isnan(other.e0)))) and \ (self.gl == other.gl or (isnan(self.gl and isnan(other.gl)))) and \ (self.gu == other.gu or (isnan(self.gu and isnan(other.gu)))) and \ (self.a == other.a or (isnan(self.a and isnan(other.a)))) and \ self.zeeman == other.zeeman and \ self.lsm == other.lsm and \ self.localquanta == other.localquanta: return True else: return False exec(array_base(AbsorptionSingleLine)) lib.createAbsorptionSingleLine.restype = c.c_void_p lib.createAbsorptionSingleLine.argtypes = [] lib.deleteAbsorptionSingleLine.restype = None lib.deleteAbsorptionSingleLine.argtypes = [c.c_void_p] lib.printAbsorptionSingleLine.restype = None lib.printAbsorptionSingleLine.argtypes = [c.c_void_p] VoidStructGetterCAPI(lib, "AbsorptionSingleLine", "F0") VoidStructGetterCAPI(lib, "AbsorptionSingleLine", "I0") VoidStructGetterCAPI(lib, "AbsorptionSingleLine", "E0") VoidStructGetterCAPI(lib, "AbsorptionSingleLine", "glow") VoidStructGetterCAPI(lib, "AbsorptionSingleLine", "gupp")
def __eq__(self, other): return self.val == str(other) def __iadd__(self, val): self.val += str(val) return self def __add__(self, val): return String(self.val + str(val)) def __radd__(self, val): return String(str(val) + self.val) exec(array_base(Index)) exec(array_base(ArrayOfIndex)) exec(array_base(String)) exec(array_base(ArrayOfString)) lib.createIndex.restype = c.c_void_p lib.createIndex.argtypes = [] lib.deleteIndex.restype = None lib.deleteIndex.argtypes = [c.c_void_p] lib.printIndex.restype = None lib.printIndex.argtypes = [c.c_void_p]
if isinstance(other, SingleScatteringData) and \ self.ptype == other.ptype and \ self.description == other.description and \ self.f_grid == other.f_grid and \ self.T_grid == other.T_grid and \ self.za_grid == other.za_grid and \ self.aa_grid == other.aa_grid and \ self.pha_mat_data == other.pha_mat_data and \ self.ext_mat_data == other.ext_mat_data and \ self.abs_vec_data == other.abs_vec_data: return True else: return False exec(array_base(SingleScatteringData)) exec(array_base(ArrayOfSingleScatteringData)) lib.createSingleScatteringData.restype = c.c_void_p lib.createSingleScatteringData.argtypes = [] lib.deleteSingleScatteringData.restype = None lib.deleteSingleScatteringData.argtypes = [c.c_void_p] lib.printSingleScatteringData.restype = None lib.printSingleScatteringData.argtypes = [c.c_void_p] lib.xmlreadSingleScatteringData.restype = c.c_long lib.xmlreadSingleScatteringData.argtypes = [c.c_void_p, c.c_char_p]
def __rmul__(self, val): return Vector(np.array(val) * self.data) def __rmatmul__(self, val): return np.array(val) @ self.data def __rtruediv__(self, val): return Vector(np.array(val) / self.data) def __rpow__(self, val): return Vector(np.array(val) ** self.data) # ArrayOfVector exec(array_base(Vector)) # ArrayOfArrayOfVector exec(array_base(ArrayOfVector)) lib.createVector.restype = c.c_void_p lib.createVector.argtypes = [] lib.deleteVector.restype = None lib.deleteVector.argtypes = [c.c_void_p] lib.printVector.restype = None lib.printVector.argtypes = [c.c_void_p]
def __eq__(self, other): if isinstance(other, SpeciesTag) and \ self.type == other.type and \ self.spec == other.spec and \ self.isot == other.isot and \ self.cia_second == other.cia_second and \ self.cia_dataset == other.cia_dataset and \ self.lf == other.lf and \ self.uf == other.uf: return True else: return False # Generate ArrayOfSpeciesTag exec(array_base(SpeciesTag)) # Generate ArrayOfArrayOfSpeciesTag exec(array_base(ArrayOfSpeciesTag)) lib.createSpeciesTag.restype = c.c_void_p lib.createSpeciesTag.argtypes = [] lib.deleteSpeciesTag.restype = None lib.deleteSpeciesTag.argtypes = [c.c_void_p] lib.printSpeciesTag.restype = None lib.printSpeciesTag.argtypes = [c.c_void_p]
if isinstance(other, Time): return other.sec - self.sec else: return Time(self.sec - other) def todatetime(self): """ Return self as datetime """ return datetime.fromtimestamp(self.sec) def fromdatetime(self, dt: datetime): """ Sets self from datetime """ self.sec = dt.timestamp() # ArrayOfTime exec(array_base(Time)) def TimeGrid(ts): """ Return an array of datetimes from an ArrayOfTime or list of Time Helps to make calls to matplotlib look decent Example: >>> import numpy as np >>> import matplotlib.pyplot as plt >>> ts = [Time.now() + 3600*i for i in range(60*24)] # Hourly time stamps for 60 days from now >>> y = [np.sin(4*np.pi * t.sec / (3600*60*24)) for t in ts] # 2 Waves >>> plt.plot(TimeGrid(ts), y), plt.gcf().autofmt_xdate() # Formatted plots Input:
def __rmul__(self, val): return Tensor4(np.array(val) * self.data) def __rmatmul__(self, val): return np.array(val) @ self.data def __rtruediv__(self, val): return Tensor4(np.array(val) / self.data) def __rpow__(self, val): return Tensor4(np.array(val)**self.data) # ArrayOfTensor4 exec(array_base(Tensor4)) # ArrayOfArrayOfTensor4 # exec(array_base(ArrayOfTensor4)) lib.createTensor4.restype = c.c_void_p lib.createTensor4.argtypes = [] lib.deleteTensor4.restype = None lib.deleteTensor4.argtypes = [c.c_void_p] lib.printTensor4.restype = None lib.printTensor4.argtypes = [c.c_void_p] lib.xmlreadTensor4.restype = c.c_long lib.xmlreadTensor4.argtypes = [c.c_void_p, c.c_char_p]
if isinstance( other, GridPos) and self.idx == other.idx and self.fd == other.fd: return True else: return False @property def OK(self): return bool(self) def __bool__(self): return self.idx >= 0 exec(array_base(GridPos)) lib.createGridPos.restype = c.c_void_p lib.createGridPos.argtypes = [] lib.deleteGridPos.restype = None lib.deleteGridPos.argtypes = [c.c_void_p] lib.printGridPos.restype = None lib.printGridPos.argtypes = [c.c_void_p] lib.xmlreadGridPos.restype = c.c_long lib.xmlreadGridPos.argtypes = [c.c_void_p, c.c_char_p] lib.xmlsaveGridPos.restype = c.c_long lib.xmlsaveGridPos.argtypes = [c.c_void_p, c.c_char_p, c.c_long, c.c_long]
if isinstance(other, PropagationMatrix) and \ self.frequencies == other.frequencies and \ self.stokes == other.stokes and \ self.zeniths == other.zeniths and \ self.azimuths == other.azimuths and \ self.data == other.data: return True else: return False def __bool__(self): return self.OK and bool(self.data) # ArrayOfPropagationMatrix exec(array_base(PropagationMatrix)) # ArrayOfArrayOfPropagationMatrix exec(array_base(ArrayOfPropagationMatrix)) lib.createPropagationMatrix.restype = c.c_void_p lib.createPropagationMatrix.argtypes = [] lib.deletePropagationMatrix.restype = None lib.deletePropagationMatrix.argtypes = [c.c_void_p] lib.printPropagationMatrix.restype = None lib.printPropagationMatrix.argtypes = [c.c_void_p] lib.xmlreadPropagationMatrix.restype = c.c_long lib.xmlreadPropagationMatrix.argtypes = [c.c_void_p, c.c_char_p]
def __rmul__(self, val): return Tensor6(np.array(val) * self.data) def __rmatmul__(self, val): return np.array(val) @ self.data def __rtruediv__(self, val): return Tensor6(np.array(val) / self.data) def __rpow__(self, val): return Tensor6(np.array(val) ** self.data) # ArrayOfTensor6 exec(array_base(Tensor6)) # ArrayOfArrayOfTensor6 exec(array_base(ArrayOfTensor6)) lib.createTensor6.restype = c.c_void_p lib.createTensor6.argtypes = [] lib.deleteTensor6.restype = None lib.deleteTensor6.argtypes = [c.c_void_p] lib.printTensor6.restype = None lib.printTensor6.argtypes = [c.c_void_p]
def __eq__(self, other): if isinstance(other, ScatteringMetaData) and \ self.description == other.description and \ self.source == other.source and \ self.refr_index == other.refr_index and \ self.mass == other.mass and \ self.diameter_max == other.diameter_max and \ self.diameter_volume_equ == other.diameter_volume_equ and \ self.diameter_area_equ_aerodynamical == other.diameter_area_equ_aerodynamical: return True else: return False exec(array_base(ScatteringMetaData)) exec(array_base(ArrayOfScatteringMetaData)) lib.createScatteringMetaData.restype = c.c_void_p lib.createScatteringMetaData.argtypes = [] lib.deleteScatteringMetaData.restype = None lib.deleteScatteringMetaData.argtypes = [c.c_void_p] lib.printScatteringMetaData.restype = None lib.printScatteringMetaData.argtypes = [c.c_void_p] lib.xmlreadScatteringMetaData.restype = c.c_long lib.xmlreadScatteringMetaData.argtypes = [c.c_void_p, c.c_char_p]
Input: file: Filename to writable file (str) type: Filetype (str) clobber: Allow clobbering files? (any boolean) """ if lib.xmlsaveAgenda(self.__data__, *correct_save_arguments(file, type, clobber)): raise OSError("Cannot save {}".format(file)) exec(array_base(Agenda)) lib.createAgenda.restype = c.c_void_p lib.createAgenda.argtypes = [] lib.deleteAgenda.restype = None lib.deleteAgenda.argtypes = [c.c_void_p] lib.printAgenda.restype = None lib.printAgenda.argtypes = [c.c_void_p] lib.xmlreadAgenda.restype = c.c_long lib.xmlreadAgenda.argtypes = [c.c_void_p, c.c_char_p] lib.xmlsaveAgenda.restype = c.c_long lib.xmlsaveAgenda.argtypes = [c.c_void_p, c.c_char_p, c.c_long, c.c_long]
def __eq__(self, other): if isinstance(other, GriddedField3) and \ self.fieldname == other.fieldname and \ self.gridnames == other.gridnames and \ self.grids == other.grids and \ self.data == other.data: return True else: return False def __bool__(self): return bool(self.data) exec(array_base(GriddedField3)) exec(array_base(ArrayOfGriddedField3)) lib.createGriddedField3.restype = c.c_void_p lib.createGriddedField3.argtypes = [] lib.deleteGriddedField3.restype = None lib.deleteGriddedField3.argtypes = [c.c_void_p] lib.printGriddedField3.restype = None lib.printGriddedField3.argtypes = [c.c_void_p] lib.xmlreadGriddedField3.restype = c.c_long lib.xmlreadGriddedField3.argtypes = [c.c_void_p, c.c_char_p]
lib.printSpecies.argtypes = [c.c_void_p] lib.getSpeciesShortName.restype = c.c_void_p lib.getSpeciesShortName.argtypes = [c.c_void_p] lib.setSpeciesShortName.restype = c.c_int lib.setSpeciesShortName.argtypes = [c.c_void_p, c.c_void_p] lib.getSpeciesLongName.restype = c.c_void_p lib.getSpeciesLongName.argtypes = [c.c_void_p] lib.setSpeciesLongName.restype = c.c_int lib.setSpeciesLongName.argtypes = [c.c_void_p, c.c_void_p] # Generate ArrayOfSpecies exec(array_base(Species)) class SpeciesIsotopeRecord: """ ARTS isotopologues Properties: spec: Species species (const Species) isotname: Species isotopologue (const String) mass: Mass of isotope (const Numeric) Requires that spec_ind >= 0
""" if lib.xmlsaveRadiationVector( self.__data__, *correct_save_arguments(file, type, clobber)): raise OSError("Cannot save {}".format(file)) def __eq__(self, other): if isinstance(other, Sized) and len(other) == len(self): for i in range(len(self)): if (self[i] != other[i]).any(): return False return True else: return False exec(array_base(RadiationVector)) exec(array_base(ArrayOfRadiationVector)) lib.createRadiationVector.restype = c.c_void_p lib.createRadiationVector.argtypes = [] lib.deleteRadiationVector.restype = None lib.deleteRadiationVector.argtypes = [c.c_void_p] lib.printRadiationVector.restype = None lib.printRadiationVector.argtypes = [c.c_void_p] lib.xmlreadRadiationVector.restype = c.c_long lib.xmlreadRadiationVector.argtypes = [c.c_void_p, c.c_char_p]