Example #1
0
 public TreedataFile(HaloTreeProcess _process, string treeFile, string treeIdsFile)
 {
     this.process = _process;
     treeReader = new BinaryReader(new FileStream(treeFile, FileMode.Open));
     treeIdsReader = new BinaryReader(new FileStream(treeIdsFile, FileMode.Open));
     ntrees = treeReader.ReadInt32();
     totnhalos = treeReader.ReadInt32();
     treenhalos = new int[ntrees];
     numtot = 0;
     for(int i =0; i < ntrees; i++)
     {
         treenhalos[i] = treeReader.ReadInt32();
         numtot += treenhalos[i];
     }
     if (numtot != totnhalos)
         DebugOut.PrintLine("numtot != totnhalos: "+numtot+" vs. "+totnhalos);
 }
Example #2
0
        private HaloTreeProcess RefreshHaloTreesProcess()
        {
            HaloTreeProcess process = new HaloTreeProcess(globalParameters);
            // mergertree organised data
            process.inPath = txtHaloTreesSourceDir.Text;
            process.outPath = txtHaloTreesTargetDir.Text;
            process.treesPrefix = txtTreePrefix.Text;
            process.treeIdsPrefix = txtTreeIdsPrefix.Text;

            process.hasMainLeafId = chkMainLeafId.Checked;
            process.haloTreeTable = txtHaloTreeTable.Text;
            process.firstVolume = Int32.Parse(txtFirstVolume.Text);
            process.lastVolume = Int32.Parse(txtLastVolume.Text);
            return process;
        }