[no commit message]
This commit is contained in:
parent
829d48b625
commit
c8ad2a51bc
@ -37,6 +37,7 @@ import java.time.Instant;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import java.util.Comparator;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -240,7 +241,7 @@ public class NumassDataLoader extends AbstractLoader implements BinaryLoader<Env
|
|||||||
@Override
|
@Override
|
||||||
public List<NMPoint> getNMPoints() {
|
public List<NMPoint> getNMPoints() {
|
||||||
List<NMPoint> res = new ArrayList<>();
|
List<NMPoint> res = new ArrayList<>();
|
||||||
this.getPoints().stream().forEach((point) -> {
|
this.getPoints().stream().forEachOrdered((point) -> {
|
||||||
res.add(readPoint(point));
|
res.add(readPoint(point));
|
||||||
});
|
});
|
||||||
// res.sort((NMPoint o1, NMPoint o2) -> o1.getAbsouteTime().compareTo(o2.getAbsouteTime()));
|
// res.sort((NMPoint o1, NMPoint o2) -> o1.getAbsouteTime().compareTo(o2.getAbsouteTime()));
|
||||||
@ -256,6 +257,10 @@ public class NumassDataLoader extends AbstractLoader implements BinaryLoader<Env
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
res.sort((Envelope t, Envelope t1) -> t.meta().getInt("external_meta.point_index", -1)
|
||||||
|
.compareTo(t1.meta().getInt("external_meta.point_index", -1)));
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -213,7 +213,7 @@ public class MspViewController implements Initializable {
|
|||||||
p.putValue("timestamp", last.getValue("timestamp").timeValue().plusMillis(10));
|
p.putValue("timestamp", last.getValue("timestamp").timeValue().plusMillis(10));
|
||||||
for (String name : last.namesAsArray()) {
|
for (String name : last.namesAsArray()) {
|
||||||
if (!name.equals("timestamp")) {
|
if (!name.equals("timestamp")) {
|
||||||
p.putValue(name, Value.getNull());
|
p.putValue(name, Value.NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return p;
|
return p;
|
||||||
|
@ -209,11 +209,18 @@ public class NumassLoaderViewComponent extends AnchorPane implements Initializab
|
|||||||
|
|
||||||
private void updateSpectrumPane() {
|
private void updateSpectrumPane() {
|
||||||
if (spectrumPlotFrame == null) {
|
if (spectrumPlotFrame == null) {
|
||||||
spectrumPlotFrame = new JFreeChartFrame("spectrum", null, spectrumPlotPane);
|
Meta plotMeta = new MetaBuilder("plot")
|
||||||
|
.setValue("xAxis.axisTitle", "U")
|
||||||
|
.setValue("xAxis.axisUnits", "V")
|
||||||
|
.setValue("yAxis.axisTitle", "count rate")
|
||||||
|
.setValue("yAxis.axisUnits", "Hz")
|
||||||
|
.setValue("legend.show", false);
|
||||||
|
|
||||||
|
spectrumPlotFrame = new JFreeChartFrame("spectrum", plotMeta, spectrumPlotPane);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (spectrumData == null) {
|
if (spectrumData == null) {
|
||||||
spectrumData = new ChangeablePlottableData("", null);
|
spectrumData = new ChangeablePlottableData("spectrum", null);
|
||||||
spectrumPlotFrame.add(spectrumData);
|
spectrumPlotFrame.add(spectrumData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user