Пример #1
0
 def __eq__(self, o):
     if isinstance(o, QuantumIdentifier):
         return Index(
             c.c_void_p(
                 lib.getisotopologue_indexQuantumIdentifier(
                     self.__data__))) == Index(
                         c.c_void_p(
                             lib.getisotopologue_indexQuantumIdentifier(
                                 o.__data__))) and self.val == o.val
     else:
         return self == QuantumIdentifier(o)
Пример #2
0
 def set(self, o):
     if isinstance(o, QuantumIdentifier):
         Index(
             c.c_void_p(
                 lib.getisotopologue_indexQuantumIdentifier(
                     self.__data__))).set(
                         Index(
                             c.c_void_p(
                                 lib.getisotopologue_indexQuantumIdentifier(
                                     o.__data__))))
         self.val = o.val
     else:
         self.set(QuantumIdentifier(o))
Пример #3
0
 def isot(self, o):
     if isinstance(o, int) or isinstance(o, Index):
         Index(
             c.c_void_p(
                 lib.getisotopologue_indexQuantumIdentifier(
                     self.__data__))).set(
                         SpeciesIsotopeRecord.from_index(o).index)
     else:
         Index(
             c.c_void_p(
                 lib.getisotopologue_indexQuantumIdentifier(
                     self.__data__))).set(
                         SpeciesIsotopeRecord(str(o)).index)
Пример #4
0
 def localquantumnumbers(self):
     """ Local quantum numbers (list of Index) """
     n = self.sizelocalquantumnumbers
     x = []
     for i in range(n):
         x.append(
             Index(
                 c.c_void_p(
                     lib.getelemLocalQuantaAbsorptionLines(
                         i, self.__data__))))
     return x
Пример #5
0
 def isot(self):
     return SpeciesIsotopeRecord.from_index(
         Index(
             c.c_void_p(
                 lib.getisotopologue_indexQuantumIdentifier(
                     self.__data__))))
Пример #6
0
 def np(self):
     """ Number of points describing the ppath (Index) """
     return Index(c.c_void_p(lib.getnpPpath(self.__data__)))
Пример #7
0
 def nchan(self):
     """ Number of channels in the Atlas (Index) """
     return Index(c.c_void_p(lib.getChannelCountTelsemAtlas(self.__data__)))
Пример #8
0
 def idx(self):
     """ Index of position below point (Index) """
     return Index(c.c_void_p(lib.getidxGridPos(self.__data__)))
Пример #9
0
 def pos(self):
     """ Index of position below point (ArrayOfIndex) """
     return Index(c.c_void_p(lib.getposLagrangeInterpolation(
         self.__data__)))
Пример #10
0
 def spec_ind(self):
     return Index(c.c_void_p(lib.getspec_indQuantumIdentifier(self.__data__)))
Пример #11
0
 def cia_dataset_index(self):
     return Index(c.c_void_p(lib.getcia_dataset_indexSpeciesTag(self.__data__)))
Пример #12
0
 def spec_ind(self):
     return Index(c.c_void_p(lib.getspec_indSpeciesTag(self.__data__)))
Пример #13
0
 def month(self):
     """ Month of the Atlas (Index) """
     return Index(c.c_void_p(lib.getMonthTelsemAtlas(self.__data__)))
Пример #14
0
 def nb_outputs(self):
     """ (Index) """
     return Index(c.c_void_p(lib.getnb_outputsTessemNN(self.__data__)))
Пример #15
0
s.val = "Hej"
assert s == "Hej", "Bad write"
s.set(String("Help"))
assert s == "Help", "Bad write"

i.val = 3
assert i == 3, "Bad write"
i.set(5)
assert i == 5, "Bad write"

n.val = 3.5
assert n == 3.5, "Bad write"
n.set(3.14)
assert n == 3.14, "Bad write"

s2 = String(0)
s.savexml("tmp.s.xml", "binary")
s2.readxml("tmp.s.xml")
assert s == s2

i2 = Index(0)
i.savexml("tmp.i.xml", "binary")
i2.readxml("tmp.i.xml")
assert i == i2

n2 = Numeric(0)
n.savexml("tmp.n.xml", "binary")
n2.readxml("tmp.n.xml")
assert n == n2
Пример #16
0
 def nb_cache(self):
     """ (Index) """
     return Index(c.c_void_p(lib.getnb_cacheTessemNN(self.__data__)))
Пример #17
0
 def dim(self):
     """ Atmospheric dimensionality (Index) """
     return Index(c.c_void_p(lib.getdimPpath(self.__data__)))
Пример #18
0
 def analytical(self):
     """ (Index) """
     return Index(
         c.c_void_p(lib.getAnalyticalRetrievalQuantity(self.__data__)))
Пример #19
0
 def ndat(self):
     """ Number of lines in the Atlas (Index) """
     return Index(c.c_void_p(lib.getDataCountTelsemAtlas(self.__data__)))