instrument.addAttribute(new AttributeImpl("NX_class", Nexus.INST));
entry.addGroupNode("instrument", instrument);
GroupNode detector = NexusTreeUtils.createNXDetector(metadata.getDetector2DProperties());
instrument.addGroupNode("detector", detector);
if (info != null) {
<BUG>detector.addGroupNode("calibration_method", createCalibrationMethod(info));
entry.addGroupNode("calibration_sample", createCalibrationSample(info, metadata.getDiffractionCrystalEnvironment().getWavelength()));
}</BUG>
if (calibrationImage != null) {
DataNode data = NexusTreeUtils.createDataNode("data", calibrationImage, null);

instrument.addAttribute(new AttributeImpl("NX_class", Nexus.INST));
entry.addGroupNode("instrument", instrument);
GroupNode detector = NexusTreeUtils.createNXDetector(metadata.getDetector2DProperties());
instrument.addGroupNode("detector", detector);
if (info != null) {
detector.addGroupNode("calibration_method", createCalibrationMethod(info));
}
entry.addGroupNode("calibration_sample", createCalibrationSample(info, metadata.getDiffractionCrystalEnvironment().getWavelength()));
if (calibrationImage != null) {
DataNode data = NexusTreeUtils.createDataNode("data", calibrationImage, null);
