45 String typestr, subtypestr;
84 "Bad input: ", typestr,
" or ", subtypestr,
'\n',
"\tCannot be interpreted as a type or substype...\n")
103 open_tag.
set_name(
"JacobianTarget");
129 close_tag.
set_name(
"/JacobianTarget");
175 const Rational& rational,
190 os_xml <<
' ' << rational <<
' ';
210 Index stokes_dim, nf;
222 os <<
"TransmissionMatrix has wrong dimensions";
229 os <<
"TransmissionMatrix has wrong dimensions";
253 open_tag.
set_name(
"TransmissionMatrix");
267 close_tag.
set_name(
"/TransmissionMatrix");
286 Index stokes_dim, nf;
298 os <<
"RadiationVector has wrong dimensions";
305 os <<
"RadiationVector has wrong dimensions";
329 open_tag.
set_name(
"RadiationVector");
343 close_tag.
set_name(
"/RadiationVector");
369 "Your version of ARTS can only handle version 1 of Time");
401 os_xml <<
' ' << t <<
' ';
420 static_assert(
AbsorptionLines::version == 2,
"The reading routine expects version 1 of the absorption lines data type to work");
436 "The version of this catalog is too new. You need to upgrade ARTS to use it.")
441 "Using descoped version of the catalog; version: ",
444 "We only ever support limited number of versions. Your compilation supports versions ",
448 " in ascii but only version ",
451 "To update from versions, please check-out the following branch, compile, and save your catalog again (as ascii):\n"
452 "0 to 1: 3b6565fb93702308c4cdd660ec63c71d63dcaf26\n"
453 "1 to 2: Current version\n")
465 }
else if (version == 1) {
471 id.isotopologue_index = spec_ind;
477 const Absorption::CutoffType cutoff = Absorption::toCutoffTypeOrThrow(s_cutoff);
482 const Absorption::MirroringType mirroring = Absorption::toMirroringTypeOrThrow(s_mirroring);
487 const Absorption::PopulationType population = Absorption::toPopulationTypeOrThrow(s_population);
492 const Absorption::NormalizationType normalization = Absorption::toNormalizationTypeOrThrow(s_normalization);
497 const LineShape::Type lineshapetype = LineShape::toTypeOrThrow(s_lineshapetype);
508 Numeric linemixinglimit;
517 for (Index i = 0; i < nlocal; i++)
521 std::any_of(qn_key.begin(),
524 return Quantum::Number::common_value_type(
525 Quantum::Number::common_value_type(qn),
526 Quantum::Number::ValueType::H) not_eq
527 Quantum::Number::ValueType::H;
529 "Quantum number list contains a string type, this is not allowed: [",
546 tag.
get_attribute_value(
"broadeningspecies", broadeningspecies, selfbroadening, bathbroadening);
547 if (selfbroadening) broadeningspecies.front() =
id.Species();
554 nlines, cutoff, mirroring,
555 population, normalization,
556 lineshapetype, T0, cutofffreq,
558 broadeningspecies, meta_localstate, metamodel);
564 os <<
"AbsorptionLines has wrong dimensions";
571 os <<
"AbsorptionLines has wrong dimensions";
577 for (
auto& line: al.
lines) line.localquanta.val.finalize();
583 if (out3.sufficient_priority_screen()) {
585 out3 <<
"Bad data in absorption band " << al.
MetaData() <<
'\n';
587 for (
auto& line : al.
lines) {
588 if (not line.localquanta.good()) {
589 out3 <<
"Bad data in absorption band " << al.
MetaData() <<
'\n'
590 <<
"Line: " << line <<
'\n';
610 open_comment_tag.
set_name(
"comment");
613 close_comment_tag.
set_name(
"/comment");
620 open_tag.
set_name(
"AbsorptionLines");
633 const String localquanta_str =
649 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.
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,...)
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.