Skip to content

Subsets of control networks are not written out correctly.

Split from #108 (closed) and @astrostu

Writing out a reduced control net (just a few of the columns from a full, JIGSAW'd control net, for just a few (11) measures) has revealed more issues. It does not respect "referenceIndex," instead making the first measure the reference. Any True/False field that has any text other than "True" gets treated as "True" -- such as "ignore" set to "False" will still have the measure's Ignore set to "True" ... I have to make the field "" to get it to be "False." I got errors whenever trying to put in any of the first four apriori columns (I didn't try the others). It did not respect measure type nor point type. Then, I thought it might be a version issue, so then I explicitly set "version=5" when calling io_controlnetwork.to_isis(), and I got errors. I had to modify line 287 of io_controlnetwork.py to be "point_spec = cnp5.ControlPointFileEntryV0005()" and then I at least got a network written out, but then CNETBIN2PVL couldn't read it ("ERROR Unable to write control net to PVL file. Invalid control point has no point ID value."). Despite it having a point ID and at least being able to convert to PVL when using version=2. If I added a prefix when calling .to_isis, like "blah", I got a different error when trying to run CNETBIN2PVL on the output network: "I/O ERROR Reading the control network [test_out.net] failed.\nI/O ERROR Failed to convert protobuf version 2 control point at index [1] into a ControlPoint.\nPROGRAMMER ERROR The SerialNumber is not unique. A measure with serial number [MRO/CTX/0848006063:221] already exists for ControlPoint [blahMC18_01_spacing1x_ptA00000015]." (Again, none of those errors were there with v2.)