From 3eb908640b9a9bb6d7714b5c10c10dd406a7feba Mon Sep 17 00:00:00 2001 From: Alex Gurvich Date: Mon, 6 Jun 2022 13:51:38 -0500 Subject: [PATCH 1/6] replace octree CoM with level of detail (LoD). have flag 'use_lod' to recover CoM behavior --- src/firefly/data_reader/octree.py | 26 ++++++- src/firefly/data_reader/particlegroup.py | 71 +++++++----------- src/firefly/static/js/octree/octreeInit.js | 5 +- .../static/js/octree/octreeRenderLoop.js | 4 +- src/firefly/static/js/viewer/initViewer.js | 72 ++++++++++--------- src/firefly/static/js/viewer/renderLoop.js | 5 +- 6 files changed, 96 insertions(+), 87 deletions(-) diff --git a/src/firefly/data_reader/octree.py b/src/firefly/data_reader/octree.py index 8e212826..d891ccae 100644 --- a/src/firefly/data_reader/octree.py +++ b/src/firefly/data_reader/octree.py @@ -195,7 +195,8 @@ def __repr__(self): def __init__( self, particle_group, - max_npart_per_node=1000): + max_npart_per_node=1000, + use_lod=True): ''' inputFile : path to the file. For now only text files. NMemoryMax : the maximum number of particles to save in the memory before writing to a file @@ -316,6 +317,17 @@ def __init__( max_npart_per_node=max_npart_per_node) } + ## LoD masks should be boolean type, not indices + if use_lod: + self.lod_masks = [] + for lod_dec in [100]: + inds = np.arange(self.coordinates.shape[0]) + np.random.default_rng().shuffle(inds) + mask = np.zeros(self.coordinates.shape[0]) + mask[inds[::lod_dec]] = 1 + self.lod_masks += [mask.astype(bool)] + else: self.lod_masks = [np.zeros(self.coordinates.shape[0],dtype=bool)] + def buildOctree(self,start_octant=''): node = self.nodes[start_octant] @@ -323,7 +335,10 @@ def buildOctree(self,start_octant=''): velocity = None rgba_color = None print(f"Bulding octree of {end:d} points") - for i,(point,fields) in enumerate(zip(self.coordinates,self.fieldss)): + for i,(point,fields) in enumerate(zip( + self.coordinates[~self.lod_masks[0]], + self.fieldss[~self.lod_masks[0]])): + if not (i % 10000): print("%.2f"%(i/end*100)+"%",end='\t') if self.velocities is not None: velocity = self.velocities[i] @@ -335,6 +350,10 @@ def buildOctree(self,start_octant=''): ## if there are any outliers, let's stuff them in the root node self.__store_outliers_in_root() + + ## handle level of detail insertion + if len(self.lod_masks) > 1: raise NotImplementedError("Only base LoD is implemented.") + ## we want the nodelist to be sorted s.t. the highest refinement levels are first ## so that if we decide to prune the tree all children will get added to their parent before ## the parent is itself pruned. we'll do that with a "complex sort" (google it) @@ -553,7 +572,8 @@ def write_octree_json( #'header':flag_dict, ##'node_arrays':node_arrays, 'octree':{}, - 'Coordinates_flat':np.zeros(3*num_nodes) + 'Coordinates_flat':np.zeros(3*num_nodes), + 'use_lod':bool(np.sum(self.lod_masks[0])>0) } if self.velocities is not None: json_dict['Velocities_flat'] = np.zeros(3*num_nodes) diff --git a/src/firefly/data_reader/particlegroup.py b/src/firefly/data_reader/particlegroup.py index 9e8cfb9b..7dfd0011 100644 --- a/src/firefly/data_reader/particlegroup.py +++ b/src/firefly/data_reader/particlegroup.py @@ -83,7 +83,6 @@ def __init__( field_colormap_flags=None, field_radius_flags=None, decimation_factor=1, - filenames_and_nparts=None, attached_settings=None, loud=True, **settings_kwargs): @@ -121,19 +120,6 @@ def __init__( :param decimation_factor: factor by which to reduce the data randomly i.e. :code:`data=data[::decimation_factor]`, defaults to 1 :type decimation_factor: int, optional - :param filenames_and_nparts: Allows you to manually control how the particles - are distributed among the sub-JSON files, it is - **highly recommended that you leave this to** None such that particles are equally - distributed among the :code:`.jsons` but if for whatever reason you need fine-tuning - you should pass a list of tuples in the form - - :code:`[("json_name0.json",nparts_this_file0),("json_name1.json",nparts_this_file1) ... ]` - - where where the sum of :code:`nparts_this_file%d` is exactly :code:`nparts`. These files - will automatically be added to :code:`filenames.json` if you use - an attached :class:`firefly.data_reader.Reader` and - its :class:`~firefly.data_reader.Reader.writeToDisk` method, defaults to None - :type filenames_and_nparts: list of tuple of (str,int), optional :param attached_settings: :class:`~firefly.data_reader.Settings` instance that should be linked to this particle group such that GUI elements are connected correctly. If not provided here can be attached after-the-fact using the @@ -235,19 +221,6 @@ def __init__( self.field_colormap_flags = np.array(field_colormap_flags) self.field_radius_flags = np.array(field_radius_flags) - ## validate filenames and nparts if anyone was so foolhardy to - ## send it in themselves - if filenames_and_nparts is not None: - try: - assert type(filenames_and_nparts[0]) == tuple - assert type(filenames_and_nparts[0][0]) == str - assert type(filenames_and_nparts[0][1]) == int - except AssertionError: - ValueError("filenames_and_nparts should be a list of tuples of strings and ints") - - self.filenames_and_nparts = filenames_and_nparts - - ## TODO how do these interface with javascript code? self.radiusFunction = None self.weightFunction = None @@ -561,7 +534,7 @@ def outputToJSON( if "json" in fname: os.remove(os.path.join(full_path,fname)) - filenames_and_nparts = self.filenames_and_nparts + filenames_and_nparts = [] ## if the user did not specify how we should partition the data between ## sub-JSON files then we'll just do it equally if filenames_and_nparts is None: @@ -644,31 +617,35 @@ def outputToFFLY( self.UIname, max_npart_per_file) ## mimic return signature: file_array, filenames_and_nparts - return [tree_filename],[(tree_filename,num_nodes)] + file_array = [tree_filename] + filenames_and_nparts = [(tree_filename,num_nodes)] - ## shuffle particles and decimate as necessary, save the output in dec_inds - self.getDecimationIndexArray() + ## output the lowest level of detail using code below + if np.sum(self.octree.lod_masks[0]) > 0: self.dec_inds = self.octree.lod_masks[0] + ## don't need to output the lowest level of detail + else: return file_array,filenames_and_nparts + else: + ## shuffle particles and decimate as necessary, save the output in dec_inds + self.getDecimationIndexArray() - filenames_and_nparts = self.filenames_and_nparts - ## if the user did not specify how we should partition the data between - ## sub-JSON files then we'll just do it equally - if filenames_and_nparts is None: - ## determine if we were passed a boolean mask or a index array - if self.dec_inds.dtype == bool: - nparts = np.sum(self.dec_inds) - self.dec_inds = np.argwhere(self.dec_inds) ## convert to an index array - else: nparts = self.dec_inds.shape[0] + filenames_and_nparts = [] + file_array = [] - ## how many sub-files are we going to need? - nfiles = int(nparts/max_npart_per_file + ((nparts%max_npart_per_file)!=0)) + ## determine if we were passed a boolean mask or a index array + if self.dec_inds.dtype == bool: + nparts = np.sum(self.dec_inds) + self.dec_inds = np.argwhere(self.dec_inds) ## convert to an index array + else: nparts = self.dec_inds.shape[0] - ## how many particles will each file have and what are they named? - filenames = [os.path.join(short_data_path,"%s%s%03d.ffly"%(file_prefix,self.UIname,i_file)) for i_file in range(nfiles)] - nparts = [min(max_npart_per_file,nparts-(i_file)*(max_npart_per_file)) for i_file in range(nfiles)] + ## how many sub-files are we going to need? + nfiles = int(nparts/max_npart_per_file + ((nparts%max_npart_per_file)!=0)) - filenames_and_nparts = list(zip(filenames,nparts)) + ## how many particles will each file have and what are they named? + filenames = [os.path.join(short_data_path,"%s%s%03d.ffly"%(file_prefix,self.UIname,i_file)) for i_file in range(nfiles)] + nparts = [min(max_npart_per_file,nparts-(i_file)*(max_npart_per_file)) for i_file in range(nfiles)] + + filenames_and_nparts += list(zip(filenames,nparts)) - file_array = [] ## loop through the sub-files cur_index = 0 diff --git a/src/firefly/static/js/octree/octreeInit.js b/src/firefly/static/js/octree/octreeInit.js index 84056620..d89f1790 100644 --- a/src/firefly/static/js/octree/octreeInit.js +++ b/src/firefly/static/js/octree/octreeInit.js @@ -28,13 +28,16 @@ function initOctree(pkey,data){ // when the octree has "filtered" them out). viewerParams.parts[pkey].IsDrawn = Array(viewerParams.parts[pkey].Coordinates_flat.length/3) + if (data.hasOwnProperty('use_lod') && data.use_lod != null) var use_lod = data.use_lod; + else var use_lod = false; + function initializeNode(node){ // name of this node's mesh, if it's not the the root we'll use // it's octant indices otherwise we'll use the string 'root' node.obj_name = pkey + '-' +(node.name.length != 0 ? node.name : 'root' ) node.current_state = 'draw' - node.com_shown = true; + node.com_shown = !use_lod; node.mesh = null; node.queue = null; //node.buffer_size = 0; diff --git a/src/firefly/static/js/octree/octreeRenderLoop.js b/src/firefly/static/js/octree/octreeRenderLoop.js index 180035b3..5d6ac0d5 100644 --- a/src/firefly/static/js/octree/octreeRenderLoop.js +++ b/src/firefly/static/js/octree/octreeRenderLoop.js @@ -192,7 +192,7 @@ function checkTooBig(node_angle_deg,threshold=1){ } function hideCoM(node){ - if (!node.com_shown) return; + if (!node.com_shown || viewerParams.parts[node.pkey].octree.use_lod) return; node.com_shown = false; mesh = viewerParams.partsMesh[node.pkey][0]; if (node.octbox) node.octbox.visible = false; @@ -205,7 +205,7 @@ function hideCoM(node){ } function showCoM(node){ - if (node.com_shown) return; + if (node.com_shown || viewerParams.parts[node.pkey].octree.use_lod) return; node.com_shown = true; mesh = viewerParams.partsMesh[node.pkey][0]; if (node.octbox) node.octbox.visible = true; diff --git a/src/firefly/static/js/viewer/initViewer.js b/src/firefly/static/js/viewer/initViewer.js index 768c364a..ada3e105 100644 --- a/src/firefly/static/js/viewer/initViewer.js +++ b/src/firefly/static/js/viewer/initViewer.js @@ -1238,7 +1238,7 @@ function loadData(callback, prefix="", internalData=null, initialLoadFrac=0){ // which reference .fftree files. Those are loaded // separately on demand.) if (readf.toLowerCase().includes('.json')){ - //console.log(prefix+readf) + console.log(prefix+readf) d3.json(prefix+readf, function(foo) { compileJSONData(foo, p, callback, initialLoadFrac); }); @@ -1257,46 +1257,52 @@ function loadData(callback, prefix="", internalData=null, initialLoadFrac=0){ // callCompileData -> function compileJSONData(data, p, callback, initialLoadFrac=0){ - // handle backwards compatability, multi dimensional arrays were flattened in later - // versions of firefly - ['Coordinates','Velocities'].forEach(function (key){ - if (data.hasOwnProperty(key) && !data.hasOwnProperty(key+'_flat')){ + + // did we just load an octree.json file? let's initialize the octree then. + if (data.hasOwnProperty('use_lod') && data.use_lod) initOctree(p,data); + else { + + // handle backwards compatability, multi dimensional arrays were flattened in later + // versions of firefly + ['Coordinates','Velocities'].forEach(function (key){ + if (data.hasOwnProperty(key) && !data.hasOwnProperty(key+'_flat')){ + data[key+'_flat'] = Array(3*data[key].length); + for (var i=0; i Date: Mon, 6 Jun 2022 18:03:37 -0500 Subject: [PATCH 4/6] don't try and set octree radii if we're not going to use it. --- src/firefly/static/js/octree/octreeInit.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/firefly/static/js/octree/octreeInit.js b/src/firefly/static/js/octree/octreeInit.js index d89f1790..7721efce 100644 --- a/src/firefly/static/js/octree/octreeInit.js +++ b/src/firefly/static/js/octree/octreeInit.js @@ -20,17 +20,15 @@ function initOctree(pkey,data){ //this will be used as a percentage value in the GUI viewerParams.plotNmax[pkey] = 100; + if (data.hasOwnProperty('use_lod') && data.use_lod != null) var use_lod = data.use_lod; + else var use_lod = false; // enable radius rescaling to scale the center of mass particles differentially //viewerParams.parts[pkey].doSPH = true - viewerParams.parts[pkey].OctreeRadii = Array(viewerParams.parts[pkey].Coordinates_flat.length/3) + if (!use_lod) viewerParams.parts[pkey].OctreeRadii = Array(viewerParams.parts[pkey].Coordinates_flat.length/3) // array that prevents filtering from changing the size of nodes that aren't drawn (i.e. showing them // when the octree has "filtered" them out). - viewerParams.parts[pkey].IsDrawn = Array(viewerParams.parts[pkey].Coordinates_flat.length/3) - - if (data.hasOwnProperty('use_lod') && data.use_lod != null) var use_lod = data.use_lod; - else var use_lod = false; - + if (!use_lod) viewerParams.parts[pkey].IsDrawn = Array(viewerParams.parts[pkey].Coordinates_flat.length/3) function initializeNode(node){ // name of this node's mesh, if it's not the the root we'll use @@ -51,7 +49,7 @@ function initOctree(pkey,data){ node.pkey = pkey; node.radius = node.radius; - viewerParams.parts[pkey].OctreeRadii[node.node_index] = node.radius; + if (!use_lod) viewerParams.parts[pkey].OctreeRadii[node.node_index] = node.radius; // TODO not sure if these are still necessary post-octree-refactor node.NparticlesToRender = node.buffer_size; From 0075990f0200349a9b520fe9574d217e1e7296be Mon Sep 17 00:00:00 2001 From: Alex Gurvich Date: Mon, 6 Jun 2022 18:20:52 -0500 Subject: [PATCH 5/6] was missing some meta-information about the octree after adding it in (octree_use_lod and octree_field_names) we have liftoff! --- src/firefly/static/js/octree/octreeInit.js | 2 +- src/firefly/static/js/octree/octreeRenderLoop.js | 4 ++-- src/firefly/static/js/viewer/initViewer.js | 8 ++++++-- src/firefly/static/js/viewer/renderLoop.js | 4 ++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/firefly/static/js/octree/octreeInit.js b/src/firefly/static/js/octree/octreeInit.js index 7721efce..8fe842a9 100644 --- a/src/firefly/static/js/octree/octreeInit.js +++ b/src/firefly/static/js/octree/octreeInit.js @@ -109,7 +109,7 @@ function compileFFTREEData(kaitai_format,node,callback){ node.particles.rgbaColors_flat = kaitai_format.node.rgbaColorsFlat.flatVector4Data.data.values; } - field_names = viewerParams.parts[node.pkey].field_names; + field_names = viewerParams.parts[node.pkey].octree_field_names; // and now load the scalar field data for (i=0; i < kaitai_format.octnodeHeader.nfields; i++){ node.particles[field_names[i]] = kaitai_format.node.scalarFields[i].fieldData.data.values; diff --git a/src/firefly/static/js/octree/octreeRenderLoop.js b/src/firefly/static/js/octree/octreeRenderLoop.js index 5d6ac0d5..6db533cd 100644 --- a/src/firefly/static/js/octree/octreeRenderLoop.js +++ b/src/firefly/static/js/octree/octreeRenderLoop.js @@ -192,7 +192,7 @@ function checkTooBig(node_angle_deg,threshold=1){ } function hideCoM(node){ - if (!node.com_shown || viewerParams.parts[node.pkey].octree.use_lod) return; + if (!node.com_shown || viewerParams.parts[node.pkey].octree_use_lod) return; node.com_shown = false; mesh = viewerParams.partsMesh[node.pkey][0]; if (node.octbox) node.octbox.visible = false; @@ -205,7 +205,7 @@ function hideCoM(node){ } function showCoM(node){ - if (node.com_shown || viewerParams.parts[node.pkey].octree.use_lod) return; + if (node.com_shown || viewerParams.parts[node.pkey].octree_use_lod) return; node.com_shown = true; mesh = viewerParams.partsMesh[node.pkey][0]; if (node.octbox) node.octbox.visible = true; diff --git a/src/firefly/static/js/viewer/initViewer.js b/src/firefly/static/js/viewer/initViewer.js index ada3e105..699c5a16 100644 --- a/src/firefly/static/js/viewer/initViewer.js +++ b/src/firefly/static/js/viewer/initViewer.js @@ -1238,7 +1238,6 @@ function loadData(callback, prefix="", internalData=null, initialLoadFrac=0){ // which reference .fftree files. Those are loaded // separately on demand.) if (readf.toLowerCase().includes('.json')){ - console.log(prefix+readf) d3.json(prefix+readf, function(foo) { compileJSONData(foo, p, callback, initialLoadFrac); }); @@ -1259,7 +1258,12 @@ function loadData(callback, prefix="", internalData=null, initialLoadFrac=0){ function compileJSONData(data, p, callback, initialLoadFrac=0){ // did we just load an octree.json file? let's initialize the octree then. - if (data.hasOwnProperty('use_lod') && data.use_lod) initOctree(p,data); + if (data.hasOwnProperty('use_lod') && data.use_lod){ + initOctree(p,data); + viewerParams.parts[p].octree = data.octree; + viewerParams.parts[p].octree_use_lod = data.use_lod; + viewerParams.parts[p].octree_field_names = data.field_names; + } else { // handle backwards compatability, multi dimensional arrays were flattened in later diff --git a/src/firefly/static/js/viewer/renderLoop.js b/src/firefly/static/js/viewer/renderLoop.js index c996ec71..0b51763d 100644 --- a/src/firefly/static/js/viewer/renderLoop.js +++ b/src/firefly/static/js/viewer/renderLoop.js @@ -176,8 +176,8 @@ function update_particle_groups(time){ // hide all octree com nodes at the start if (viewerParams.parts[p].hasOwnProperty('octree') && viewerParams.parts[p].octree != null && - viewerParams.parts[p].octree.hasOwnProperty('use_lod') && - !viewerParams.parts[p].octree.use_lod && + viewerParams.parts[p].hasOwnProperty('octree_use_lod') && + !viewerParams.parts[p].octree_use_lod && (!viewerParams.parts[p].hasOwnProperty('octree_init') || !viewerParams.parts[p].octree_init)){ evaluateFunctionOnOctreeNodes( hideCoM, From 9bcc04c8dd161e15fbb7731b88fd24fd64e04316 Mon Sep 17 00:00:00 2001 From: Alex Gurvich Date: Mon, 6 Jun 2022 22:24:29 -0500 Subject: [PATCH 6/6] 1-level LoD working but the particles are too small. we've reached a crossroads and i need to decide if i totally rewrite the octree implementation on the javascript side or try and forget the cursed knowledge i have --- src/firefly/ntbks/octree_test.ipynb | 121 +++++++++++++++------ src/firefly/static/js/viewer/renderLoop.js | 2 +- 2 files changed, 87 insertions(+), 36 deletions(-) diff --git a/src/firefly/ntbks/octree_test.ipynb b/src/firefly/ntbks/octree_test.ipynb index 952f679a..d429ac91 100644 --- a/src/firefly/ntbks/octree_test.ipynb +++ b/src/firefly/ntbks/octree_test.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 8, + "execution_count": 1, "id": "cf859df9-5d4c-4be6-a04a-ab4ab0b824b6", "metadata": {}, "outputs": [ @@ -10,8 +10,8 @@ "name": "stdout", "output_type": "stream", "text": [ - "The autoreload extension is already loaded. To reload it, use:\n", - " %reload_ext autoreload\n", + "palettable colormaps are not installed\n", + "don't have phil's colormaps\n", "Couldn't find a metadata file... for\n", " Metadata object at /Users/agurvich/scratch/data/metal_diffusion/m12b_res57000/metadata/meta_Galaxy_600.hdf5\n", "Tracing the rockstar halo files with fancy:True and None Gyr smoothing.\n", @@ -37,7 +37,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 2, "id": "2f450661-d4cd-40ff-9377-ce4ef8073138", "metadata": {}, "outputs": [ @@ -47,10 +47,20 @@ "text": [ "JSONdir is None, defaulting to /Users/agurvich/research/repos/firefly/src/firefly/static/data/Data\n", "Loading ptype 4\n", - "Make sure each field_array (2) has a field_radius_flag (0), assuming False.\n", - "Loading ptype 0\n", - "Make sure each field_array (2) has a field_radius_flag (0), assuming False.\n" + "Loading ptype 0\n" ] + }, + { + "data": { + "text/plain": [ + "array([PartType0 - 6225729/6225729 particles - 3 tracked fields,\n", + " PartType4 - 3264723/3264723 particles - 3 tracked fields],\n", + " dtype=object)" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ @@ -59,18 +69,17 @@ " galaxy.snapdir,\n", " galaxy.snapnum,\n", " ptypes=[0,4],\n", - " decimation_factors = [10,10],\n", + " decimation_factors = [1,1],\n", " fields = ['Temperature','Masses','AgeGyr'],\n", " logFlags = [1,0,0],\n", " clean_JSONdir=True,\n", " write_startup=True)\n", - "reader.loadData(com=center)\n", - "reader.settings['showFPS'] = True" + "reader.loadData(com=center)" ] }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 3, "id": "5b4dd604-baac-4702-b8ab-9195f330c1dc", "metadata": {}, "outputs": [ @@ -81,7 +90,7 @@ " '/Users/agurvich/research/repos/firefly/src/firefly/static/data/Data/DataSettings.json')" ] }, - "execution_count": 16, + "execution_count": 3, "metadata": {}, "output_type": "execute_result" } @@ -97,7 +106,7 @@ }, { "cell_type": "code", - "execution_count": 152, + "execution_count": 4, "id": "146504d4-5800-496a-8e61-423b81a03e79", "metadata": {}, "outputs": [ @@ -105,31 +114,44 @@ "name": "stdout", "output_type": "stream", "text": [ - "Bulding octree of 6225729 points\n", - "0.00%\t0.16%\t0.32%\t0.48%\t0.64%\t0.80%\t0.96%\t1.12%\t1.28%\t1.45%\t1.61%\t1.77%\t1.93%\t2.09%\t2.25%\t2.41%\t2.57%\t2.73%\t2.89%\t3.05%\t3.21%\t3.37%\t3.53%\t3.69%\t3.85%\t4.02%\t4.18%\t4.34%\t4.50%\t4.66%\t4.82%\t4.98%\t5.14%\t5.30%\t5.46%\t5.62%\t5.78%\t5.94%\t6.10%\t6.26%\t6.42%\t6.59%\t6.75%\t6.91%\t7.07%\t7.23%\t7.39%\t7.55%\t7.71%\t7.87%\t8.03%\t8.19%\t8.35%\t8.51%\t8.67%\t8.83%\t8.99%\t9.16%\t9.32%\t9.48%\t9.64%\t9.80%\t9.96%\t10.12%\t10.28%\t10.44%\t10.60%\t10.76%\t10.92%\t11.08%\t11.24%\t11.40%\t11.56%\t11.73%\t11.89%\t12.05%\t12.21%\t12.37%\t12.53%\t12.69%\t12.85%\t13.01%\t13.17%\t13.33%\t13.49%\t13.65%\t13.81%\t13.97%\t14.13%\t14.30%\t14.46%\t14.62%\t14.78%\t14.94%\t15.10%\t15.26%\t15.42%\t15.58%\t15.74%\t15.90%\t16.06%\t16.22%\t16.38%\t16.54%\t16.70%\t16.87%\t17.03%\t17.19%\t17.35%\t17.51%\t17.67%\t17.83%\t17.99%\t18.15%\t18.31%\t18.47%\t18.63%\t18.79%\t18.95%\t19.11%\t19.27%\t19.44%\t19.60%\t19.76%\t19.92%\t20.08%\t20.24%\t20.40%\t20.56%\t20.72%\t20.88%\t21.04%\t21.20%\t21.36%\t21.52%\t21.68%\t21.84%\t22.01%\t22.17%\t22.33%\t22.49%\t22.65%\t22.81%\t22.97%\t23.13%\t23.29%\t23.45%\t23.61%\t23.77%\t23.93%\t24.09%\t24.25%\t24.41%\t24.58%\t24.74%\t24.90%\t25.06%\t25.22%\t25.38%\t25.54%\t25.70%\t25.86%\t26.02%\t26.18%\t26.34%\t26.50%\t26.66%\t26.82%\t26.98%\t27.15%\t27.31%\t27.47%\t27.63%\t27.79%\t27.95%\t28.11%\t28.27%\t28.43%\t28.59%\t28.75%\t28.91%\t29.07%\t29.23%\t29.39%\t29.55%\t29.72%\t29.88%\t30.04%\t30.20%\t30.36%\t30.52%\t30.68%\t30.84%\t31.00%\t31.16%\t31.32%\t31.48%\t31.64%\t31.80%\t31.96%\t32.12%\t32.29%\t32.45%\t32.61%\t32.77%\t32.93%\t33.09%\t33.25%\t33.41%\t33.57%\t33.73%\t33.89%\t34.05%\t34.21%\t34.37%\t34.53%\t34.69%\t34.86%\t35.02%\t35.18%\t35.34%\t35.50%\t35.66%\t35.82%\t35.98%\t36.14%\t36.30%\t36.46%\t36.62%\t36.78%\t36.94%\t37.10%\t37.26%\t37.43%\t37.59%\t37.75%\t37.91%\t38.07%\t38.23%\t38.39%\t38.55%\t38.71%\t38.87%\t39.03%\t39.19%\t39.35%\t39.51%\t39.67%\t39.83%\t40.00%\t40.16%\t40.32%\t40.48%\t40.64%\t40.80%\t40.96%\t41.12%\t41.28%\t41.44%\t41.60%\t41.76%\t41.92%\t42.08%\t42.24%\t42.40%\t42.57%\t42.73%\t42.89%\t43.05%\t43.21%\t43.37%\t43.53%\t43.69%\t43.85%\t44.01%\t44.17%\t44.33%\t44.49%\t44.65%\t44.81%\t44.97%\t45.14%\t45.30%\t45.46%\t45.62%\t45.78%\t45.94%\t46.10%\t46.26%\t46.42%\t46.58%\t46.74%\t46.90%\t47.06%\t47.22%\t47.38%\t47.54%\t47.71%\t47.87%\t48.03%\t48.19%\t48.35%\t48.51%\t48.67%\t48.83%\t48.99%\t49.15%\t49.31%\t49.47%\t49.63%\t49.79%\t49.95%\t50.11%\t50.28%\t50.44%\t50.60%\t50.76%\t50.92%\t51.08%\t51.24%\t51.40%\t51.56%\t51.72%\t51.88%\t52.04%\t52.20%\t52.36%\t52.52%\t52.68%\t52.85%\t53.01%\t53.17%\t53.33%\t53.49%\t53.65%\t53.81%\t53.97%\t54.13%\t54.29%\t54.45%\t54.61%\t54.77%\t54.93%\t55.09%\t55.25%\t55.42%\t55.58%\t55.74%\t55.90%\t56.06%\t56.22%\t56.38%\t56.54%\t56.70%\t56.86%\t57.02%\t57.18%\t57.34%\t57.50%\t57.66%\t57.82%\t57.99%\t58.15%\t58.31%\t58.47%\t58.63%\t58.79%\t58.95%\t59.11%\t59.27%\t59.43%\t59.59%\t59.75%\t59.91%\t60.07%\t60.23%\t60.39%\t60.56%\t60.72%\t60.88%\t61.04%\t61.20%\t61.36%\t61.52%\t61.68%\t61.84%\t62.00%\t62.16%\t62.32%\t62.48%\t62.64%\t62.80%\t62.96%\t63.13%\t63.29%\t63.45%\t63.61%\t63.77%\t63.93%\t64.09%\t64.25%\t64.41%\t64.57%\t64.73%\t64.89%\t65.05%\t65.21%\t65.37%\t65.53%\t65.70%\t65.86%\t66.02%\t66.18%\t66.34%\t66.50%\t66.66%\t66.82%\t66.98%\t67.14%\t67.30%\t67.46%\t67.62%\t67.78%\t67.94%\t68.10%\t68.27%\t68.43%\t68.59%\t68.75%\t68.91%\t69.07%\t69.23%\t69.39%\t69.55%\t69.71%\t69.87%\t70.03%\t70.19%\t70.35%\t70.51%\t70.67%\t70.84%\t71.00%\t71.16%\t71.32%\t71.48%\t71.64%\t71.80%\t71.96%\t72.12%\t72.28%\t72.44%\t72.60%\t72.76%\t72.92%\t73.08%\t73.24%\t73.41%\t73.57%\t73.73%\t73.89%\t74.05%\t74.21%\t74.37%\t74.53%\t74.69%\t74.85%\t75.01%\t75.17%\t75.33%\t75.49%\t75.65%\t75.81%\t75.98%\t76.14%\t76.30%\t76.46%\t76.62%\t76.78%\t76.94%\t77.10%\t77.26%\t77.42%\t77.58%\t77.74%\t77.90%\t78.06%\t78.22%\t78.38%\t78.55%\t78.71%\t78.87%\t79.03%\t79.19%\t79.35%\t79.51%\t79.67%\t79.83%\t79.99%\t80.15%\t80.31%\t80.47%\t80.63%\t80.79%\t80.95%\t81.11%\t81.28%\t81.44%\t81.60%\t81.76%\t81.92%\t82.08%\t82.24%\t82.40%\t82.56%\t82.72%\t82.88%\t83.04%\t83.20%\t83.36%\t83.52%\t83.68%\t83.85%\t84.01%\t84.17%\t84.33%\t84.49%\t84.65%\t84.81%\t84.97%\t85.13%\t85.29%\t85.45%\t85.61%\t85.77%\t85.93%\t86.09%\t86.25%\t86.42%\t86.58%\t86.74%\t86.90%\t87.06%\t87.22%\t87.38%\t87.54%\t87.70%\t87.86%\t88.02%\t88.18%\t88.34%\t88.50%\t88.66%\t88.82%\t88.99%\t89.15%\t89.31%\t89.47%\t89.63%\t89.79%\t89.95%\t90.11%\t90.27%\t90.43%\t90.59%\t90.75%\t90.91%\t91.07%\t91.23%\t91.39%\t91.56%\t91.72%\t91.88%\t92.04%\t92.20%\t92.36%\t92.52%\t92.68%\t92.84%\t93.00%\t93.16%\t93.32%\t93.48%\t93.64%\t93.80%\t93.96%\t94.13%\t94.29%\t94.45%\t94.61%\t94.77%\t94.93%\t95.09%\t95.25%\t95.41%\t95.57%\t95.73%\t95.89%\t96.05%\t96.21%\t96.37%\t96.53%\t96.70%\t96.86%\t97.02%\t97.18%\t97.34%\t97.50%\t97.66%\t97.82%\t97.98%\t98.14%\t98.30%\t98.46%\t98.62%\t98.78%\t98.94%\t99.10%\t99.27%\t99.43%\t99.59%\t99.75%\t99.91%\t0 1\t100 2378\t200 6004\tBulding octree of 3264723 points\n", - "0.00%\t0.31%\t0.61%\t0.92%\t1.23%\t1.53%\t1.84%\t2.14%\t2.45%\t2.76%\t3.06%\t3.37%\t3.68%\t3.98%\t4.29%\t4.59%\t4.90%\t5.21%\t5.51%\t5.82%\t6.13%\t6.43%\t6.74%\t7.05%\t7.35%\t7.66%\t7.96%\t8.27%\t8.58%\t8.88%\t9.19%\t9.50%\t9.80%\t10.11%\t10.41%\t10.72%\t11.03%\t11.33%\t11.64%\t11.95%\t12.25%\t12.56%\t12.86%\t13.17%\t13.48%\t13.78%\t14.09%\t14.40%\t14.70%\t15.01%\t15.32%\t15.62%\t15.93%\t16.23%\t16.54%\t16.85%\t17.15%\t17.46%\t17.77%\t18.07%\t18.38%\t18.68%\t18.99%\t19.30%\t19.60%\t19.91%\t20.22%\t20.52%\t20.83%\t21.14%\t21.44%\t21.75%\t22.05%\t22.36%\t22.67%\t22.97%\t23.28%\t23.59%\t23.89%\t24.20%\t24.50%\t24.81%\t25.12%\t25.42%\t25.73%\t26.04%\t26.34%\t26.65%\t26.95%\t27.26%\t27.57%\t27.87%\t28.18%\t28.49%\t28.79%\t29.10%\t29.41%\t29.71%\t30.02%\t30.32%\t30.63%\t30.94%\t31.24%\t31.55%\t31.86%\t32.16%\t32.47%\t32.77%\t33.08%\t33.39%\t33.69%\t34.00%\t34.31%\t34.61%\t34.92%\t35.23%\t35.53%\t35.84%\t36.14%\t36.45%\t36.76%\t37.06%\t37.37%\t37.68%\t37.98%\t38.29%\t38.59%\t38.90%\t39.21%\t39.51%\t39.82%\t40.13%\t40.43%\t40.74%\t41.04%\t41.35%\t41.66%\t41.96%\t42.27%\t42.58%\t42.88%\t43.19%\t43.50%\t43.80%\t44.11%\t44.41%\t44.72%\t45.03%\t45.33%\t45.64%\t45.95%\t46.25%\t46.56%\t46.86%\t47.17%\t47.48%\t47.78%\t48.09%\t48.40%\t48.70%\t49.01%\t49.32%\t49.62%\t49.93%\t50.23%\t50.54%\t50.85%\t51.15%\t51.46%\t51.77%\t52.07%\t52.38%\t52.68%\t52.99%\t53.30%\t53.60%\t53.91%\t54.22%\t54.52%\t54.83%\t55.13%\t55.44%\t55.75%\t56.05%\t56.36%\t56.67%\t56.97%\t57.28%\t57.59%\t57.89%\t58.20%\t58.50%\t58.81%\t59.12%\t59.42%\t59.73%\t60.04%\t60.34%\t60.65%\t60.95%\t61.26%\t61.57%\t61.87%\t62.18%\t62.49%\t62.79%\t63.10%\t63.41%\t63.71%\t64.02%\t64.32%\t64.63%\t64.94%\t65.24%\t65.55%\t65.86%\t66.16%\t66.47%\t66.77%\t67.08%\t67.39%\t67.69%\t68.00%\t68.31%\t68.61%\t68.92%\t69.22%\t69.53%\t69.84%\t70.14%\t70.45%\t70.76%\t71.06%\t71.37%\t71.68%\t71.98%\t72.29%\t72.59%\t72.90%\t73.21%\t73.51%\t73.82%\t74.13%\t74.43%\t74.74%\t75.04%\t75.35%\t75.66%\t75.96%\t76.27%\t76.58%\t76.88%\t77.19%\t77.50%\t77.80%\t78.11%\t78.41%\t78.72%\t79.03%\t79.33%\t79.64%\t79.95%\t80.25%\t80.56%\t80.86%\t81.17%\t81.48%\t81.78%\t82.09%\t82.40%\t82.70%\t83.01%\t83.31%\t83.62%\t83.93%\t84.23%\t84.54%\t84.85%\t85.15%\t85.46%\t85.77%\t86.07%\t86.38%\t86.68%\t86.99%\t87.30%\t87.60%\t87.91%\t88.22%\t88.52%\t88.83%\t89.13%\t89.44%\t89.75%\t90.05%\t90.36%\t90.67%\t90.97%\t91.28%\t91.59%\t91.89%\t92.20%\t92.50%\t92.81%\t93.12%\t93.42%\t93.73%\t94.04%\t94.34%\t94.65%\t94.95%\t95.26%\t95.57%\t95.87%\t96.18%\t96.49%\t96.79%\t97.10%\t97.40%\t97.71%\t98.02%\t98.32%\t98.63%\t98.94%\t99.24%\t99.55%\t99.86%\t0 1\t100 10\t200 24\t300 71\t400 439\t500 2279\t600 5779\t" + "Bulding octree of 6223874 points\n", + "0.00%\t0.16%\t0.32%\t0.48%\t0.64%\t0.80%\t0.96%\t1.12%\t1.29%\t1.45%\t1.61%\t1.77%\t1.93%\t2.09%\t2.25%\t2.41%\t2.57%\t2.73%\t2.89%\t3.05%\t3.21%\t3.37%\t3.53%\t3.70%\t3.86%\t4.02%\t4.18%\t4.34%\t4.50%\t4.66%\t4.82%\t4.98%\t5.14%\t5.30%\t5.46%\t5.62%\t5.78%\t5.94%\t6.11%\t6.27%\t6.43%\t6.59%\t6.75%\t6.91%\t7.07%\t7.23%\t7.39%\t7.55%\t7.71%\t7.87%\t8.03%\t8.19%\t8.35%\t8.52%\t8.68%\t8.84%\t9.00%\t9.16%\t9.32%\t9.48%\t9.64%\t9.80%\t9.96%\t10.12%\t10.28%\t10.44%\t10.60%\t10.76%\t10.93%\t11.09%\t11.25%\t11.41%\t11.57%\t11.73%\t11.89%\t12.05%\t12.21%\t12.37%\t12.53%\t12.69%\t12.85%\t13.01%\t13.18%\t13.34%\t13.50%\t13.66%\t13.82%\t13.98%\t14.14%\t14.30%\t14.46%\t14.62%\t14.78%\t14.94%\t15.10%\t15.26%\t15.42%\t15.59%\t15.75%\t15.91%\t16.07%\t16.23%\t16.39%\t16.55%\t16.71%\t16.87%\t17.03%\t17.19%\t17.35%\t17.51%\t17.67%\t17.83%\t18.00%\t18.16%\t18.32%\t18.48%\t18.64%\t18.80%\t18.96%\t19.12%\t19.28%\t19.44%\t19.60%\t19.76%\t19.92%\t20.08%\t20.24%\t20.41%\t20.57%\t20.73%\t20.89%\t21.05%\t21.21%\t21.37%\t21.53%\t21.69%\t21.85%\t22.01%\t22.17%\t22.33%\t22.49%\t22.65%\t22.82%\t22.98%\t23.14%\t23.30%\t23.46%\t23.62%\t23.78%\t23.94%\t24.10%\t24.26%\t24.42%\t24.58%\t24.74%\t24.90%\t25.06%\t25.23%\t25.39%\t25.55%\t25.71%\t25.87%\t26.03%\t26.19%\t26.35%\t26.51%\t26.67%\t26.83%\t26.99%\t27.15%\t27.31%\t27.47%\t27.64%\t27.80%\t27.96%\t28.12%\t28.28%\t28.44%\t28.60%\t28.76%\t28.92%\t29.08%\t29.24%\t29.40%\t29.56%\t29.72%\t29.88%\t30.05%\t30.21%\t30.37%\t30.53%\t30.69%\t30.85%\t31.01%\t31.17%\t31.33%\t31.49%\t31.65%\t31.81%\t31.97%\t32.13%\t32.29%\t32.46%\t32.62%\t32.78%\t32.94%\t33.10%\t33.26%\t33.42%\t33.58%\t33.74%\t33.90%\t34.06%\t34.22%\t34.38%\t34.54%\t34.71%\t34.87%\t35.03%\t35.19%\t35.35%\t35.51%\t35.67%\t35.83%\t35.99%\t36.15%\t36.31%\t36.47%\t36.63%\t36.79%\t36.95%\t37.12%\t37.28%\t37.44%\t37.60%\t37.76%\t37.92%\t38.08%\t38.24%\t38.40%\t38.56%\t38.72%\t38.88%\t39.04%\t39.20%\t39.36%\t39.53%\t39.69%\t39.85%\t40.01%\t40.17%\t40.33%\t40.49%\t40.65%\t40.81%\t40.97%\t41.13%\t41.29%\t41.45%\t41.61%\t41.77%\t41.94%\t42.10%\t42.26%\t42.42%\t42.58%\t42.74%\t42.90%\t43.06%\t43.22%\t43.38%\t43.54%\t43.70%\t43.86%\t44.02%\t44.18%\t44.35%\t44.51%\t44.67%\t44.83%\t44.99%\t45.15%\t45.31%\t45.47%\t45.63%\t45.79%\t45.95%\t46.11%\t46.27%\t46.43%\t46.59%\t46.76%\t46.92%\t47.08%\t47.24%\t47.40%\t47.56%\t47.72%\t47.88%\t48.04%\t48.20%\t48.36%\t48.52%\t48.68%\t48.84%\t49.00%\t49.17%\t49.33%\t49.49%\t49.65%\t49.81%\t49.97%\t50.13%\t50.29%\t50.45%\t50.61%\t50.77%\t50.93%\t51.09%\t51.25%\t51.41%\t51.58%\t51.74%\t51.90%\t52.06%\t52.22%\t52.38%\t52.54%\t52.70%\t52.86%\t53.02%\t53.18%\t53.34%\t53.50%\t53.66%\t53.82%\t53.99%\t54.15%\t54.31%\t54.47%\t54.63%\t54.79%\t54.95%\t55.11%\t55.27%\t55.43%\t55.59%\t55.75%\t55.91%\t56.07%\t56.24%\t56.40%\t56.56%\t56.72%\t56.88%\t57.04%\t57.20%\t57.36%\t57.52%\t57.68%\t57.84%\t58.00%\t58.16%\t58.32%\t58.48%\t58.65%\t58.81%\t58.97%\t59.13%\t59.29%\t59.45%\t59.61%\t59.77%\t59.93%\t60.09%\t60.25%\t60.41%\t60.57%\t60.73%\t60.89%\t61.06%\t61.22%\t61.38%\t61.54%\t61.70%\t61.86%\t62.02%\t62.18%\t62.34%\t62.50%\t62.66%\t62.82%\t62.98%\t63.14%\t63.30%\t63.47%\t63.63%\t63.79%\t63.95%\t64.11%\t64.27%\t64.43%\t64.59%\t64.75%\t64.91%\t65.07%\t65.23%\t65.39%\t65.55%\t65.71%\t65.88%\t66.04%\t66.20%\t66.36%\t66.52%\t66.68%\t66.84%\t67.00%\t67.16%\t67.32%\t67.48%\t67.64%\t67.80%\t67.96%\t68.12%\t68.29%\t68.45%\t68.61%\t68.77%\t68.93%\t69.09%\t69.25%\t69.41%\t69.57%\t69.73%\t69.89%\t70.05%\t70.21%\t70.37%\t70.53%\t70.70%\t70.86%\t71.02%\t71.18%\t71.34%\t71.50%\t71.66%\t71.82%\t71.98%\t72.14%\t72.30%\t72.46%\t72.62%\t72.78%\t72.94%\t73.11%\t73.27%\t73.43%\t73.59%\t73.75%\t73.91%\t74.07%\t74.23%\t74.39%\t74.55%\t74.71%\t74.87%\t75.03%\t75.19%\t75.35%\t75.52%\t75.68%\t75.84%\t76.00%\t76.16%\t76.32%\t76.48%\t76.64%\t76.80%\t76.96%\t77.12%\t77.28%\t77.44%\t77.60%\t77.77%\t77.93%\t78.09%\t78.25%\t78.41%\t78.57%\t78.73%\t78.89%\t79.05%\t79.21%\t79.37%\t79.53%\t79.69%\t79.85%\t80.01%\t80.18%\t80.34%\t80.50%\t80.66%\t80.82%\t80.98%\t81.14%\t81.30%\t81.46%\t81.62%\t81.78%\t81.94%\t82.10%\t82.26%\t82.42%\t82.59%\t82.75%\t82.91%\t83.07%\t83.23%\t83.39%\t83.55%\t83.71%\t83.87%\t84.03%\t84.19%\t84.35%\t84.51%\t84.67%\t84.83%\t85.00%\t85.16%\t85.32%\t85.48%\t85.64%\t85.80%\t85.96%\t86.12%\t86.28%\t86.44%\t86.60%\t86.76%\t86.92%\t87.08%\t87.24%\t87.41%\t87.57%\t87.73%\t87.89%\t88.05%\t88.21%\t88.37%\t88.53%\t88.69%\t88.85%\t89.01%\t89.17%\t89.33%\t89.49%\t89.65%\t89.82%\t89.98%\t90.14%\t90.30%\t90.46%\t90.62%\t90.78%\t90.94%\t91.10%\t91.26%\t91.42%\t91.58%\t91.74%\t91.90%\t92.06%\t92.23%\t92.39%\t92.55%\t92.71%\t92.87%\t93.03%\t93.19%\t93.35%\t93.51%\t93.67%\t93.83%\t93.99%\t94.15%\t94.31%\t94.47%\t94.64%\t94.80%\t94.96%\t95.12%\t95.28%\t95.44%\t95.60%\t95.76%\t95.92%\t96.08%\t96.24%\t96.40%\t96.56%\t96.72%\t96.88%\t97.05%\t97.21%\t97.37%\t97.53%\t97.69%\t97.85%\t98.01%\t98.17%\t98.33%\t98.49%\t98.65%\t98.81%\t98.97%\t...done!\n", + "adding 1855 'outliers' to root node's buffer.\n", + "0 11\t100 3264\t200 7420\t" ] } ], "source": [ - "reader.createOctrees([True,True],npart_min_node=1e4,npart_max_node=1e5)" + "reader.createOctrees([True,False],npart_min_node=1e4,npart_max_node=1e5)" ] }, { "cell_type": "code", - "execution_count": 17, - "id": "850ec52e-2fcc-4945-8c9e-4632612cc9d3", - "metadata": { - "tags": [] - }, + "execution_count": null, + "id": "066698fc-a3f8-4183-8cc5-e94b74ebd35d", + "metadata": {}, "outputs": [], - "source": [ - "reader.max_npart_per_file = 1e5" - ] + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c585e662-1f21-444b-b8e6-6bcb5b4cbc04", + "metadata": {}, + "outputs": [], + "source": [] }, { "cell_type": "code", - "execution_count": 18, + "execution_count": null, + "id": "76db71c6-5b5d-4032-8e77-09862ad6687d", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 5, "id": "8f18867b-adb2-48f6-ba84-bfe11d121601", "metadata": {}, "outputs": [ @@ -137,7 +159,8 @@ "name": "stdout", "output_type": "stream", "text": [ - "Removing old ffly files from /Users/agurvich/research/repos/firefly/src/firefly/static/data/Data\n" + "Writing aggregate/meta data to octree.json\n", + "0.00% <>\t1.27% <4>\t2.53% <0>\t3.80% <344>\t5.06% <52>\t6.33% <7>\t7.59% <2>\t8.86% <077>\t10.13% <166>\t11.39% <3444>\t12.66% <437>\t13.92% <5222>\t15.19% <7000>\t16.46% <34444>\t17.72% <61111>\t18.99% <63>\t20.25% <52222>\t21.52% <70000>\t22.78% <433333>\t24.05% <30>\t25.32% <166666>\t26.58% <3403472>\t27.85% <344064>\t29.11% <4373>\t30.38% <4333333>\t31.65% <257>\t32.91% <6151>\t34.18% <3444444>\t35.44% <526>\t36.71% <700000>\t37.97% <43377>\t39.24% <6133>\t40.51% <65>\t41.77% <3405>\t43.04% <34036>\t44.30% <0714>\t45.57% <7004>\t46.84% <43335>\t48.10% <05>\t49.37% <6135>\t50.63% <34407>\t51.90% <1662>\t53.16% <0717>\t54.43% <0713>\t55.70% <704>\t56.96% <43373>\t58.23% <34442>\t59.49% <4376>\t60.76% <34403>\t62.03% <611115>\t63.29% <5223>\t64.56% <34033>\t65.82% <6313>\t67.09% <0716>\t68.35% <07773>\t69.62% <611113>\t70.89% <61113>\t72.15% <07776>\t73.42% <255551>\t74.68% <34445>\t75.95% <27>\t77.22% <166662>\t78.48% <340346>\t79.75% <433337>\t81.01% <25554>\t82.28% <52220>\t83.54% <164>\t84.81% <16667>\t86.08% <1664>\t87.34% <522220>\t88.61% <4374>\t89.87% <432>\t91.14% <07771>\t92.41% <4370>\t93.67% <1660>\t94.94% <6310>\t96.20% <076>\t97.47% <2553>\t98.73% <0754>\tdone!\n" ] }, { @@ -146,18 +169,36 @@ "''" ] }, - "execution_count": 18, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "reader.writeToDisk(symlink=False)" + "reader.max_npart_per_file = 1e5\n", + "reader.particleGroups[1].decimation_factor = 100\n", + "reader.writeToDisk()" + ] + }, + { + "cell_type": "markdown", + "id": "2e196c08-f805-41b8-9f4a-ad72454ba0c7", + "metadata": {}, + "source": [ + "-------" ] }, { "cell_type": "code", - "execution_count": 45, + "execution_count": null, + "id": "be37baf6-4c00-41b6-8d63-9cc902a897fb", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, "id": "24ac6ff1-bb79-40e7-83ce-4e40ad0932e5", "metadata": {}, "outputs": [ @@ -166,9 +207,19 @@ "output_type": "stream", "text": [ "JSONdir is None, defaulting to /Users/agurvich/research/repos/firefly/src/firefly/static/data/Data\n", - "Make sure each tracked_array (1) has a tracked_filter_flag (0), assuming True.\n", - "Make sure each tracked_array (1) has a tracked_colormap_flag (0), assuming True.\n", - "Outputting: PGroup_0 - 20000/20000 particles - 1 tracked fields\n" + "Importing existing settings from /Users/agurvich/research/repos/firefly/src/firefly/static/data/Data/DataSettings.json\n", + "Make sure each field_array (1) has a field_filter_flag (0), assuming True.\n", + "Make sure each field_array (1) has a field_colormap_flag (0), assuming True.\n", + "Make sure each field_array (1) has a field_radius_flag (0), assuming False.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "KeyboardInterrupt\n", + "\n" ] } ], @@ -185,7 +236,7 @@ }, { "cell_type": "code", - "execution_count": 40, + "execution_count": null, "id": "3da2aa9b-bc5c-4e4e-93fe-ba60c08564f3", "metadata": {}, "outputs": [], @@ -6027,7 +6078,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.11" + "version": "3.8.13" } }, "nbformat": 4, diff --git a/src/firefly/static/js/viewer/renderLoop.js b/src/firefly/static/js/viewer/renderLoop.js index 0b51763d..5d9057ec 100644 --- a/src/firefly/static/js/viewer/renderLoop.js +++ b/src/firefly/static/js/viewer/renderLoop.js @@ -311,7 +311,7 @@ function update_particle_mesh_UI_values(p,m){ m.geometry.setDrawRange( 0, viewerParams.plotNmax[p]*Nfac); // apply particle size scale factor to meshes that aren't octree CoM meshes - if (!m.geometry.userData.octree) m.material.uniforms.uVertexScale.value = viewerParams.PsizeMult[p]; + if (!m.geometry.userData.octree || m.geometry.userData.octree_use_lod) m.material.uniforms.uVertexScale.value = viewerParams.PsizeMult[p]; else m.material.uniforms.uVertexScale.value = 1; // apply colormap limits and flag for colormapping at all