Removed possibility of Nphi > 1
This commit is contained in:
@@ -23,12 +23,6 @@ CylinderBinning buildPositionBinning(json_t* object) {
|
||||
json_read_length(json_object_by_path(radial, {"MaxRadius"}), "m");
|
||||
ASSERT_POSITIVE(&max_radius, "Radius must be positive");
|
||||
|
||||
json_t* azimuthal = json_object_by_path(object, {"Azimuthal"});
|
||||
int number_of_bins_azimuthal =
|
||||
json_int(json_object_by_path(azimuthal, {"NumberOfBins"}));
|
||||
ASSERT_POSITIVE(&number_of_bins_azimuthal,
|
||||
"Number of Bins must be positive");
|
||||
|
||||
json_t* longitudinal = json_object_by_path(object, {"Longitudinal"});
|
||||
int number_of_bins_longitudinal =
|
||||
json_int(json_object_by_path(longitudinal, {"NumberOfBins"}));
|
||||
@@ -41,8 +35,6 @@ CylinderBinning buildPositionBinning(json_t* object) {
|
||||
#ifdef debug_level3
|
||||
DEBUG_LEVEL_3("with number of bins radial: " +
|
||||
std::to_string(number_of_bins_radial));
|
||||
DEBUG_LEVEL_3("with number of bins azimuthal: " +
|
||||
std::to_string(number_of_bins_azimuthal));
|
||||
DEBUG_LEVEL_3("with number of bins longitudinal: " +
|
||||
std::to_string(number_of_bins_longitudinal));
|
||||
DEBUG_LEVEL_3("with radius: " + std::to_string(max_radius) + " m");
|
||||
@@ -50,11 +42,10 @@ CylinderBinning buildPositionBinning(json_t* object) {
|
||||
#endif
|
||||
|
||||
return CylinderBinning(number_of_bins_radial, max_radius,
|
||||
number_of_bins_azimuthal,
|
||||
number_of_bins_longitudinal, max_length);
|
||||
} else {
|
||||
ERROR("This position binning is not implemented.");
|
||||
return CylinderBinning(0, 0, 0, 0, 0);
|
||||
return CylinderBinning(0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,23 +32,23 @@ std::string readAbsoluteFilename(json_t* object) {
|
||||
}
|
||||
}
|
||||
|
||||
blitz::Array<double, 3> readFromFile(json_t* object) {
|
||||
blitz::Array<double, 2> readFromFile(json_t* object) {
|
||||
std::string absolute_filename =
|
||||
readAbsoluteFilename(json_object_by_path(object, {"PathToH5"}));
|
||||
std::string key = json_string(json_object_by_path(object, {"Key"}));
|
||||
|
||||
Hdf5Reader reader(absolute_filename);
|
||||
return reader.readD3Double(key);
|
||||
return reader.readD2Double(key);
|
||||
}
|
||||
|
||||
blitz::Array<double, 3> readComponentFromFile(json_t* object, int component) {
|
||||
blitz::Array<double, 2> readComponentFromFile(json_t* object, int component) {
|
||||
std::string absolute_filename =
|
||||
readAbsoluteFilename(json_object_by_path(object, {"PathToH5"}));
|
||||
std::string key = json_string(
|
||||
json_array_get(json_object_by_path(object, {"Keys"}), component));
|
||||
|
||||
Hdf5Reader reader(absolute_filename);
|
||||
return reader.readD3Double(key);
|
||||
return reader.readD2Double(key);
|
||||
}
|
||||
|
||||
std::shared_ptr<VectorField> buildVectorField(json_t* object) {
|
||||
@@ -75,15 +75,15 @@ std::shared_ptr<VectorField> buildVectorField(json_t* object) {
|
||||
DEBUG_LEVEL_2("Creating Vector field: VectorFieldFromArray");
|
||||
#endif
|
||||
|
||||
blitz::Array<double, 3> v_radial = readComponentFromFile(
|
||||
blitz::Array<double, 2> v_radial = readComponentFromFile(
|
||||
json_object_by_path(object,
|
||||
{"VectorFieldFromArray", "ReadArrayFromFile"}),
|
||||
0);
|
||||
blitz::Array<double, 3> v_azimuthal = readComponentFromFile(
|
||||
blitz::Array<double, 2> v_azimuthal = readComponentFromFile(
|
||||
json_object_by_path(object,
|
||||
{"VectorFieldFromArray", "ReadArrayFromFile"}),
|
||||
1);
|
||||
blitz::Array<double, 3> v_longitudinal = readComponentFromFile(
|
||||
blitz::Array<double, 2> v_longitudinal = readComponentFromFile(
|
||||
json_object_by_path(object,
|
||||
{"VectorFieldFromArray", "ReadArrayFromFile"}),
|
||||
2);
|
||||
|
||||
Reference in New Issue
Block a user