Commit 1b565344 authored by cponcele's avatar cponcele
Browse files

Update to last sonar netcdf release

parent 59a7481f
......@@ -13,7 +13,7 @@
"comment": "Beam type. Split aperture indicates a beam that can detect the arrival angle of echoes, while single beam cannot."
},
{
"name": "byte enum conversion_equation_t {type_1 = 1, type_2 = 2, type_3 = 3, type_4 = 4}",
"name": "byte enum conversion_equation_t {type_1 = 1, type_2 = 2, type_3 = 3, type_4 = 4, type_5 = 5}",
"comment": "The type of equation used to convert backscatter measurements into volume backscattering and target strength."
},
{
......@@ -108,7 +108,7 @@
"name": "conversion_equation_type",
"obligation": "M",
"comment": "Type of equation used to convert backscatter measurements into volume backscattering strength and target strength.",
"value": " ",
"value": "5",
"type": "conversion_equation_t"
},
{
......@@ -440,7 +440,7 @@
{
"name": "rx_beam_rotation_theta",
"obligation": "M",
"comment": "The intrinsic _z_–_y_’–_x_” clockwise rotation about the _y_-axis of the platform coordinate system needed to give the receive beam coordinate system. For ships and similar, if installation angles are close to zero, this rotation usually matches the beam pointing angle in the along track direction (also called tilt angle).",
"comment": "The intrinsic _z_–_y_’–_x_” clockwise rotation about the _y_-axis of the platform coordinate system needed to give the receive beam coordinate system. For ships and similar, if installation angles are close to zero, this rotation usually matches the beam pointing angle in the along track direction.",
"dims": [
"ping_time",
"beam"
......@@ -530,7 +530,7 @@
{
"name": "tx_beam_rotation_theta",
"obligation": "M",
"comment": "The intrinsic _z_–_y_’–_x_” clockwise about the _y_-axis of the platform coordinate system needed to give the transmit beam coordinate system. For ships and similar, if installation angles are close to zero, this rotation usually matches the beam pointing angle in the along track direction (also called tilt angle).",
"comment": "The intrinsic _z_–_y_’–_x_” clockwise about the _y_-axis of the platform coordinate system needed to give the transmit beam coordinate system. For ships and similar, if installation angles are close to zero, this rotation usually matches the beam pointing angle in the along track direction.",
"dims": [
"ping_time",
"tx_beam"
......@@ -686,10 +686,12 @@
"attributes": [
{
"name": "flag_meanings",
"value": "unknown",
"comment": "Space-separated list of non-quantitative processing setting words or phrases. The first item must always be the no non-quantitative processing setting and subsequent items as appropriate to the sonar and data(e.g. ”no_non_quantitative_processing simrad_noise_filter_weak simrad_noise_filter_medium simrad_noise_filter_strong”)."
},
{
"name": "flag_values",
"value": "0",
"comment": "List of unique values (e.g. 0, 1, 3, 4) that indicate different non-quantitative processing settings that could be present in the sonar data. Must have the same number of values as settings given in the flag_meanings attribute.",
"type": "short"
},
......@@ -4832,7 +4834,7 @@
"name": "detection_conversion_equation_type",
"obligation": "M",
"comment": "Type of equation used to convert detection backscatter measurements into backscattering strength",
"value": " ",
"value": "5",
"type": "seafloor_backscatter_equation_t"
}
],
......@@ -6668,7 +6670,7 @@
"name": "conversion_equation_type",
"obligation": "M",
"comment": "Type of equation used to convert backscatter measurements into volume backscattering strength and target strength.",
"value": " ",
"value": "5",
"type": "conversion_equation_t"
}
],
......@@ -7272,10 +7274,12 @@
"attributes": [
{
"name": "flag_meanings",
"value": "unknown",
"comment": "Space-separated list of non-quantitative processing setting words or phrases. The first item must always be the no non-quantitative processing setting and subsequent items as appropriate to the sonar and data(e.g. ”no_non_quantitative_processing simrad_noise_filter_weak simrad_noise_filter_medium simrad_noise_filter_strong”)."
},
{
"name": "flag_values",
"value": "0",
"comment": "List of unique values (e.g. 0, 1, 3, 4) that indicate different non-quantitative processing settings that could be present in the sonar data. Must have the same number of values as settings given in the flag_meanings attribute.",
"type": "short"
},
......
......@@ -80,6 +80,7 @@ public class AsciiDoctorGenerator {
{
if(group.getName().length()==0) return "tableTopLevel.adoc";
if(group.getName().compareTo("Beam_group1")==0) return "tableBeamGroup1.adoc";
if(group.getName().compareTo("Grid_group1")==0) return "tableBeamGridGroup1.adoc";
if (group.getName().endsWith("Vendor_specific") || path.contains("Vendor_specific")) {
String pathPrefix = path.substring(2).replace("/", "_") + "_";
......
......@@ -280,10 +280,10 @@ public class SCGroupAdapter {
break;
default:
value = att.value;
comment = att.comment == null ? "" : "#" + att.comment;
sourceCode.add(String.format("%s%s#if \"%s\" not in attributes:", localIdent, pythonIndent, att.name));
sourceCode.add(String.format("%s%s%s#%s.%s = %s%s", localIdent, pythonIndent, pythonIndent,
comment = att.comment == null ? "" : " # " + att.comment;
sourceCode.add(String.format("%s%sif \"%s\" not in attributes:", localIdent, pythonIndent, att.name));
sourceCode.add(String.format("%s%s%s%s.%s = %s%s", localIdent, pythonIndent, pythonIndent,
grouporVariableName, att.name, value, comment));
}
} else {
......@@ -315,6 +315,7 @@ public class SCGroupAdapter {
sourceCode.add("\nimport netCDF4 as nc");
sourceCode.add("\nimport numpy as np");
sourceCode.add("\nfrom .nc_tools import find_type");
sourceCode.add("# pylint: disable=import-error");
sourceCode.add("# pylint: disable=E1101");
sourceCode.add("# pylint: disable=R0904");
sourceCode.add("# pylint: disable=C0305");
......@@ -338,9 +339,12 @@ public class SCGroupAdapter {
sourceCode.add(String.format("%sdef get_group_path():\n%s%sreturn \"%s\"", localIdent, localIdent,
pythonIndent, "/"));
} else {
if (is_sensor_associated) {
sourceCode.add(String.format("%sdef get_group_path(ident=None):\n%s%sreturn %s", localIdent, localIdent,
pythonIndent, String.format("%s+ident+\"/\"", pathGetter)));
if (group.groupCategory == GroupCategory.eSensor || group.groupCategory == GroupCategory.eMultipleInstance)
{
sourceCode.add(String.format("%sdef get_group_path(ident=None):\n%s%sreturn %s", localIdent,localIdent,pythonIndent, String.format("%s+ident+\"/\"", pathGetter)));
} else if (is_sensor_associated) {
sourceCode.add(String.format("%sdef get_group_path(ident=None):\n%s%sreturn %s", localIdent,localIdent,pythonIndent, String.format("%s+\"%s/\"", pathGetter,group.name)));
} else {
sourceCode.add(String.format("%sdef get_group_path():\n%s%sreturn %s", localIdent, localIdent,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment