Go to the documentation of this file.
42 throw std::runtime_error(
"Length of vectors must be correct");
47 for (
Index i=0; i<
y.nelem(); i++) {
48 y[i] =
calibration(cold[i], atm[i], hot[i], cold_temp, hot_temp);
51 for (
Index i=0; i<
y.nelem(); i++) {
52 y[i] =
systemtemp(cold[i], hot[i], cold_temp, hot_temp);
63 const Index& disregard_first,
64 const Index& disregard_last,
70 throw std::runtime_error(
"Time vector length must match input data length");
75 throw std::runtime_error(
"Time vector cannot decrease");
84 if (lims.front() == n) {
86 time_grid_out.resize(0);
93 if (not std::all_of(
ybatch.cbegin(),
ybatch.cend(), [k](
auto&
x){return x.nelem() == k;})) {
94 throw std::runtime_error(
"Bad frequency grid size in input data; expects all equal");
98 const Index m = lims.nelem() - 1;
100 throw std::runtime_error(
"Must include last if time step covers all of the range");
107 #pragma omp parallel for if (not arts_omp_in_parallel()) schedule(guided)
108 for (
Index i=0; i<m; i++) {
109 counts[i] = lims[i+1] - lims[i];
116 if (disregard_first) {
118 ybatch_out.erase(ybatch_out.begin());
119 time_grid_out.erase(time_grid_out.begin());
123 if (disregard_last) {
125 ybatch_out.pop_back();
126 time_grid_out.pop_back();
146 if (std::any_of(
ybatch.begin(),
ybatch.end(), [m](
auto&
y){return y.nelem() not_eq m;})) {
147 throw std::runtime_error(
"Bad input size, all of ybatch must match itself");
148 }
else if (trop_temp.
nelem() not_eq n) {
149 throw std::runtime_error(
"Bad input size, trop_temp must match ybatch");
156 for (
Index i=0; i<n; i++) {
163 for (
Index i=0; i<n; i++) {
177 throw std::runtime_error(
"Bad input size, all of ybatch_corr must match ybatch and have three elements each");
181 for (
Index i=0; i<n; i++) {
ArrayOfVector ybatch_corr(Workspace &ws) noexcept
invlib::Matrix< ArtsMatrix > Matrix
invlib wrapper type for ARTS matrices.
Vector y(Workspace &ws) noexcept
constexpr Numeric systemtemp(Numeric pc, Numeric ph, Numeric tc, Numeric th) noexcept
Computes the linear receiver temperature formula.
Stuff related to generating y-data from raw data.
ArrayOfIndex time_steps(const ArrayOfTime ×, const String &step)
Finds the index matching demands in a list of times.
constexpr Numeric calibration(Numeric pc, Numeric pa, Numeric ph, Numeric tc, Numeric th) noexcept
Computes the linear calibration formula.
Array< Vector > ArrayOfVector
An array of vectors.
Stuff related to time in ARTS.
This can be used to make arrays out of anything.
void yColdAtmHot(Vector &y, const Vector &cold, const Vector &atm, const Vector &hot, const Numeric &cold_temp, const Numeric &hot_temp, const Index &calib, const Verbosity &)
WORKSPACE METHOD: yColdAtmHot.
Time mean_time(const ArrayOfTime &ts, Index s, Index e)
Computes the average time in a list.
ArrayOfIndex counts(Workspace &ws) noexcept
Numeric median(const ConstVectorView v, const ArrayOfIndex &pos=ArrayOfIndex{})
Get the median of the vector in the range.
ArrayOfMatrix covmat_sepsbatch(Workspace &ws) noexcept
Index nelem() const
Returns the number of elements.
NUMERIC Numeric
The type to use for all floating point numbers.
Array< Matrix > ArrayOfMatrix
An array of matrices.
invlib::Vector< ArtsVector > Vector
invlib wrapper type for ARTS vectors.
void avg(VectorView y, const ArrayOfVector &ys, const Index start=0, const Index end=-1)
Compute the average of the ranged ys.
void ybatchTroposphericCorrectionNaiveMedianForward(ArrayOfVector &ybatch_corr, ArrayOfVector &ybatch, const ArrayOfIndex &range, const Vector &trop_temp, const Numeric &targ_temp, const Verbosity &)
WORKSPACE METHOD: ybatchTroposphericCorrectionNaiveMedianForward.
Array< Time > ArrayOfTime
List of times.
Vector x(Workspace &ws) noexcept
INDEX Index
The type to use for all integer numbers and indices.
void ybatchTimeAveraging(ArrayOfVector &ybatch, ArrayOfTime &time_grid, ArrayOfMatrix &covmat_sepsbatch, ArrayOfIndex &counts, const String &time_step, const Index &disregard_first, const Index &disregard_last, const Verbosity &)
WORKSPACE METHOD: ybatchTimeAveraging.
ArrayOfTime time_grid(Workspace &ws) noexcept
bool is_sorted(ConstVectorView x)
Checks if a vector is sorted in ascending order.
void ybatchTroposphericCorrectionNaiveMedianInverse(ArrayOfVector &ybatch, const ArrayOfVector &ybatch_corr, const Verbosity &)
WORKSPACE METHOD: ybatchTroposphericCorrectionNaiveMedianInverse.
ArrayOfVector ybatch(Workspace &ws) noexcept
void cov(MatrixView cov, const Vector &y, const ArrayOfVector &ys, const Index start=0, const Index end=-1)
Compute the covariance matrix of the ranged ys.