62 String typestr, subtypestr;
101 "Bad input: ", typestr,
" or ", subtypestr,
'\n',
"\tCannot be interpreted as a type or substype...\n")
120 open_tag.
set_name(
"JacobianTarget");
146 close_tag.
set_name(
"/JacobianTarget");
207 os_xml <<
' ' << rational <<
' ';
227 Index stokes_dim, nf;
239 os <<
"TransmissionMatrix has wrong dimensions";
246 os <<
"TransmissionMatrix has wrong dimensions";
270 open_tag.
set_name(
"TransmissionMatrix");
284 close_tag.
set_name(
"/TransmissionMatrix");
303 Index stokes_dim, nf;
315 os <<
"RadiationVector has wrong dimensions";
322 os <<
"RadiationVector has wrong dimensions";
346 open_tag.
set_name(
"RadiationVector");
360 close_tag.
set_name(
"/RadiationVector");
386 "Your version of ARTS can only handle version 1 of Time");
418 os_xml <<
' ' << t <<
' ';
437 static_assert(
AbsorptionLines::version == 2,
"The reading routine expects version 1 of the absorption lines data type to work");
453 "The version of this catalog is too new. You need to upgrade ARTS to use it.")
458 "Using descoped version of the catalog; version: ",
461 "We only ever support limited number of versions. Your compilation supports versions ",
465 " in ascii but only version ",
468 "To update from versions, please check-out the following branch, compile, and save your catalog again (as ascii):\n"
469 "0 to 1: 3b6565fb93702308c4cdd660ec63c71d63dcaf26\n"
470 "1 to 2: Current version\n")
482 }
else if (version == 1) {
488 id.isotopologue_index = spec_ind;
494 const Absorption::CutoffType
cutoff = Absorption::toCutoffTypeOrThrow(s_cutoff);
499 const Absorption::MirroringType mirroring = Absorption::toMirroringTypeOrThrow(s_mirroring);
504 const Absorption::PopulationType population = Absorption::toPopulationTypeOrThrow(s_population);
509 const Absorption::NormalizationType normalization = Absorption::toNormalizationTypeOrThrow(s_normalization);
514 const LineShape::Type lineshapetype = LineShape::toTypeOrThrow(s_lineshapetype);
534 for (
Index i = 0; i < nlocal; i++)
538 std::any_of(qn_key.begin(),
541 return Quantum::Number::common_value_type(
542 Quantum::Number::common_value_type(qn),
543 Quantum::Number::ValueType::H) not_eq
544 Quantum::Number::ValueType::H;
546 "Quantum number list contains a string type, this is not allowed: [",
563 tag.
get_attribute_value(
"broadeningspecies", broadeningspecies, selfbroadening, bathbroadening);
564 if (selfbroadening) broadeningspecies.front() =
id.Species();
572 population, normalization,
573 lineshapetype, T0, cutofffreq,
575 broadeningspecies, meta_localstate, metamodel);
581 os <<
"AbsorptionLines has wrong dimensions";
588 os <<
"AbsorptionLines has wrong dimensions";
594 for (
auto& line: al.
lines) line.localquanta.val.finalize();
600 if (out3.sufficient_priority_screen()) {
602 out3 <<
"Bad data in absorption band " << al.
MetaData() <<
'\n';
604 for (
auto& line : al.
lines) {
605 if (not line.localquanta.good()) {
606 out3 <<
"Bad data in absorption band " << al.
MetaData() <<
'\n'
607 <<
"Line: " << line <<
'\n';
627 open_comment_tag.
set_name(
"comment");
630 close_comment_tag.
set_name(
"/comment");
637 open_tag.
set_name(
"AbsorptionLines");
654 const String localquanta_str =
670 close_tag.
set_name(
"/AbsorptionLines");
Contains the absorption namespace.
Absorption::Lines AbsorptionLines
The global header file for ARTS.
This can be used to make arrays out of anything.
void add_attribute(const String &aname, const std::vector< QuantumNumberType > &value)
Adds value of attribute as type std::vector<QuantumNumberType> to tag.
void get_attribute_value(const String &aname, SpeciesTag &value)
Returns value of attribute as type SpeciesTag.
A list of many quantum numbers. Should always remain sorted.
Implements rational numbers to work with other ARTS types.
bool has_attribute(const String &aname) const
Returns if the attribute exists or not.
void write_to_stream(ostream &os)
Write XML tag.
void check_name(const String &expected_name)
Check tag name.
void read_from_stream(istream &is)
Reads next XML tag.
void set_name(const String &new_name)
Binary output file stream class.
Binary output file stream class.
Input manipulator class for doubles to enable nan and inf parsing.
Helper macros for debugging.
std::string var_string(Args &&... args)
#define ARTS_USER_ERROR_IF(condition,...)
constexpr std::string_view toString(EnergyLevelMapType x) noexcept
NUMERIC Numeric
The type to use for all floating point numbers.
INDEX Index
The type to use for all integer numbers and indices.
Declarations having to do with the four output streams.
Model MetaData2ModelShape(const String &s)
constexpr std::string_view items(std::string_view s, std::size_t i) noexcept
Get a view of a number of space-separated items from the list.
constexpr Index count_items(std::string_view s) noexcept
Count all space-separated items in s.
constexpr Index find_species_index(const Species spec, const std::string_view isot) noexcept
Quantum::Number::GlobalState QuantumIdentifier
Numeric T0
Reference temperature for all parameters of the lines.
PopulationType population
Line population distribution.
static constexpr Index version
bool bathbroadening
Does the line broadening have bath broadening.
Array< SingleLine > lines
A list of individual lines.
Index NumLines() const noexcept
Number of lines.
bofstream & write(bofstream &os) const
Binary write for Lines.
Numeric linemixinglimit
linemixing limit
NormalizationType normalization
Line normalization type.
bifstream & read(bifstream &is)
Binary read for Lines.
String LineShapeMetaData() const noexcept
Meta data for the line shape if it exists.
LineShape::Type lineshapetype
Type of line shape.
Numeric cutofffreq
cutoff frequency
MirroringType mirroring
Mirroring type.
CutoffType cutoff
cutoff type, by band or by line
ArrayOfSpecies broadeningspecies
A list of broadening species.
String MetaData() const
Returns a printable statement about the lines.
bool selfbroadening
Does the line broadening have self broadening.
QuantumIdentifier quantumidentity
Catalog ID.
Holds all information required for individual partial derivatives.
Numeric perturbation
Perturbations for methods where theoretical computations are impossible or plain slow.
String string_id
ID for some of the Special types of partial derivatives.
bool needArrayOfSpeciesTag() const noexcept
Does this type need the ArrayOfSpeciesTag?
void TargetSubType(const std::string_view &s) noexcept
Sets sub target based on a string.
bool TargetSubTypeOK() const noexcept
Are we good?
ArrayOfSpeciesTag species_array_id
ID for some of the Special types of partial derivatives.
std::string_view TargetType() const noexcept
Return type as string.
bool needString() const noexcept
Does this type need the String?
QuantumIdentifier qid
ID for the Line types of partial derivatives.
bool needQuantumIdentity() const noexcept
Does this type need the QuantumIdentifier?
A logical struct for global quantum numbers with species identifiers.
bool good() const
Test if there are bad quantum numbers (undefined ones) or if the isotopologue is not a normal target.
A logical struct for local quantum numbers.
void set_unsorted_qns(const Array< Type > &vals)
Radiation Vector for Stokes dimension 1-4.
Index Frequencies() const
Get frequency count.
Class to handle time in ARTS.
Index Version() const noexcept
Class to keep track of Transmission Matrices for Stokes Dim 1-4.
Index Frequencies() const
Number of frequencies.
void xml_data_parse_error(ArtsXMLTag &tag, String str_error)
Throws XML parser runtime error.
This file contains basic functions to handle XML data files.
void xml_set_stream_precision(ostream &os)
void xml_write_to_stream(ostream &os_xml, const JacobianTarget &jt, bofstream *pbofs, const String &name, const Verbosity &verbosity)
Writes JacobianTarget to XML output stream.
void xml_read_from_stream(istream &is_xml, JacobianTarget &jt, bifstream *pbifs, const Verbosity &verbosity)
Reads JacobianTarget from XML input stream.