Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autoplotter doesn't like single-point data sets #49

Open
james-trayford opened this issue Mar 9, 2021 · 0 comments
Open

Autoplotter doesn't like single-point data sets #49

james-trayford opened this issue Mar 9, 2021 · 0 comments

Comments

@james-trayford
Copy link
Collaborator

james-trayford commented Mar 9, 2021

...as far as I can tell.

Currently circumventing by plotting the same point twice. Example traceback for a plot where the data set is a single point

Unable to create plot h2_frac_func_stellar_mass due to exception: Illegal slicing argument for scalar dataspace.
Traceback:
  File "/cosma/home/dp004/wmfw23/.local/lib/python3.6/site-packages/velociraptor/autoplotter/objects.py", line 1028, in create_plots
    file_extension=file_extension,
  File "/cosma/home/dp004/wmfw23/.local/lib/python3.6/site-packages/velociraptor/autoplotter/objects.py", line 864, in make_plot
    redshift_bracket=observational_data_redshift_bracket,
  File "/cosma/home/dp004/wmfw23/.local/lib/python3.6/site-packages/velociraptor/observations/__init__.py", line 98, in load_observations
    data.load(filename)
  File "/cosma/home/dp004/wmfw23/.local/lib/python3.6/site-packages/velociraptor/observations/objects.py", line 284, in load
    filename, dataset_name=f"{prefix}values", group_name="x"
  File "/cosma/home/dp004/wmfw23/.local/lib/python3.6/site-packages/unyt-2.7.1-py3.6.egg/unyt/array.py", line 1408, in from_hdf5
    data = dataset[:]
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "/cosma/local/Python/3.6.5/lib/python3.6/site-packages/h5py-2.10.0-py3.6-linux-x86_64.egg/h5py/_hl/dataset.py", line 540, in __getitem__
    selection = sel2.select_read(fspace, args)
  File "/cosma/local/Python/3.6.5/lib/python3.6/site-packages/h5py-2.10.0-py3.6-linux-x86_64.egg/h5py/_hl/selections2.py", line 103, in select_read
    return ScalarReadSelection(fspace, args)
  File "/cosma/local/Python/3.6.5/lib/python3.6/site-packages/h5py-2.10.0-py3.6-linux-x86_64.egg/h5py/_hl/selections2.py", line 88, in __init__
    raise ValueError("Illegal slicing argument for scalar dataspace")

presumably this can be fixed with an explicit array declaration in dataset.py

@james-trayford james-trayford changed the title Autoplotter doesn't seem to like single-point data sets Autoplotter doesn't like single-point data sets Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant