Package pymontecarlo.util.hdf5

Examples of pymontecarlo.util.hdf5.HDF5Dataset


    @Override
    public void saveResults(HDF5Group root, String key) throws IOException {
        super.saveResults(root, key);

        HDF5Group group = root.requireSubgroup(key);

        String transitionName;
        double[][] gnf, gt, enf, et;
        HDF5Group transitionGroup;
        for (XRayTransition trans : radialTotal.getTransitions()) {
            if (!trans.isWellKnown())
                continue;

            transitionName = trans.getIUPACName();
            transitionGroup = group.createSubgroup(transitionName);

            gnf = radialCharac.getGeneratedDistribution(trans).getArray();
            gt = radialTotal.getGeneratedDistribution(trans).getArray();
            enf = radialCharac.getEmittedDistribution(trans).getArray();
            et = radialTotal.getEmittedDistribution(trans).getArray();

            transitionGroup.createDataset("gnf", gnf);
            transitionGroup.createDataset("gt", gt);
            transitionGroup.createDataset("enf", enf);
            transitionGroup.createDataset("et", et);
        }
    }
View Full Code Here


    @Override
    public void saveResults(HDF5Group root, String key) throws IOException {
        super.saveResults(root, key);
       
        HDF5Group group = root.requireSubgroup(key);
       
        // Create array
        Histogram hist = radialDist.getDistribution();
        double[][] data = new double[channels][2];
       
        for (int i = 0; i < channels; i++) {
            data[i][0] = (hist.minValue(i) + hist.maxValue(i)) / 2.0;
            data[i][1] = hist.counts(i);
        }
       
        // Save dataset
        group.createDataset("data", data);
    }
View Full Code Here



    @Override
    public void saveResults(HDF5Group root, String key) throws IOException {
        HDF5Group group = root.requireSubgroup(key);

        // Set Python class
        group.setAttribute("_class", getPythonResultClass());

        // Save log
        Properties props = new Properties();
        createLog(props);
        group.setAttribute("log", props.toString());
    }
View Full Code Here

    @Override
    public void saveResults(HDF5Group root, String key) throws IOException {
        super.saveResults(root, key);

        HDF5Group group = root.requireSubgroup(key);

        double normFactor = (double) trajectoryCount;

        String transitionName;
        HDF5Dataset ds;
        double gcf, gbf, gnf;
        double ecf, ebf, enf;
        int[][] emptyData = new int[][] { { 0 } };
        for (XRayTransition transition : accumCharac.getTransitions()) {
            transitionName = transition.getIUPACName();

            ds = group.createDataset(transitionName, emptyData);

            gnf = accumCharac.getGenerated(transition) / normFactor;
            enf = accumCharac.getEmitted(transition) / normFactor;

            gcf = ecf = 0.0;
View Full Code Here

TOP

Related Classes of pymontecarlo.util.hdf5.HDF5Dataset

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.