Go to the documentation of this file.
128 *pbifs >> matrix(r, c);
132 <<
"\n Row : " << r <<
"\n Column: " << c;
140 <<
"\n Row : " << r <<
"\n Column: " << c;
179 *pbofs << matrix(r, 0);
181 os_xml << matrix(r, 0);
183 for (
Index c = 1; c < matrix.ncols(); ++c) {
185 *pbofs << matrix(r, c);
187 os_xml <<
" " << matrix(r, c);
190 if (!pbofs) os_xml <<
'\n';
356 for (
Index i = 0; i < nnz; i++) {
362 <<
"\n Row index: " << i;
370 <<
"\n Row index: " << i;
381 for (
Index i = 0; i < nnz; i++) {
387 <<
"\n Column index: " << i;
395 <<
"\n Column index: " << i;
406 for (
Index i = 0; i < nnz; i++) {
412 <<
"\n Data element: " << i;
420 <<
"\n Data element: " << i;
476 for (
Index i = 0; i < sparse.
nnz(); i++) {
481 os_xml << rowind[i] <<
'\n';
493 for (
Index i = 0; i < sparse.
nnz(); i++) {
498 os_xml << colind[i] <<
'\n';
511 for (
Index i = 0; i < sparse.
nnz(); i++) {
515 os_xml <<
data[i] <<
' ';
548 bool string_starts_with_quotes =
true;
559 string_starts_with_quotes =
false;
561 }
while (is_xml.good() && dummy !=
'"' && string_starts_with_quotes);
564 if (!string_starts_with_quotes) {
569 dummy = (char)is_xml.peek();
575 is_xml.get(strbuf,
'"');
610 os_xml <<
'\"' << str <<
'\"';
644 *pbifs >> tensor(p, r, c);
648 <<
"\n Page : " << p <<
"\n Row : " << r
649 <<
"\n Column: " << c;
657 <<
"\n Page : " << p <<
"\n Row : " << r
658 <<
"\n Column: " << c;
700 *pbofs << tensor(p, r, 0);
702 os_xml << tensor(p, r, 0);
703 for (
Index c = 1; c < tensor.ncols(); ++c) {
705 *pbofs << tensor(p, r, c);
707 os_xml <<
" " << tensor(p, r, c);
709 if (!pbofs) os_xml <<
'\n';
748 *pbifs >> tensor(b, p, r, c);
752 <<
"\n Book : " << b <<
"\n Page : " << p
753 <<
"\n Row : " << r <<
"\n Column: " << c;
761 <<
"\n Book : " << b <<
"\n Page : " << p
762 <<
"\n Row : " << r <<
"\n Column: " << c;
807 *pbofs << tensor(b, p, r, 0);
809 os_xml << tensor(b, p, r, 0);
810 for (
Index c = 1; c < tensor.ncols(); ++c) {
812 *pbofs << tensor(b, p, r, c);
814 os_xml <<
" " << tensor(b, p, r, c);
816 if (!pbofs) os_xml <<
'\n';
858 *pbifs >> tensor(s, b, p, r, c);
862 <<
"\n Shelf : " << s <<
"\n Book : " << b
863 <<
"\n Page : " << p <<
"\n Row : " << r
864 <<
"\n Column: " << c;
872 <<
"\n Shelf : " << s <<
"\n Book : " << b
873 <<
"\n Page : " << p <<
"\n Row : " << r
874 <<
"\n Column: " << c;
922 *pbofs << tensor(s, b, p, r, 0);
924 os_xml << tensor(s, b, p, r, 0);
925 for (
Index c = 1; c < tensor.ncols(); ++c) {
927 *pbofs << tensor(s, b, p, r, c);
929 os_xml <<
" " << tensor(s, b, p, r, c);
931 if (!pbofs) os_xml <<
'\n';
976 *pbifs >> tensor(v, s, b, p, r, c);
980 <<
"\n Vitrine: " << v <<
"\n Shelf : " << s
981 <<
"\n Book : " << b <<
"\n Page : " << p
982 <<
"\n Row : " << r <<
"\n Column : " << c;
990 <<
"\n Vitrine: " << v <<
"\n Shelf : " << s
991 <<
"\n Book : " << b <<
"\n Page : " << p
992 <<
"\n Row : " << r <<
"\n Column : " << c;
1043 *pbofs << tensor(v, s, b, p, r, 0);
1045 os_xml << tensor(v, s, b, p, r, 0);
1046 for (
Index c = 1; c < tensor.ncols(); ++c) {
1048 *pbofs << tensor(v, s, b, p, r, c);
1050 os_xml <<
" " << tensor(v, s, b, p, r, c);
1052 if (!pbofs) os_xml <<
'\n';
1100 *pbifs >> tensor(l, v, s, b, p, r, c);
1101 if (pbifs->fail()) {
1104 <<
"\n Library: " << l <<
"\n Vitrine: " << v
1105 <<
"\n Shelf : " << s <<
"\n Book : " << b
1106 <<
"\n Page : " << p <<
"\n Row : " << r
1107 <<
"\n Column : " << c;
1112 if (is_xml.fail()) {
1115 <<
"\n Library: " << l <<
"\n Vitrine: " << v
1116 <<
"\n Shelf : " << s <<
"\n Book : " << b
1117 <<
"\n Page : " << p <<
"\n Row : " << r
1118 <<
"\n Column : " << c;
1172 *pbofs << tensor(l, v, s, b, p, r, 0);
1174 os_xml << tensor(l, v, s, b, p, r, 0);
1175 for (
Index c = 1; c < tensor.ncols(); ++c) {
1177 *pbofs << tensor(l, v, s, b, p, r, c);
1179 os_xml <<
" " << tensor(l, v, s, b, p, r, c);
1181 if (!pbofs) os_xml <<
'\n';
1216 *pbifs >> vector[n];
1217 if (pbifs->fail()) {
1220 <<
"\n Element: " << n;
1225 if (is_xml.fail()) {
1228 <<
"\n Element: " << n;
1285 for (
Index i = 0; i < n; ++i)
1287 *pbofs << vector[i];
1289 os_xml << vector[i] <<
'\n';
1320 if (pbifs->fail()) {
1322 os <<
"TransmissionMatrix has wrong dimensions";
1327 if (is_xml.fail()) {
1329 os <<
"TransmissionMatrix has wrong dimensions";
1353 open_tag.
set_name(
"TransmissionMatrix");
1367 close_tag.
set_name(
"/TransmissionMatrix");
1396 if (pbifs->fail()) {
1398 os <<
"RadiationVector has wrong dimensions";
1403 if (is_xml.fail()) {
1405 os <<
"RadiationVector has wrong dimensions";
1429 open_tag.
set_name(
"RadiationVector");
1443 close_tag.
set_name(
"/RadiationVector");
1468 if (version == 1) {}
1470 throw std::runtime_error(
"Your version of ARTS can only handle version 1 of Time");
1474 throw std::runtime_error(
"Cannot read binary Time");
1477 if (is_xml.fail()) {
1507 throw std::runtime_error(
"Cannot write binary time");
1509 os_xml <<
' ' << t <<
' ';
1579 std::vector<QuantumNumberType> localquanta;
1590 bool selfbroadening;
1591 bool bathbroadening;
1592 tag.
get_attribute_value(
"broadeningspecies", broadeningspecies, selfbroadening, bathbroadening);
1599 nlines, cutoff, mirroring,
1600 population, normalization,
1601 lineshapetype, T0, cutofffreq,
1603 spec.
Isotopologue(), upperglobalquanta, lowerglobalquanta),
1604 localquanta, broadeningspecies, metamodel);
1608 if (pbifs->fail()) {
1610 os <<
"AbsorptionLines has wrong dimensions";
1615 if (is_xml.fail()) {
1617 os <<
"AbsorptionLines has wrong dimensions";
1640 open_comment_tag.
set_name(
"comment");
1643 close_comment_tag.
set_name(
"/comment");
1650 open_tag.
set_name(
"AbsorptionLines");
1676 close_tag.
set_name(
"/AbsorptionLines");
1693 throw runtime_error(
"Method not implemented!");
1701 throw runtime_error(
"Method not implemented!");
CutoffType Cutoff() const noexcept
Returns cutoff style.
Index nlibraries(Workspace &ws) noexcept
void resize(Index b, Index p, Index r, Index c)
Resize function.
Index nshelves() const
Returns the number of shelves.
Index nshelves() const
Returns the number of shelves.
Container class for Quantum Numbers.
Index nbooks() const
Returns the number of books.
void check_name(const String &expected_name)
Check tag name.
void resize(Index v, Index s, Index b, Index p, Index r, Index c)
Resize function.
Index ncols() const
Returns the number of columns.
Index Version() const noexcept
LineShape::Type LineShapeType() const noexcept
Returns lineshapetype style.
Index ncols() const
Returns the number of columns.
Index npages() const
Returns the number of pages.
Index NumLines() const noexcept
Number of lines.
String normalizationtype2string(NormalizationType in)
Index ncols() const
Returns the number of columns.
Numeric T0() const noexcept
Returns reference temperature.
Verbosity verbosity(Workspace &ws) noexcept
NormalizationType
Describes the type of normalization line effects.
Index nvitrines(Workspace &ws) noexcept
bool Bath() const noexcept
Returns bath broadening status.
NormalizationType Normalization() const noexcept
Returns normalization style.
Index Frequencies() const
Number of frequencies.
Index nrows() const
Returns the number of rows.
void resize(Index n)
Resize function.
Model MetaData2ModelShape(const String &s)
String UpperQuantumNumbers() const noexcept
Upper quantum numbers string.
G0 G2 FVC Y DV Numeric Numeric Numeric Zeeman LowerQuantumNumbers void * data
void get_attribute_value(const String &aname, String &value)
Returns value of attribute as String.
Index stokes_dim(Workspace &ws) noexcept
Index nrows() const
Returns the number of rows.
void xml_set_stream_precision(ostream &os)
Index nshelves(Workspace &ws) noexcept
void list_elements(Vector &values, ArrayOfIndex &row_indices, ArrayOfIndex &column_indices) const
List elements in matrix.
void write_to_stream(ostream &os)
Write XML tag.
String populationtype2string(PopulationType in)
void resize(Index p, Index r, Index c)
Resize function.
Index npages() const
Returns the number of pages.
Index npages() const
Returns the number of pages.
Index nlibraries() const
Returns the number of libraries.
Numeric CutoffFreqValue() const noexcept
Returns internal cutoff frequency value.
void xml_parse_from_stream(istream &is_xml, Vector &vector, bifstream *pbifs, ArtsXMLTag &tag, const Verbosity &)
Parses Vector from XML input stream.
This can be used to make arrays out of anything.
This file contains private function declarations and template instantiation to handle XML data files.
Absorption::Lines AbsorptionLines
A tag group can consist of the sum of several of these.
Index nelem(const Lines &l)
Number of lines.
void insert_elements(Index nnz, const ArrayOfIndex &rowind, const ArrayOfIndex &colind, ConstVectorView data)
Insert vector of elements with given row and column indices.
Index nvitrines() const
Returns the number of vitrines.
void resize(Index l, Index v, Index s, Index b, Index p, Index r, Index c)
Resize function.
Index StokesDim() const
Stokes dimensionaility.
void resize(Index s, Index b, Index p, Index r, Index c)
Resize function.
Index nnz() const
Returns the number of nonzero elements.
void xml_read_from_stream(istream &is_xml, Index &index, bifstream *pbifs, const Verbosity &verbosity)
Reads Index from XML input stream.
Index ncols() const
Returns the number of columns.
MirroringType Mirroring() const noexcept
Returns mirroring style.
void read_from_stream(istream &is)
Reads next XML tag.
void xml_parse_error(const String &str_error)
Throws XML parser runtime error.
Index nelem() const
Returns the number of elements.
Input manipulator class for doubles to enable nan and inf parsing.
Index nvitrines() const
Returns the number of vitrines.
This file contains private function declarations and template instantiation to handle XML data files.
Index ncols() const
Returns the number of columns.
Index npages() const
Returns the number of pages.
NUMERIC Numeric
The type to use for all floating point numbers.
void add_attribute(const String &aname, const String &value)
Adds a String attribute to tag.
Binary output file stream class.
Index npages() const
Returns the number of pages.
String mirroringtype2string(MirroringType in)
Index nbooks() const
Returns the number of books.
Index npages(Workspace &ws) noexcept
MirroringType
Describes the type of mirroring line effects.
void resize(Index r, Index c)
Resize function.
String SpeciesName() const noexcept
Species Name.
Type
Type of line shape to compute.
Index nrows() const
Returns the number of rows.
Index nbooks() const
Returns the number of books.
PopulationType Population() const noexcept
Returns population style.
Index nrows(Workspace &ws) noexcept
Index nrows() const
Returns the number of rows.
void resize(Index r, Index c)
Resize function.
Radiation Vector for Stokes dimension 1-4.
Index nbooks() const
Returns the number of books.
Index nrows() const
Returns the number of rows.
void xml_write_to_stream(ostream &os_xml, const Index &index, bofstream *pbofs, const String &name, const Verbosity &verbosity)
Writes Index to XML output stream.
Index StokesDim() const
Get Stokes dimension.
Index nrows() const
Returns the number of rows.
NormalizationType string2normalizationtype(const String &in)
RadiationVector RadiationVector
void xml_data_parse_error(ArtsXMLTag &tag, String str_error)
Throws XML parser runtime error.
Class to handle time in ARTS.
Index nshelves() const
Returns the number of shelves.
Index ncols() const
Returns the number of columns.
String LowerQuantumNumbers() const noexcept
Lower quantum numbers string.
String LineShapeMetaData() const noexcept
Meta data for the line shape if it exists.
bofstream & write(bofstream &os) const
Binary write for Lines.
String shapetype2string(Type type) noexcept
Turns selected Type into a string.
bool Self() const noexcept
Returns self broadening status.
TransmissionMatrix TransmissionMatrix
Index Isotopologue() const
Isotopologue species index.
This file contains basic functions to handle ASCII files.
CutoffType
Describes the type of cutoff calculations.
QuantumIdentifier QuantumIdentifier
INDEX Index
The type to use for all integer numbers and indices.
Numeric LinemixingLimit() const noexcept
Returns line mixing limit.
Index nrows() const
Returns the number of rows.
CutoffType string2cutofftype(const String &in)
String MetaData() const
Returns a printable statement about the lines.
String cutofftype2string(CutoffType in)
Index Frequencies() const
Get frequency count.
Index ncols(Workspace &ws) noexcept
Type string2shapetype(const String &type)
Turns predefined strings into a Type.
PopulationType
Describes the type of population level counter.
Class to keep track of Transmission Matrices for Stokes Dim 1-4.
void set_name(const String &new_name)
PopulationType string2populationtype(const String &in)
Index Species() const
Molecular species index.
Index ncols() const
Returns the number of columns.
const ArrayOfSpeciesTag & BroadeningSpecies() const noexcept
Returns the broadening species.
Index nbooks(Workspace &ws) noexcept
Implements rational numbers to work with other ARTS types.
const std::vector< QuantumNumberType > & LocalQuanta() const noexcept
Returns local quantum numbers.
MirroringType string2mirroringtype(const String &in)
The global header file for ARTS.
bifstream & read(bifstream &is)
Binary read for Lines.
This file contains basic functions to handle XML data files.
Binary output file stream class.