ARTS  2.3.1285(git:92a29ea9-dirty)
m_linerecord.cc
Go to the documentation of this file.
1 /* Copyright (C) 2015
2  Richard Larsson <ric.larsson@gmail.com>
3 
4 
5  This program is free software; you can redistribute it and/or modify it
6  under the terms of the GNU General Public License as published by the
7  Free Software Foundation; either version 2, or (at your option) any
8  later version.
9 
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
20  USA. */
21 
30 #include "absorption.h"
31 #include "auto_md.h"
32 #include "sorting.h"
33 
34 /* Workspace method: Doxygen documentation will be auto-generated */
36  const Numeric& freqeuncy_shift,
37  const Verbosity&) {
38  for (auto& line: abs_lines)
39  line.setF(line.F() + freqeuncy_shift);
40 }
41 
42 /* Workspace method: Doxygen documentation will be auto-generated */
44  ArrayOfArrayOfLineRecord& abs_lines_per_species,
45  const Numeric& freqeuncy_shift,
46  const Verbosity& verbosity) {
47  for (auto& abs_lines: abs_lines_per_species)
48  abs_linesShiftFrequency(abs_lines, freqeuncy_shift, verbosity);
49 }
50 
51 /* Workspace method: Doxygen documentation will be auto-generated */
53  ArrayOfLineRecord& abs_lines,
54  const Numeric& relative_line_strength_shift,
55  const Verbosity&) {
56  const auto r = 1.0 + relative_line_strength_shift;
57  for (auto& line: abs_lines)
58  line.setI0(line.I0() * r);
59 }
60 
61 /* Workspace method: Doxygen documentation will be auto-generated */
63  ArrayOfArrayOfLineRecord& abs_lines_per_species,
64  const Numeric& relative_line_strength_shift,
65  const Verbosity& verbosity) {
66  for(auto& abs_lines: abs_lines_per_species)
67  abs_linesRelativeLineStrengthShift(abs_lines, relative_line_strength_shift, verbosity);
68 }
69 
70 /* Workspace method: Doxygen documentation will be auto-generated */
72  const ArrayOfLineRecord& replacement_lines,
73  const Verbosity&) {
74  for (const auto& rline : replacement_lines) {
75  auto n = 0; // Counter for finds, API says a find must be unique
76 
77  for (auto& line : abs_lines) {
78  if (line.QuantumIdentity() == rline.QuantumIdentity()) {
79  line = rline;
80  n++;
81  }
82  }
83 
84  if (n > 1) {
86  os << "\"" << rline.QuantumIdentity()
87  << "\" is not a unique identifier wrt input catalog\n";
88  throw std::runtime_error(os.str());
89  }
90  }
91 }
92 
93 /* Workspace method: Doxygen documentation will be auto-generated */
95  ArrayOfLineRecord& abs_lines,
96  const ArrayOfLineRecord& replacement_lines,
97  const String& parameter_name,
98  const Verbosity&) {
99  Index parameter_switch = -1;
100 
101  if (parameter_name.nelem() == 0)
102  throw std::runtime_error("parameter_name is empty.\n");
103 
104  if (replacement_lines.nelem() == 0)
105  throw std::runtime_error("replacement_lines is empty.\n");
106 
107  if (parameter_name == "Central Frequency")
108  parameter_switch = 0;
109  else if (parameter_name == "Line Strength")
110  parameter_switch = 1;
111  else if (parameter_name == "Line Shape Model")
112  parameter_switch = 2;
113  else if (parameter_name == "Lower State Energy")
114  parameter_switch = 4;
115 
116  for (const auto& rline : replacement_lines) {
117  auto n = 0; // Counter for finds, API says a find must be unique
118 
119  for (auto& line : abs_lines) {
120  if (line.QuantumIdentity() == rline.QuantumIdentity()) {
121  n++;
122 
123  switch (parameter_switch) {
124  case 0: //"Central Frequency":
125  line.setF(rline.F());
126  break;
127  case 1: //"Line Strength":
128  line.setI0(rline.I0());
129  break;
130  case 2: //"Shape data":
131  line.SetLineShapeModel(rline.GetLineShapeModel());
132  break;
133  case 4: //"Lower State Energy":
134  line.SetElow(rline.Elow());
135  break;
136  default: {
137  ostringstream os;
138  os << "Unsupported paramter_name\n"
139  << parameter_name
140  << "\nSee method description for supported parameter names.\n";
141  throw std::runtime_error(os.str());
142  break;
143  }
144  }
145  }
146  }
147  }
148 }
149 
150 /* Workspace method: Doxygen documentation will be auto-generated */
152  const QuantumIdentifier& QI,
153  const String& parameter_name,
154  const Numeric& change,
155  const Index& relative,
156  const Index& loose_matching,
157  const Verbosity&) {
158  Index parameter_switch = -1;
159 
160  if (parameter_name.nelem() == 0)
161  throw std::runtime_error("parameter_name is empty.\n");
162  else if (parameter_name == "Central Frequency" or
163  parameter_name == "Line Center")
164  parameter_switch = 0;
165  else if (parameter_name == "Line Strength")
166  parameter_switch = 1;
167  else if (parameter_name == "Lower State Energy")
168  parameter_switch = 4;
169 
170  for (auto& line : abs_lines) {
171  if (loose_matching ? QI.In(line.QuantumIdentity())
172  : line.QuantumIdentity() == QI) {
173  switch (parameter_switch) {
174  case 0: //"Central Frequency":
175  if (relative == 0)
176  line.setF(line.F() + change);
177  else
178  line.setF(line.F() * (1.0e0 + change));
179  break;
180  case 1: //"Line Strength":
181  if (relative == 0)
182  line.setI0(line.I0() + change);
183  else
184  line.setI0(line.I0() * (1.0e0 + change));
185  break;
186  case 4: //"Lower State Energy":
187  if (relative == 0)
188  line.SetElow(line.Elow() + change);
189  else
190  line.SetElow(line.Elow() * (1.0e0 + change));
191  break;
192  default: {
193  ostringstream os;
194  os << "Usupported paramter_name\n"
195  << parameter_name
196  << "\nSee method description for supported parameter names.\n";
197  throw std::runtime_error(os.str());
198  break;
199  }
200  }
201  }
202  }
203 }
204 
205 /* Workspace method: Doxygen documentation will be auto-generated */
207  const QuantumIdentifier& QI,
208  const String& parameter_name,
209  const Numeric& new_value,
210  const Index& loose_matching,
211  const Verbosity&) {
212  Index parameter_switch = -1;
213 
214  if (parameter_name.nelem() == 0)
215  throw std::runtime_error("parameter_name is empty.\n");
216  else if (parameter_name == "Central Frequency" or
217  parameter_name == "Line Center")
218  parameter_switch = 0;
219  else if (parameter_name == "Line Strength")
220  parameter_switch = 1;
221  else if (parameter_name == "Lower State Energy")
222  parameter_switch = 4;
223 
224  for (auto& line : abs_lines) {
225  if (loose_matching ? QI.In(line.QuantumIdentity())
226  : line.QuantumIdentity() == QI) {
227  switch (parameter_switch) {
228  case 0: //"Central Frequency":
229  line.setF(new_value);
230  break;
231  case 1: //"Line Strength":
232  line.setI0(new_value);
233  break;
234  case 4: //"Lower State Energy":
235  line.SetElow(new_value);
236  break;
237  default: {
238  ostringstream os;
239  os << "Usupported paramter_name\n"
240  << parameter_name
241  << "\nSee method description for supported parameter names.\n";
242  throw std::runtime_error(os.str());
243  break;
244  }
245  }
246  }
247  }
248 }
249 
250 /* Workspace method: Doxygen documentation will be auto-generated */
252  ArrayOfLineRecord& abs_lines,
253  const QuantumIdentifier& QI,
254  const String& parameter,
255  const String& coefficient,
256  const String& species,
257  const Numeric& new_value,
258  const Verbosity&) {
259  bool any = false;
260  for (auto& lr : abs_lines) {
261  if (QI.In(lr.QuantumIdentity())) {
262  lr.SetLineShapeModelParameter(new_value, species, parameter, coefficient);
263  if (not any) any = true;
264  }
265  }
266 
267  if (not any)
268  throw std::runtime_error(
269  "You have no matches. This is not accepted as a valid use case. (Is your matching information correct?)\n");
270 }
271 
272 /* Workspace method: Doxygen documentation will be auto-generated */
274  ArrayOfLineRecord& abs_lines,
275  const QuantumIdentifier& QI,
276  const String& parameter,
277  const String& coefficient,
278  const String& species,
279  const Numeric& change,
280  const Index& relative,
281  const Verbosity&) {
282  bool any = false;
283  for (auto& lr : abs_lines) {
284  if (QI.In(lr.QuantumIdentity())) {
285  auto x = lr.GetLineShapeModelParameters(species, parameter);
286  auto& old = LineShape::SingleModelParameter(x, coefficient);
287  if (relative)
288  lr.SetLineShapeModelParameter(
289  old * (1 + change), species, parameter, coefficient);
290  else
291  lr.SetLineShapeModelParameter(
292  old + change, species, parameter, coefficient);
293  if (not any) any = true;
294  }
295  }
296 
297  if (not any) {
299  os << "You have no matches. This is not accepted as a valid use case. (Is your matching information correct?)\n";
300  os << "MATCHING INFORMATION:\t" << QI << '\n';
301  throw std::runtime_error(os.str());
302  }
303 }
304 
305 /* Workspace method: Doxygen documentation will be auto-generated */
307  Index& nlte_do,
308  ArrayOfArrayOfLineRecord& abs_lines_per_species,
309  const ArrayOfQuantumIdentifier& nlte_quantum_identifiers,
310  const ArrayOfArrayOfSpeciesTag& abs_species,
311  const Vector& vibrational_energies,
312  const String& population_type,
313  const Verbosity&) {
314  nlte_do = 1;
315 
316  const bool do_ev = vibrational_energies.nelem();
317 
318  if (do_ev) {
319  if (vibrational_energies.nelem() != nlte_quantum_identifiers.nelem()) {
320  ostringstream os;
321  os << "Your vibrational energy levels vector is not the same size as\n"
322  << "your *nlte_quantum_identifiers* array. These must be the same\n"
323  << "size and the content should match.\n";
324  throw std::runtime_error(os.str());
325  }
326  }
327 
328  const LinePopulationType poptyp =
329  LinePopulationTypeFromString(population_type);
330 
331  // All energies must be positive
332  for (Index ii = 0; ii < vibrational_energies.nelem(); ii++) {
333  if (vibrational_energies[ii] < 0) {
334  ostringstream os;
335  os << "Some of your vibrational energy levels are negative. They should be positive.\n"
336  << "Your vibrational levels are:\n"
337  << vibrational_energies;
338  throw std::runtime_error(os.str());
339  }
340  }
341 
342  for (Index qi = 0; qi < nlte_quantum_identifiers.nelem(); qi++) {
343  auto& id = nlte_quantum_identifiers[qi];
344  for (Index s = 0; s < abs_lines_per_species.nelem(); s++) {
345  if (abs_species[s][0].Species() !=
346  nlte_quantum_identifiers[qi].Species()) {
347  continue;
348  }
349 
350  ArrayOfLineRecord& species_lines = abs_lines_per_species[s];
351  for (Index i = 0; i < species_lines.nelem(); i++) {
352  LineRecord& lr = species_lines[i];
353  if (lr.QuantumIdentity().UpperQuantumId().In(id)) {
354  if (lr.NLTEUpperIndex() not_eq -1) {
355  ostringstream os;
356  os << "The linerecord:\n"
357  << lr << "\nhad the energy state level of "
358  << "this quantum identifier:\n"
359  << nlte_quantum_identifiers[qi]
360  << "\nset twice by the input quantum identifiers. All levels must "
361  << "point at a unique state. " << qi;
362  throw std::runtime_error(os.str());
363  }
364 
365  lr.SetNLTEUpperIndex(qi);
366  if (do_ev) lr.SetEvupp(vibrational_energies[qi]);
367  lr.SetLinePopulationType(poptyp);
368  }
369 
370  if (lr.QuantumIdentity().LowerQuantumId().In(id)) {
371  if (lr.NLTELowerIndex() not_eq -1) {
372  ostringstream os;
373  os << "The linerecord:\n"
374  << lr << "\nhad the energy state level of "
375  << "this quantum identifier:\n"
376  << nlte_quantum_identifiers[qi]
377  << "\nset twice by the input quantum identifiers. All levels must "
378  << "point at a unique state. " << qi;
379  throw std::runtime_error(os.str());
380  }
381 
382  lr.SetNLTELowerIndex(qi);
383  if (do_ev) lr.SetEvlow(vibrational_energies[qi]);
384  lr.SetLinePopulationType(poptyp);
385  }
386  }
387  }
388  }
389 }
390 
391 /* Workspace method: Doxygen documentation will be auto-generated */
393  const ArrayOfLineRecord& abs_lines,
394  const Numeric& half_width,
395  const Index& nr_f_per_line,
396  const Index& line_nr,
397  const Verbosity& verbosity) {
398  CREATE_OUT2;
399 
400  const Index lines = abs_lines.nelem();
401 
402  if (line_nr < 0)
403  f_grid.resize(lines * nr_f_per_line);
404  else
405  f_grid.resize(nr_f_per_line);
406 
407  out2 << " Creating f_grid vector of length " << f_grid.nelem();
408 
409  if (lines == 0)
410  throw std::runtime_error("You need at least one line to run this code.\n");
411  if (line_nr >= lines)
412  throw std::runtime_error(
413  "You specified a line number that is outside the range of abs_lines.\n");
414  if (nr_f_per_line < 1)
415  throw std::runtime_error(
416  "You need more than 0 frequencies per line to execute this function.\n");
417 
418  // Helper variable to ensure that there are no overlaps
419  Numeric f_max = 0.0;
420 
421  if (line_nr >= 0) // there is a line, then set frequency for a single line
422  {
423  if ((abs_lines[line_nr].F() - half_width) < f_max)
424  throw std::runtime_error(
425  "Frequencies below 0 Hz are not supported by this function.\n");
426  VectorNLinSpace(f_grid,
427  nr_f_per_line,
428  abs_lines[line_nr].F() - half_width,
429  abs_lines[line_nr].F() + half_width,
430  verbosity);
431  } else // if there are many lines, then set frequency from the many lines
432  {
433  Vector tmp;
434  for (Index ii = 0; ii < lines; ii++) {
435  if ((abs_lines[ii].F() - half_width) < f_max)
436  throw std::runtime_error(
437  "Frequency overlaps are not supported by this function.\n");
438  else
439  f_max = abs_lines[ii].F() + half_width;
440  VectorNLinSpace(tmp,
441  nr_f_per_line,
442  abs_lines[ii].F() - half_width,
443  abs_lines[ii].F() + half_width,
444  verbosity);
445  f_grid[Range(ii * nr_f_per_line, nr_f_per_line)] = tmp;
446  }
447  }
448 }
449 
450 /* Workspace method: Doxygen documentation will be auto-generated */
452  Vector& f_grid,
453  const ArrayOfArrayOfLineRecord& abs_lines_per_species,
454  const ArrayOfArrayOfSpeciesTag& abs_species,
455  const Numeric& half_width,
456  const Index& nr_f_per_line,
457  const String& species_tag,
458  const Verbosity& verbosity) {
459  CREATE_OUT2;
460 
461  if (species_tag == "")
462  throw std::runtime_error("You need at least one tag in this code.\n");
463 
465  array_species_tag_from_string(st, species_tag);
466 
467  for (Index ii = 0; ii < abs_species.nelem(); ii++) {
468  bool test = false;
469  if (abs_species[ii].nelem() == st.nelem()) {
470  for (Index jj = 0; jj < st.nelem(); jj++) {
471  if (st[jj] == abs_species[ii][jj])
472  test = true;
473  else {
474  test = false;
475  break;
476  }
477  }
478  if (test) {
479  f_gridFromabs_linesSet(f_grid,
480  abs_lines_per_species[ii],
481  half_width,
482  nr_f_per_line,
483  -1,
484  verbosity);
485  return;
486  }
487  }
488  }
489 
490  throw std::runtime_error("No frequency set for the given species_tag.\n");
491 }
492 
494  const Index& where,
495  const String& quantum_number_name,
496  const Rational& quantum_number_value,
497  const Verbosity& verbosity) {
498  CREATE_OUT3;
499  const bool for_lower = where < 1;
500  const bool for_upper = where > -1;
501  for (auto& line : abs_lines) {
502  if (for_lower)
503  line.SetQuantumNumberLower(quantum_number_name, quantum_number_value);
504  if (for_upper)
505  line.SetQuantumNumberUpper(quantum_number_name, quantum_number_value);
506  }
507 
508  out3 << "Set " << quantum_number_name << " to " << quantum_number_value
509  << " at "
510  << ((for_lower and for_upper)
511  ? "both levels"
512  : for_lower ? "the lower level" : "the upper level")
513  << " of all " << abs_lines.nelem() << " line(s)\n";
514 }
515 
517  const String& option,
518  const Verbosity&) {
520  if (option == "VVH")
522  else if (option == "VVW")
524  else if (option == "RosenkranzQuadratic")
526  else if (option == "None")
528  else
529  throw std::runtime_error(
530  "Cannot understand normalization type option, see builtin documentation for details");
531 
532  for (LineRecord& line : abs_lines) line.SetLineNormalizationType(a);
533 }
534 
536  const String& option,
537  const Verbosity&) {
538  MirroringType a;
539  if (option == "Lorentz")
541  else if (option == "SameAsLineShape")
543  else if (option == "None")
545  else
546  throw std::runtime_error(
547  "Cannot understand mirroring type option, see builtin documentation for details");
548 
549  for (LineRecord& line : abs_lines) line.SetMirroringType(a);
550 }
551 
553  const Numeric& option,
554  const Verbosity&) {
555  if (option < 0 and option not_eq -1)
556  throw std::runtime_error("Cannot cutoff frequency");
557 
558  for (LineRecord& line : abs_lines) line.SetCutOff(option);
559 }
560 
562  for (LineRecord& line : abs_lines)
563  line.SetLinePopulationType(LinePopulationType::ByLTE);
564 }
565 
567  ArrayOfArrayOfLineRecord& abs_lines_per_species,
568  const Verbosity& verbosity) {
569  for (auto& abs_lines : abs_lines_per_species)
570  abs_linesSetNlteOffForAll(abs_lines, verbosity);
571 }
572 
574  ArrayOfArrayOfLineRecord& abs_lines_per_species,
575  const String& option,
576  const Verbosity& verbosity) {
577  for (auto& abs_lines : abs_lines_per_species)
578  abs_linesSetNormalizationForAll(abs_lines, option, verbosity);
579 }
580 
582  ArrayOfArrayOfLineRecord& abs_lines_per_species,
583  const String& option,
584  const Verbosity& verbosity) {
585  for (auto& abs_lines : abs_lines_per_species)
586  abs_linesSetMirroringForAll(abs_lines, option, verbosity);
587 }
588 
590  ArrayOfArrayOfLineRecord& abs_lines_per_species,
591  const Numeric& option,
592  const Verbosity& verbosity) {
593  for (auto& abs_lines : abs_lines_per_species)
594  abs_linesCutOffForAll(abs_lines, option, verbosity);
595 }
596 
598  ArrayOfLineRecord& abs_lines,
599  const ArrayOfArrayOfLineRecord& abs_lines_per_species,
600  const Verbosity&) {
601  abs_lines.resize(0);
602  for (const auto& lines : abs_lines_per_species)
603  for (const auto& line : lines) abs_lines.push_back(line);
604 }
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
void abs_lines_per_speciesSetNlteOffForAll(ArrayOfArrayOfLineRecord &abs_lines_per_species, const Verbosity &verbosity)
const QuantumIdentifier & QuantumIdentity() const
Quantum identifier.
Definition: linerecord.h:475
void f_gridFromabs_linesSet(Vector &f_grid, const ArrayOfLineRecord &abs_lines, const Numeric &half_width, const Index &nr_f_per_line, const Index &line_nr, const Verbosity &verbosity)
MirroringType
Spectral line catalog data.
Definition: linerecord.h:201
void abs_linesRelativeLineStrengthShift(ArrayOfLineRecord &abs_lines, const Numeric &relative_line_strength_shift, const Verbosity &)
Definition: m_linerecord.cc:52
void abs_linesSetLineShapeModelParameterForMatchingLines(ArrayOfLineRecord &abs_lines, const QuantumIdentifier &QI, const String &parameter, const String &coefficient, const String &species, const Numeric &new_value, const Verbosity &)
void abs_linesChangeLineShapeModelParameterForMatchingLines(ArrayOfLineRecord &abs_lines, const QuantumIdentifier &QI, const String &parameter, const String &coefficient, const String &species, const Numeric &change, const Index &relative, const Verbosity &)
Index nelem() const
Number of elements.
Definition: array.h:195
QuantumIdentifier::QType Index LowerQuantumNumbers Species
void f_gridFromabs_lines_per_speciesSetFromSpeciesTag(Vector &f_grid, const ArrayOfArrayOfLineRecord &abs_lines_per_species, const ArrayOfArrayOfSpeciesTag &abs_species, const Numeric &half_width, const Index &nr_f_per_line, const String &species_tag, const Verbosity &verbosity)
void abs_linesCutOffForAll(ArrayOfLineRecord &abs_lines, const Numeric &option, const Verbosity &)
constexpr QuantumIdentifier UpperQuantumId() const noexcept
Return a quantum identifer as if it wants to match to upper energy level.
Definition: quantum.h:577
LineNormalizationType
Definition: linerecord.h:210
The Vector class.
Definition: matpackI.h:860
void VectorNLinSpace(Vector &x, const Index &n, const Numeric &start, const Numeric &stop, const Verbosity &verbosity)
WORKSPACE METHOD: VectorNLinSpace.
void SetNLTEUpperIndex(Index nlte_upper_index)
Definition: linerecord.h:393
void abs_linesSetMirroringForAll(ArrayOfLineRecord &abs_lines, const String &option, const Verbosity &)
The range class.
Definition: matpackI.h:160
LinePopulationType LinePopulationTypeFromString(const String &in)
Definition: linerecord.cc:2848
Numeric & SingleModelParameter(ModelParameters &mp, const String &type)
Get a coefficient from ModelParameters by name.
void SetEvupp(Numeric evupp)
Definition: linerecord.h:391
void abs_lines_per_speciesSetNormalizationForAll(ArrayOfArrayOfLineRecord &abs_lines_per_species, const String &option, const Verbosity &verbosity)
void abs_lines_per_speciesShiftFrequency(ArrayOfArrayOfLineRecord &abs_lines_per_species, const Numeric &freqeuncy_shift, const Verbosity &verbosity)
Definition: m_linerecord.cc:43
Index nelem() const
Returns the number of elements.
Definition: matpackI.cc:51
void abs_linesSetQuantumNumberForAll(ArrayOfLineRecord &abs_lines, const Index &where, const String &quantum_number_name, const Rational &quantum_number_value, const Verbosity &verbosity)
Contains sorting routines.
void nlteSetByQuantumIdentifiers(Index &nlte_do, ArrayOfArrayOfLineRecord &abs_lines_per_species, const ArrayOfQuantumIdentifier &nlte_quantum_identifiers, const ArrayOfArrayOfSpeciesTag &abs_species, const Vector &vibrational_energies, const String &population_type, const Verbosity &)
void abs_linesReplaceParameterWithLinesParameter(ArrayOfLineRecord &abs_lines, const ArrayOfLineRecord &replacement_lines, const String &parameter_name, const Verbosity &)
Definition: m_linerecord.cc:94
void abs_linesShiftFrequency(ArrayOfLineRecord &abs_lines, const Numeric &freqeuncy_shift, const Verbosity &)
Definition: m_linerecord.cc:35
void abs_linesReplaceWithLines(ArrayOfLineRecord &abs_lines, const ArrayOfLineRecord &replacement_lines, const Verbosity &)
Definition: m_linerecord.cc:71
_CS_string_type str() const
Definition: sstream.h:491
void SetNLTELowerIndex(Index nlte_lower_index)
Definition: linerecord.h:385
void abs_lines_per_speciesRelativeLineStrengthShift(ArrayOfArrayOfLineRecord &abs_lines_per_species, const Numeric &relative_line_strength_shift, const Verbosity &verbosity)
Definition: m_linerecord.cc:62
Implements rational numbers to work with other ARTS types.
Definition: rational.h:54
void SetEvlow(Numeric evlow)
Definition: linerecord.h:383
void abs_linesSetNlteOffForAll(ArrayOfLineRecord &abs_lines, const Verbosity &)
void abs_linesFromSplitLines(ArrayOfLineRecord &abs_lines, const ArrayOfArrayOfLineRecord &abs_lines_per_species, const Verbosity &)
Class to identify and match lines by their quantum numbers.
Definition: quantum.h:390
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
constexpr QuantumIdentifier LowerQuantumId() const noexcept
Return a quantum identifer as if it wants to match to lower energy level.
Definition: quantum.h:582
Index nelem() const
Number of elements.
Definition: mystring.h:246
Declarations required for the calculation of absorption coefficients.
void abs_linesSetBaseParameterForMatchingLines(ArrayOfLineRecord &abs_lines, const QuantumIdentifier &QI, const String &parameter_name, const Numeric &new_value, const Index &loose_matching, const Verbosity &)
void abs_linesChangeBaseParameterForMatchingLines(ArrayOfLineRecord &abs_lines, const QuantumIdentifier &QI, const String &parameter_name, const Numeric &change, const Index &relative, const Index &loose_matching, const Verbosity &)
basic_ostringstream< char, string_char_traits< char >, alloc > ostringstream
Definition: sstream.h:204
This can be used to make arrays out of anything.
Definition: array.h:40
LinePopulationType
Definition: linerecord.h:220
void SetLinePopulationType(const LinePopulationType in)
Definition: linerecord.h:805
void abs_linesSetNormalizationForAll(ArrayOfLineRecord &abs_lines, const String &option, const Verbosity &)
void resize(Index n)
Resize function.
Definition: matpackI.cc:404
Index nelem(const Lines &l)
Number of lines.
Index NLTEUpperIndex() const
Definition: linerecord.h:392
#define CREATE_OUT3
Definition: messages.h:207
Index NLTELowerIndex() const
Definition: linerecord.h:384
void abs_lines_per_speciesSetMirroringForAll(ArrayOfArrayOfLineRecord &abs_lines_per_species, const String &option, const Verbosity &verbosity)
void abs_lines_per_speciesCutOffForAll(ArrayOfArrayOfLineRecord &abs_lines_per_species, const Numeric &option, const Verbosity &verbosity)
#define CREATE_OUT2
Definition: messages.h:206
void array_species_tag_from_string(ArrayOfSpeciesTag &tags, const String &names)
Converts a String to ArrayOfSpeciesTag.
bool In(const QuantumIdentifier &other) const
Return if this is in other.
Definition: quantum.cc:117