[1]:
%load_ext autoreload
%autoreload 2
[2]:
import numpy as np
import os
import sys
## ignore these lines, you do not need to add this if Firefly is pip installed into your PYTHONPATH
sys.path.insert(0, '/Users/ageller/VISUALIZATIONS/Firefly')
sys.path.insert(0,'/Users/agurvich/research/repos/firefly/src')
from firefly.data_reader import FIREreader,SimpleFIREreader,TweenParams
from abg_python.galaxy.gal_utils import Galaxy
don't have phil's colormaps
Convert FIRE data
In this example notebook we demonstrate how to use the firefly.data_reader.FIREreader
sub-class which creates specialized data files for FIRE formatted data. The details of how the FIREreader
class is “specialized” see the API documentation and to see the example of this output visit the live demo version.
[3]:
galaxy = Galaxy('m12b_res57000',600)
galaxy.extractMainHalo(use_saved_subsnapshots=False)
Couldn't find a metadata file... for
Metadata object at /Users/agurvich/scratch/data/metal_diffusion/m12b_res57000/metadata/meta_Galaxy_600.hdf5
No rstar 1/2 in halo or metadata files, we will need to calculate it ourselves.
Loading star particles of m12b_res57000 at 600 at /Users/agurvich/snaps/metal_diffusion/m12b_res57000/output
Failed to open saved sub-snapshots AssertionError('Told not to use saved sub-snapshots')
Loading gas particles of m12b_res57000 at 600 at /Users/agurvich/snaps/metal_diffusion/m12b_res57000/output
Loading dark matter particles of m12b_res57000 at 600 at /Users/agurvich/snaps/metal_diffusion/m12b_res57000/output
Reorienting...
Done.
extract_halo_inner(m12b_res57000 at 600,){'orient_stars': True, 'use_saved_subsnapshots': False} 19.53 s elapsed
Snapshot memory free
[3]:
(12.27201256901771,
True,
13.610546783496492,
-23.753615253930974,
331.60968,
2.454402513803542,
140.56429531755958)
[4]:
thetas = np.linspace(0,360,1000)/180*np.pi
coords = np.zeros((thetas.size,3))
coords[:,0] = 0
coords[:,1] = np.cos(thetas)
coords[:,2] = np.sin(thetas)
coords*=150
my_tweenParams = TweenParams(coords,30) ## dt = 3000 ms between frames
[5]:
## create a FIRE reader object
reader = FIREreader(
## path to directory containing (optionally multiple) .hdf5 files
snapdir = "/Users/agurvich/research/snaps/metal_diffusion/m12b_res57000/output/",
## the snapshot number, best to provide separately in order to disambiguate
snapnum = 600,
## particle types one would like to extract from .hdf5 files
ptypes=[0,4,1,2],
## what to call them in the UI
UInames=['Gas','Stars','HRDM','LRDM'],
## by what factor would we like to reduce the data for performance stability and disk space concerns
decimation_factors=[10,10,50,50],
## what fields would we like to extract
fields=['Density','Temperature','AgeGyr','GCRadius'],
## do we want to take the magnitude of any of these fields?
## do we want to take the log?
logFlags=[True,True,False,False],
## which fields do we want to be able to filter on?
filterFlags=[True,True,True,True],
## which fields do we want to be able to colormap by?
colormapFlags=[True,True,True,True],
radiusFlags=[False,True,True,False],
## where should the output .json files be saved to?
## if a relative path is given, like here, saves to $HOME/<JSONdir>
## and creates a soft-link to firefly/static/data
datadir=os.path.abspath(os.path.join(os.getcwd(),'..','static','data','FIRESampleData')),
## overwrite the existing startup.json file
write_startup=True,
clean_datadir=True,
tweenParams=my_tweenParams)
## fetch data from .hdf5 files
reader.loadData(com=galaxy.scom,vcom=galaxy.sub_snap['vscom'])
Loading ptype 2
Loading ptype 1
Loading ptype 4
Loading ptype 0
[5]:
array([Gas - 622573/6225729 particles - 4 tracked fields,
Stars - 326473/3264723 particles - 3 tracked fields,
HRDM - 186461/9323040 particles - 2 tracked fields,
LRDM - 60846/3042265 particles - 2 tracked fields], dtype=object)
[6]:
## initialize the camera view
camera = np.array([251,-117,82])
camera = camera/np.linalg.norm(camera)*250
reader.settings['camera'] = camera
## set the initial colors of each of the particle groups
reader.settings['color']['Gas']=[1,0,0,1]
reader.settings['color']['Stars'] = [1,1,1,0.025]
reader.settings['color']['HRDM'] = [0.5,0,0.5,1]
reader.settings['color']['LRDM'] = [0.5,0,0.5,1]
## set the sizes of each of the particle groups
reader.settings['sizeMult']['Gas']=0.25
reader.settings['sizeMult']['Stars']=0.03
reader.settings['sizeMult']['HRDM']=1
reader.settings['sizeMult']['LRDM']=1
[7]:
## initialize the gas with a colormap
reader.settings['showColormap']['Gas'] = True
reader.settings['blendingMode']['Gas'] = 'normal'
reader.settings['depthTest']['Gas'] = True
reader.settings['colormapVariable']['Gas'] = 3
reader.settings['colormapLims']['Gas']['Velocity'] = [50,500]
reader.settings['colormapVals']['Gas']['Velocity'] = [50,500]
## initialize the gas with radius scaling (index 1 corresponds to Temperature, specified above)
reader.settings['radiusVariable']['Gas'] = 1
## initialize gas with velocity vectors
reader.settings['showVel']['Gas'] = True
reader.settings['velType']['Gas'] = 'arrow'
## initialize HRDM with a filter excluding the center so as not to crowd the view
reader.settings['filterVals']['HRDM']['GCRadius'] = [300,5000]
reader.settings['filterLims']['HRDM']['GCRadius'] = [0,5000]
[8]:
## dump output to .ffly files
reader.writeToDisk()
Gas - 622573/6225729 particles - 4 tracked fields
Stars - 326473/3264723 particles - 3 tracked fields
HRDM - 186461/9323040 particles - 2 tracked fields
LRDM - 60846/3042265 particles - 2 tracked fields
[8]:
''
[46]:
reader.copyFireflySourceToTarget("FIRE_lowres",init_gh_pages=True)
Gas - 3112865/6225729 particles - 4 tracked fields
Stars - 1632362/3264723 particles - 3 tracked fields
HRDM - 932304/9323040 particles - 2 tracked fields
LRDM - 304227/3042265 particles - 2 tracked fields
Initializing a new GitHub repository at /Users/agurvich/FIRE_lowres with
GHREPONAME: FIRE_lowres
GHUSER: agurvich
GHOAUTHTOKENPATH: /Users/agurvich/.github.token
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 5766 100 5744 100 22 4401 16 0:00:01 0:00:01 --:--:-- 4473
To github.com:agurvich/FIRE_lowres.git
* [new branch] main -> main
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 626 100 587 100 39 930 61 --:--:-- --:--:-- --:--:-- 1012
[46]:
['{',
' "id": 516071472,',
' "node_id": "R_kgDOHsKgMA",',
' "name": "FIRE_lowres",',
' "full_name": "agurvich/FIRE_lowres",',
' "private": false,',
' "owner": {',
' "login": "agurvich",',
' "id": 7799423,',
' "node_id": "MDQ6VXNlcjc3OTk0MjM=",',
' "avatar_url": "https://avatars.githubusercontent.com/u/7799423?v=4",',
' "gravatar_id": "",',
' "url": "https://api.github.com/users/agurvich",',
' "html_url": "https://github.com/agurvich",',
' "followers_url": "https://api.github.com/users/agurvich/followers",',
' "following_url": "https://api.github.com/users/agurvich/following{/other_user}",',
' "gists_url": "https://api.github.com/users/agurvich/gists{/gist_id}",',
' "starred_url": "https://api.github.com/users/agurvich/starred{/owner}{/repo}",',
' "subscriptions_url": "https://api.github.com/users/agurvich/subscriptions",',
' "organizations_url": "https://api.github.com/users/agurvich/orgs",',
' "repos_url": "https://api.github.com/users/agurvich/repos",',
' "events_url": "https://api.github.com/users/agurvich/events{/privacy}",',
' "received_events_url": "https://api.github.com/users/agurvich/received_events",',
' "type": "User",',
' "site_admin": false',
' },',
' "html_url": "https://github.com/agurvich/FIRE_lowres",',
' "description": null,',
' "fork": false,',
' "url": "https://api.github.com/repos/agurvich/FIRE_lowres",',
' "forks_url": "https://api.github.com/repos/agurvich/FIRE_lowres/forks",',
' "keys_url": "https://api.github.com/repos/agurvich/FIRE_lowres/keys{/key_id}",',
' "collaborators_url": "https://api.github.com/repos/agurvich/FIRE_lowres/collaborators{/collaborator}",',
' "teams_url": "https://api.github.com/repos/agurvich/FIRE_lowres/teams",',
' "hooks_url": "https://api.github.com/repos/agurvich/FIRE_lowres/hooks",',
' "issue_events_url": "https://api.github.com/repos/agurvich/FIRE_lowres/issues/events{/number}",',
' "events_url": "https://api.github.com/repos/agurvich/FIRE_lowres/events",',
' "assignees_url": "https://api.github.com/repos/agurvich/FIRE_lowres/assignees{/user}",',
' "branches_url": "https://api.github.com/repos/agurvich/FIRE_lowres/branches{/branch}",',
' "tags_url": "https://api.github.com/repos/agurvich/FIRE_lowres/tags",',
' "blobs_url": "https://api.github.com/repos/agurvich/FIRE_lowres/git/blobs{/sha}",',
' "git_tags_url": "https://api.github.com/repos/agurvich/FIRE_lowres/git/tags{/sha}",',
' "git_refs_url": "https://api.github.com/repos/agurvich/FIRE_lowres/git/refs{/sha}",',
' "trees_url": "https://api.github.com/repos/agurvich/FIRE_lowres/git/trees{/sha}",',
' "statuses_url": "https://api.github.com/repos/agurvich/FIRE_lowres/statuses/{sha}",',
' "languages_url": "https://api.github.com/repos/agurvich/FIRE_lowres/languages",',
' "stargazers_url": "https://api.github.com/repos/agurvich/FIRE_lowres/stargazers",',
' "contributors_url": "https://api.github.com/repos/agurvich/FIRE_lowres/contributors",',
' "subscribers_url": "https://api.github.com/repos/agurvich/FIRE_lowres/subscribers",',
' "subscription_url": "https://api.github.com/repos/agurvich/FIRE_lowres/subscription",',
' "commits_url": "https://api.github.com/repos/agurvich/FIRE_lowres/commits{/sha}",',
' "git_commits_url": "https://api.github.com/repos/agurvich/FIRE_lowres/git/commits{/sha}",',
' "comments_url": "https://api.github.com/repos/agurvich/FIRE_lowres/comments{/number}",',
' "issue_comment_url": "https://api.github.com/repos/agurvich/FIRE_lowres/issues/comments{/number}",',
' "contents_url": "https://api.github.com/repos/agurvich/FIRE_lowres/contents/{+path}",',
' "compare_url": "https://api.github.com/repos/agurvich/FIRE_lowres/compare/{base}...{head}",',
' "merges_url": "https://api.github.com/repos/agurvich/FIRE_lowres/merges",',
' "archive_url": "https://api.github.com/repos/agurvich/FIRE_lowres/{archive_format}{/ref}",',
' "downloads_url": "https://api.github.com/repos/agurvich/FIRE_lowres/downloads",',
' "issues_url": "https://api.github.com/repos/agurvich/FIRE_lowres/issues{/number}",',
' "pulls_url": "https://api.github.com/repos/agurvich/FIRE_lowres/pulls{/number}",',
' "milestones_url": "https://api.github.com/repos/agurvich/FIRE_lowres/milestones{/number}",',
' "notifications_url": "https://api.github.com/repos/agurvich/FIRE_lowres/notifications{?since,all,participating}",',
' "labels_url": "https://api.github.com/repos/agurvich/FIRE_lowres/labels{/name}",',
' "releases_url": "https://api.github.com/repos/agurvich/FIRE_lowres/releases{/id}",',
' "deployments_url": "https://api.github.com/repos/agurvich/FIRE_lowres/deployments",',
' "created_at": "2022-07-20T17:17:09Z",',
' "updated_at": "2022-07-20T17:17:09Z",',
' "pushed_at": "2022-07-20T17:17:09Z",',
' "git_url": "git://github.com/agurvich/FIRE_lowres.git",',
' "ssh_url": "git@github.com:agurvich/FIRE_lowres.git",',
' "clone_url": "https://github.com/agurvich/FIRE_lowres.git",',
' "svn_url": "https://github.com/agurvich/FIRE_lowres",',
' "homepage": null,',
' "size": 0,',
' "stargazers_count": 0,',
' "watchers_count": 0,',
' "language": null,',
' "has_issues": true,',
' "has_projects": true,',
' "has_downloads": true,',
' "has_wiki": true,',
' "has_pages": false,',
' "forks_count": 0,',
' "mirror_url": null,',
' "archived": false,',
' "disabled": false,',
' "open_issues_count": 0,',
' "license": null,',
' "allow_forking": true,',
' "is_template": false,',
' "web_commit_signoff_required": false,',
' "topics": [',
'',
' ],',
' "visibility": "public",',
' "forks": 0,',
' "open_issues": 0,',
' "watchers": 0,',
' "default_branch": "main",',
' "permissions": {',
' "admin": true,',
' "maintain": true,',
' "push": true,',
' "triage": true,',
' "pull": true',
' },',
' "allow_squash_merge": true,',
' "allow_merge_commit": true,',
' "allow_rebase_merge": true,',
' "allow_auto_merge": false,',
' "delete_branch_on_merge": false,',
' "allow_update_branch": false,',
' "use_squash_pr_title_as_default": false,',
' "network_count": 0,',
' "subscribers_count": 1',
'}',
'Initialized empty Git repository in /Users/agurvich/FIRE_lowres/.git/',
'[main (root-commit) ba2a742] initial commit',
' 139 files changed, 20846 insertions(+)',
' create mode 100644 README.md',
' create mode 100644 index.html',
' create mode 100644 static/css/UIStyles.css',
' create mode 100644 static/css/UIStyles2.css',
' create mode 100644 static/css/mainStyles.css',
' create mode 100644 static/data/FIRESampleData/DataGas000.ffly',
' create mode 100644 static/data/FIRESampleData/DataGas001.ffly',
' create mode 100644 static/data/FIRESampleData/DataGas002.ffly',
' create mode 100644 static/data/FIRESampleData/DataGas003.ffly',
' create mode 100644 static/data/FIRESampleData/DataGas004.ffly',
' create mode 100644 static/data/FIRESampleData/DataGas005.ffly',
' create mode 100644 static/data/FIRESampleData/DataGas006.ffly',
' create mode 100644 static/data/FIRESampleData/DataGas007.ffly',
' create mode 100644 static/data/FIRESampleData/DataGas008.ffly',
' create mode 100644 static/data/FIRESampleData/DataGas009.ffly',
' create mode 100644 static/data/FIRESampleData/DataGas010.ffly',
' create mode 100644 static/data/FIRESampleData/DataGas011.ffly',
' create mode 100644 static/data/FIRESampleData/DataGas012.ffly',
' create mode 100644 static/data/FIRESampleData/DataGas013.ffly',
' create mode 100644 static/data/FIRESampleData/DataGas014.ffly',
' create mode 100644 static/data/FIRESampleData/DataGas015.ffly',
' create mode 100644 static/data/FIRESampleData/DataGas016.ffly',
' create mode 100644 static/data/FIRESampleData/DataGas017.ffly',
' create mode 100644 static/data/FIRESampleData/DataGas018.ffly',
' create mode 100644 static/data/FIRESampleData/DataGas019.ffly',
' create mode 100644 static/data/FIRESampleData/DataGas020.ffly',
' create mode 100644 static/data/FIRESampleData/DataGas021.ffly',
' create mode 100644 static/data/FIRESampleData/DataGas022.ffly',
' create mode 100644 static/data/FIRESampleData/DataGas023.ffly',
' create mode 100644 static/data/FIRESampleData/DataGas024.ffly',
' create mode 100644 static/data/FIRESampleData/DataGas025.ffly',
' create mode 100644 static/data/FIRESampleData/DataGas026.ffly',
' create mode 100644 static/data/FIRESampleData/DataGas027.ffly',
' create mode 100644 static/data/FIRESampleData/DataGas028.ffly',
' create mode 100644 static/data/FIRESampleData/DataGas029.ffly',
' create mode 100644 static/data/FIRESampleData/DataGas030.ffly',
' create mode 100644 static/data/FIRESampleData/DataGas031.ffly',
' create mode 100644 static/data/FIRESampleData/DataHRDM000.ffly',
' create mode 100644 static/data/FIRESampleData/DataHRDM001.ffly',
' create mode 100644 static/data/FIRESampleData/DataHRDM002.ffly',
' create mode 100644 static/data/FIRESampleData/DataHRDM003.ffly',
' create mode 100644 static/data/FIRESampleData/DataHRDM004.ffly',
' create mode 100644 static/data/FIRESampleData/DataHRDM005.ffly',
' create mode 100644 static/data/FIRESampleData/DataHRDM006.ffly',
' create mode 100644 static/data/FIRESampleData/DataHRDM007.ffly',
' create mode 100644 static/data/FIRESampleData/DataHRDM008.ffly',
' create mode 100644 static/data/FIRESampleData/DataHRDM009.ffly',
' create mode 100644 static/data/FIRESampleData/DataLRDM000.ffly',
' create mode 100644 static/data/FIRESampleData/DataLRDM001.ffly',
' create mode 100644 static/data/FIRESampleData/DataLRDM002.ffly',
' create mode 100644 static/data/FIRESampleData/DataLRDM003.ffly',
' create mode 100644 static/data/FIRESampleData/DataSettings.json',
' create mode 100644 static/data/FIRESampleData/DataStars000.ffly',
' create mode 100644 static/data/FIRESampleData/DataStars001.ffly',
' create mode 100644 static/data/FIRESampleData/DataStars002.ffly',
' create mode 100644 static/data/FIRESampleData/DataStars003.ffly',
' create mode 100644 static/data/FIRESampleData/DataStars004.ffly',
' create mode 100644 static/data/FIRESampleData/DataStars005.ffly',
' create mode 100644 static/data/FIRESampleData/DataStars006.ffly',
' create mode 100644 static/data/FIRESampleData/DataStars007.ffly',
' create mode 100644 static/data/FIRESampleData/DataStars008.ffly',
' create mode 100644 static/data/FIRESampleData/DataStars009.ffly',
' create mode 100644 static/data/FIRESampleData/DataStars010.ffly',
' create mode 100644 static/data/FIRESampleData/DataStars011.ffly',
' create mode 100644 static/data/FIRESampleData/DataStars012.ffly',
' create mode 100644 static/data/FIRESampleData/DataStars013.ffly',
' create mode 100644 static/data/FIRESampleData/DataStars014.ffly',
' create mode 100644 static/data/FIRESampleData/DataStars015.ffly',
' create mode 100644 static/data/FIRESampleData/DataStars016.ffly',
' create mode 100644 static/data/FIRESampleData/TweenParams.json',
' create mode 100644 static/data/FIRESampleData/filenames.json',
' create mode 100644 static/data/startup.json',
' create mode 100644 static/docs/FIREFLY-02_trimmed.png',
' create mode 100644 static/docs/GUIicon.png',
' create mode 100644 static/docs/README.md',
' create mode 100644 static/docs/READMEcleanPack.md',
' create mode 100644 static/docs/UI.png',
' create mode 100644 static/docs/icon.png',
' create mode 100644 static/docs/jupyter_embed.png',
' create mode 100644 static/docs/screenGrab.png',
' create mode 100644 static/js/.DS_Store',
' create mode 100644 static/js/gui/GUIParams.js',
' create mode 100644 static/js/gui/GUIconstructors.js',
' create mode 100644 static/js/gui/GUIsocket.js',
' create mode 100644 static/js/gui/UI.js',
' create mode 100644 static/js/gui/colormap.js',
' create mode 100644 static/js/gui/initGUI.js',
' create mode 100644 static/js/gui/particles.js',
' create mode 100644 static/js/gui/sliders.js',
' create mode 100644 static/js/misc/FireflyFormat1.js',
' create mode 100644 static/js/misc/FireflyOctnodeSubstring.js',
' create mode 100644 static/js/misc/MyArrayBuffer.js',
' create mode 100644 static/js/misc/kaitai-struct/KaitaiStream.js',
' create mode 100644 static/js/misc/socketParams.js',
' create mode 100644 static/js/misc/utils.js',
' create mode 100644 static/js/misc/windowEvents.js',
' create mode 100644 static/js/octree/octreeCreatePartsMesh.js',
' create mode 100644 static/js/octree/octreeInit.js',
' create mode 100644 static/js/octree/octreeRenderLoop.js',
' create mode 100644 static/js/streamer/initStreamer.js',
' create mode 100644 static/js/viewer/applyUISelections.js',
' create mode 100644 static/js/viewer/createPartsMesh.js',
' create mode 100644 static/js/viewer/initViewer.js',
' create mode 100644 static/js/viewer/renderLoop.js',
' create mode 100644 static/js/viewer/runTweens.js',
' create mode 100644 static/js/viewer/viewerParams.js',
' create mode 100644 static/lib/Detector.js',
' create mode 100644 static/lib/DeviceOrientationControls.js',
' create mode 100644 static/lib/KeyboardState.js',
' create mode 100644 static/lib/StereoEffect.js',
' create mode 100644 static/lib/THREEx.FullScreen.js',
' create mode 100644 static/lib/THREEx.WindowResize.js',
' create mode 100644 static/lib/TrackballControls.js',
' create mode 100644 static/lib/Tween.js',
' create mode 100644 static/lib/VRButton.js',
' create mode 100644 static/lib/d3.v4.10.2.min.js',
' create mode 100644 static/lib/jquery-3.2.1.min.js',
' create mode 100644 static/lib/nouislider.min.css',
' create mode 100644 static/lib/nouislider.min.js',
' create mode 100644 static/lib/socket.io.min.js',
' create mode 100644 static/lib/socket.io.min.js.map',
' create mode 100644 static/lib/socket.io.min.js.org',
' create mode 100644 static/lib/spectrum.css',
' create mode 100644 static/lib/spectrum.js',
' create mode 100644 static/lib/three-fly-controls.js',
' create mode 100644 static/lib/three.min.js.old',
' create mode 100644 static/lib/three.min.r102.js',
' create mode 100644 static/lib/three.min.r137.js',
' create mode 100644 static/lib/threeoctree.min.js',
' create mode 100644 static/lib/wNumb.js',
' create mode 100644 static/shaders/fragment.glsl.js',
' create mode 100644 static/shaders/fragment_pass2.glsl.js',
' create mode 100644 static/shaders/vertex.glsl.js',
' create mode 100644 static/textures/.ipynb_checkpoints/createColormap-checkpoint.ipynb',
' create mode 100644 static/textures/bb.png',
' create mode 100644 static/textures/cmap.png',
' create mode 100644 static/textures/colormap.png',
' create mode 100644 static/textures/colormap_names.json',
' create mode 100644 static/textures/createColormap.ipynb',
"branch 'main' set up to track 'origin/main'.",
'{',
' "url": "https://api.github.com/repos/agurvich/FIRE_lowres/pages",',
' "status": null,',
' "cname": null,',
' "custom_404": false,',
' "html_url": "http://www.alexbgurvi.ch/FIRE_lowres/",',
' "build_type": "legacy",',
' "source": {',
' "branch": "main",',
' "path": "/"',
' },',
' "public": true,',
' "protected_domain_state": null,',
' "pending_domain_unverified_at": null,',
' "https_certificate": {',
' "state": "approved",',
' "description": "The certificate has been approved.",',
' "domains": [',
' null,',
' "alexbgurvi.ch"',
' ],',
' "expires_at": "2022-08-27"',
' },',
' "https_enforced": false',
'}',
'Check the status of your new github pages site at: https://github.com/agurvich/FIRE_lowres/settings/pages or visit it at https://agurvich.github.io/FIRE_lowres',
'']
Using firefly.data_reader.SimpleFIREreader
To simplify this process we have provided firefly.data_reader.SimpleFIREreader
which takes a path to a FIRE snapshot and creates a basic iteration of Firefly showing the gas and stars given only a path to the data.
[9]:
reader = SimpleFIREreader(
## path to directory containing (optionally multiple) .hdf5 files
path_to_snapshot = "/Users/agurvich/research/snaps/metal_diffusion/m12b_res57000/output/snapdir_600",
## overwrite the existing startup.json file
write_startup=True,
## pass absolute path to avoid symlink
JSONdir=os.path.abspath(os.path.join(os.getcwd(),'..','static','data','FIREData_50')))
Loading ptype 4
Loading ptype 0
Outputting: Gas - 622573/6225729 particles - 3 tracked fields
Outputting: Stars - 326473/3264723 particles - 3 tracked fields