14 (
new GroundBrdfOutput(boost::dynamic_pointer_cast<GroundBrdf>(ground), boost::dynamic_pointer_cast<Level1bSampleCoefficient>(l1b), hdf_band_names));
32 : brdf(Brdf), l1b(L1b) { }
36 return brdf->weight_intercept(spec_idx).value();
41 return brdf->weight_slope(spec_idx).value();
46 return brdf->rahman_factor(spec_idx).value();
51 return brdf->hotspot_parameter(spec_idx).value();
56 return brdf->asymmetry_parameter(spec_idx).value();
61 return brdf->anisotropy_parameter(spec_idx).value();
66 return brdf->breon_factor(spec_idx).value();
71 Array<double, 2> cov = brdf->brdf_covariance(spec_idx);
72 if(cov.rows() > 0 and cov.cols() > 0) {
73 return (cov(coeff_idx, coeff_idx) < 0 ? 0.0 : sqrt(cov(coeff_idx, coeff_idx)));
116 return weight_intercept(spec_idx) * kernel_amplitude(spec_idx);
121 return weight_slope(spec_idx) * kernel_amplitude(spec_idx);
126 return weight_intercept_uncert(spec_idx) * kernel_amplitude(spec_idx);
131 return weight_slope_uncert(spec_idx) * kernel_amplitude(spec_idx);
136 Unit angle_unit(
"deg");
137 return brdf->kernel_value(spec_idx,
138 l1b->solar_zenith(spec_idx).convert(angle_unit).value,
139 l1b->sounding_zenith(spec_idx).convert(angle_unit).value,
140 l1b->relative_azimuth(spec_idx).convert(angle_unit).value);
150 boost::dynamic_pointer_cast<
GroundBrdf>(brdf->clone());
153 for(
int spec_idx = 0; spec_idx < brdf->number_spectrometer(); spec_idx++) {
154 std::string band_name = hdf_band_names[spec_idx];
157 out->register_data_source(
"/RetrievalResults/brdf_weight_apriori_" + band_name, f); }
160 out->register_data_source(
"/RetrievalResults/brdf_weight_slope_apriori_" + band_name, f); }
163 out->register_data_source(
"/RetrievalResults/brdf_reflectance_apriori_" + band_name, f); }
166 out->register_data_source(
"/RetrievalResults/brdf_reflectance_slope_apriori_" + band_name, f); }
169 out->register_data_source(
"/RetrievalResults/brdf_rahman_factor_apriori_" + band_name, f); }
172 out->register_data_source(
"/RetrievalResults/brdf_hotspot_parameter_apriori_" + band_name, f); }
175 out->register_data_source(
"/RetrievalResults/brdf_asymmetry_parameter_apriori_" + band_name, f); }
178 out->register_data_source(
"/RetrievalResults/brdf_anisotropy_parameter_apriori_" + band_name, f); }
181 out->register_data_source(
"/RetrievalResults/brdf_breon_factor_apriori_" + band_name, f); }
189 for(
int spec_idx = 0; spec_idx < brdf->number_spectrometer(); spec_idx++) {
190 std::string band_name = hdf_band_names[spec_idx];
193 out->register_data_source(
"/RetrievalResults/brdf_weight_" + band_name, f); }
196 out->register_data_source(
"/RetrievalResults/brdf_weight_uncert_" + band_name, f); }
199 out->register_data_source(
"/RetrievalResults/brdf_weight_slope_" + band_name, f); }
202 out->register_data_source(
"/RetrievalResults/brdf_weight_slope_uncert_" + band_name, f); }
205 out->register_data_source(
"/RetrievalResults/brdf_reflectance_" + band_name, f); }
208 out->register_data_source(
"/RetrievalResults/brdf_reflectance_slope_" + band_name, f); }
211 out->register_data_source(
"/RetrievalResults/brdf_reflectance_uncert_" + band_name, f); }
214 out->register_data_source(
"/RetrievalResults/brdf_reflectance_slope_uncert_" + band_name, f); }
217 out->register_data_source(
"/RetrievalResults/brdf_rahman_factor_" + band_name, f); }
220 out->register_data_source(
"/RetrievalResults/brdf_rahman_factor_uncert_" + band_name, f); }
223 out->register_data_source(
"/RetrievalResults/brdf_hotspot_parameter_" + band_name, f); }
226 out->register_data_source(
"/RetrievalResults/brdf_hotspot_parameter_uncert_" + band_name, f); }
229 out->register_data_source(
"/RetrievalResults/brdf_asymmetry_parameter_" + band_name, f); }
232 out->register_data_source(
"/RetrievalResults/brdf_asymmetry_parameter_uncert_" + band_name, f); }
235 out->register_data_source(
"/RetrievalResults/brdf_anisotropy_parameter_" + band_name, f); }
238 out->register_data_source(
"/RetrievalResults/brdf_anisotropy_parameter_uncert_" + band_name, f); }
241 out->register_data_source(
"/RetrievalResults/brdf_breon_factor_" + band_name, f); }
244 out->register_data_source(
"/RetrievalResults/brdf_breon_factor_uncert_" + band_name, f); }
247 surface_type =
"BRDF " + brdf->breon_type();
248 out->register_data_source(
"/RetrievalResults/surface_type", surface_type.c_str());
double reflectance_intercept(int spec_idx)
double weight_slope(int spec_idx)
double breon_factor(int spec_idx)
BrdfOutputHelper(const boost::shared_ptr< GroundBrdf > &Brdf, const boost::shared_ptr< Level1bSampleCoefficient > &L1b)
double rahman_factor_uncert(int spec_idx)
double hotspot_parameter_uncert(int spec_idx)
double weight_intercept(int spec_idx)
#define REGISTER_LUA_DERIVED_CLASS(X, Y)
double weight_intercept_uncert(int spec_idx)
double reflectance_slope_uncert(int spec_idx)
double uncert_value(int spec_idx, int coeff_idx)
double kernel_amplitude(int spec_idx) const
Apply value function to a blitz array.
double weight_slope_uncert(int spec_idx)
virtual void register_output(const boost::shared_ptr< Output > &out) const
Register portions of class that will be written to output.
double anisotropy_parameter_uncert(int spec_idx)
As described in the Output class, we have a decentralized model of producing output for L2 Full Physi...
Libraries such as boost::units allow unit handling where we know the units at compile time...
Contains classes to abstract away details in various Spurr Radiative Transfer software.
#define REGISTER_LUA_END()
def(luabind::constructor< int >()) .def("rows"
double breon_factor_uncert(int spec_idx)
double reflectance_slope(int spec_idx)
double reflectance_intercept_uncert(int spec_idx)
double asymmetry_parameter_uncert(int spec_idx)
double asymmetry_parameter(int spec_idx)
virtual void register_output_apriori(const boost::shared_ptr< Output > &out) const
Register apriori portions of class.
This class implements the Breon + Rahman ground type.
double anisotropy_parameter(int spec_idx)
double rahman_factor(int spec_idx)
This registers the portions of the GroundBrdf class that should be written as output.
double hotspot_parameter(int spec_idx)