[no commit message]
This commit is contained in:
parent
32cfbff1e2
commit
243f9f541c
@ -160,7 +160,7 @@ public class NumassPlugin extends BasicPlugin {
|
||||
double weightReductionFactor = an.getDouble("weightReductionFactor", 2.0);
|
||||
|
||||
Model res = new WeightedXYModel("scatter-variable", spectrum, getAdapter(an), (dp) -> weightReductionFactor);
|
||||
res.configure(an);
|
||||
res.setMeta(an);
|
||||
return res;
|
||||
});
|
||||
|
||||
@ -196,7 +196,7 @@ public class NumassPlugin extends BasicPlugin {
|
||||
double weightReductionFactor = an.getDouble("weightReductionFactor", 2.0);
|
||||
|
||||
Model res = new WeightedXYModel("scatter-empiric-experimental", spectrum, getAdapter(an), (dp) -> weightReductionFactor);
|
||||
res.configure(an);
|
||||
res.setMeta(an);
|
||||
return res;
|
||||
});
|
||||
|
||||
|
@ -102,7 +102,7 @@ public class MergeDataAction extends ManyToOneAction<DataSet, DataSet> {
|
||||
* Указываем путь только если он одинаковый для всех входных файлов
|
||||
*/
|
||||
if (numassPath != null) {
|
||||
res.configure(res.meta().getBuilder().putValue("numass.path", numassPath).build());
|
||||
res.setMeta(res.meta().getBuilder().putValue("numass.path", numassPath).build());
|
||||
}
|
||||
|
||||
res = res.sort("Uset", true);
|
||||
|
@ -34,7 +34,6 @@ import inr.numass.data.NMPoint;
|
||||
import inr.numass.data.RawNMPoint;
|
||||
import java.io.OutputStream;
|
||||
import java.time.Instant;
|
||||
import java.time.ZoneOffset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
package inr.numass.data;
|
||||
|
||||
import hep.dataforge.content.AbstractContent;
|
||||
import hep.dataforge.content.NamedMetaHolder;
|
||||
import hep.dataforge.description.ValueDef;
|
||||
import hep.dataforge.meta.Meta;
|
||||
import hep.dataforge.meta.MetaBuilder;
|
||||
@ -33,7 +33,7 @@ import java.util.List;
|
||||
*/
|
||||
@ValueDef(name = "numass.path", info = "Path to this data file in numass repository.")
|
||||
@ValueDef(name = "numass.name", info = "The name of this data file.")
|
||||
public class NMFile extends AbstractContent implements NumassData {
|
||||
public class NMFile extends NamedMetaHolder implements NumassData {
|
||||
|
||||
public static NMFile readStream(InputStream is, String fname, Meta config) throws IOException{
|
||||
return new NMFile(new NumassDataReader(is, fname, config).read());
|
||||
|
@ -15,7 +15,8 @@
|
||||
*/
|
||||
package inr.numass.data;
|
||||
|
||||
import hep.dataforge.content.AbstractContent;
|
||||
import hep.dataforge.content.Content;
|
||||
import hep.dataforge.content.NamedMetaHolder;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.PrintWriter;
|
||||
@ -26,7 +27,7 @@ import java.util.List;
|
||||
* Contains the whole data but requires a lot of memory
|
||||
* @author Darksnake
|
||||
*/
|
||||
public class RawNMFile extends AbstractContent {
|
||||
public class RawNMFile extends NamedMetaHolder implements Content {
|
||||
|
||||
// public static String TYPE = ":data:numassdatafile";
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
package inr.numass.prop.ar;
|
||||
|
||||
import hep.dataforge.meta.Meta;
|
||||
import hep.dataforge.content.AbstractContent;
|
||||
import hep.dataforge.content.NamedMetaHolder;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
@ -25,7 +25,7 @@ import java.util.List;
|
||||
*
|
||||
* @author Darksnake
|
||||
*/
|
||||
public class JNAEpisode extends AbstractContent implements Iterable<JNASpectrum> {
|
||||
public class JNAEpisode extends NamedMetaHolder implements Iterable<JNASpectrum> {
|
||||
|
||||
private final List<JNASpectrum> spectra;
|
||||
|
||||
|
@ -17,7 +17,7 @@ package inr.numass.prop.ar;
|
||||
|
||||
import hep.dataforge.meta.Meta;
|
||||
import hep.dataforge.meta.MetaBuilder;
|
||||
import hep.dataforge.content.AbstractContent;
|
||||
import hep.dataforge.content.NamedMetaHolder;
|
||||
import hep.dataforge.description.NodeDef;
|
||||
import hep.dataforge.description.ValueDef;
|
||||
import hep.dataforge.data.DataPoint;
|
||||
@ -37,7 +37,7 @@ import java.util.Map;
|
||||
@NodeDef(name = "temperature", info = "The temperature measurements data for this spectrum.")
|
||||
@ValueDef(name = "relativeStartTime", type = "NUMBER", info = "Start time in days relative to some starting point.")
|
||||
@ValueDef(name = "relativeStopTime", type = "NUMBER", info = "Stop time in days relative to some starting point.")
|
||||
public class JNASpectrum extends AbstractContent {
|
||||
public class JNASpectrum extends NamedMetaHolder {
|
||||
|
||||
public static String[] names = {"chanel", "count"};
|
||||
|
||||
|
@ -21,7 +21,6 @@ import hep.dataforge.context.Context;
|
||||
import hep.dataforge.description.ValueDef;
|
||||
import hep.dataforge.description.TypedActionDef;
|
||||
import hep.dataforge.io.log.Logable;
|
||||
import hep.dataforge.values.ValueType;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
@ -42,7 +42,7 @@ public class TestFit {
|
||||
File sourceDir = new File("c:\\Users\\Darksnake\\Dropbox\\jna_data");
|
||||
|
||||
FileData file = new FileData(new File(sourceDir, "ar37e2.dat"));
|
||||
file.annotate(new MetaBuilder("meta")
|
||||
file.setMeta(new MetaBuilder("meta")
|
||||
.putValue("timeFile", "tar37e2.dat")
|
||||
.putValue("temperatureFile", "e2temp.txt")
|
||||
);
|
||||
|
@ -45,7 +45,7 @@ public class TestReader {
|
||||
// new MINUITModule().load();
|
||||
|
||||
FileData file = new FileData(new File("c:\\Users\\Darksnake\\Dropbox\\jna_data\\ar37e2.dat"));
|
||||
file.annotate(new MetaBuilder("meta")
|
||||
file.setMeta(new MetaBuilder("meta")
|
||||
.putValue("timeFile", "c:\\Users\\Darksnake\\Dropbox\\jna_data\\tar37e2.dat")
|
||||
.putValue("temperatureFile", "c:\\Users\\Darksnake\\Dropbox\\jna_data\\e2temp.txt")
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user