Hi, I try to make a projection figure by yt. My output data is from ART simulation. I tried the following command , ds = yt.load("../FirstLight/test/FL633_G016.a0.115.dat")
but there is an error. YTUnidentifiedDataType: Could not determine input format from `'../FirstLight/test/FL633_G016.a0.115.dat'`.
I googled this error and tried ds = yt.load_amr_grids() but still doesn't work. Are there any solutions?
Hi!
It might just need to be made more specific. Can you try:
ds = yt.frontends.art.ARTDataset(...)
or
ds = yt.frontends.artio.ARTIODataset(...)
(replacing ... with your filename)
-Matt
On Tue, Mar 22, 2022 at 4:25 AM yurinakazato0207@g.ecc.u-tokyo.ac.jp wrote:
Hi, I try to make a projection figure by yt. My output data is from ART simulation. I tried the following command , ds = yt.load("../FirstLight/test/FL633_G016.a0.115.dat")
but there is an error. YTUnidentifiedDataType: Could not determine input format from `'../FirstLight/test/FL633_G016.a0.115.dat'`.
I googled this error and tried ds = yt.load_amr_grids() but still doesn't work. Are there any solutions? _______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org https://mail.python.org/mailman3/lists/yt-users.python.org/ Member address: matthewturk@gmail.com
Hi,
I'm writing this since I got a similar problem loading data. my output data is the halo catalogs from hop halo finder, and the simulation code is Gear(this is a chemo-dynamical tree SPH code based on Gadget)
When I try to load the file, there is an error like this " yt.load("halo_catalogs/snapshot_0565/snapshot_0565.0.h5") --> utf-8' codec can't decode byte 0x86 in position 216: invalid start byte "
I know that the cause of this error is the encoding type, but I don't know how to handle this in yt. I tried to load the file in HDFView and saved it to hdf5 format, but there is another error - 'Could not determine input format from ~'
Is there any way to load this file? I'll attach the google drive link to get this file. https://drive.google.com/file/d/1lWEfsPpBjsSqOoXNNAiP2E3-YGHAuM3K/view?usp=s...
Thanks, HyeonYong
Hi HyeonYong,
My apologies for not replying sooner.
I've looked at the data, and yup, it looks like there are some non UTF-8 characters. This is the attribute "ChimieLabels" and they don't show up as UTF-8 or UTF-16. Here is the raw bytestring:
b'Fe,Mg,O,S,Zn,Sr,Y,Ba,Eu,Metals,
\x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93"\xe3\xfd?\xe5gx\xb2Vy\xfe?[\xe9m\x8dn\x0f\xff?\x87\xf0\xfc$j\xa5\xff?"\x07\xcb\xbc\xa4\x1d'
Setting it to decode and ignore all the non-UTF-8/UTF-16 characters doesn't help much, but what I'm wondering is if the right thing to do is only parse up to the first space, or only parse the first (in this case) 212 characters. I am not 100% sure but my suspicion is that the buffer internal to the simulation code may be allocated to a different length than the buffer that gets written out or something, and that these could potentially be uninitialized memory.
What we may want to do is modify the code in general, but I think here the safest thing to do would be to either add a try/except block so that it fails on decoding and just stores the raw bytes, or skip this parameter. If you wanted to modify the data file (which I am always loathe to do) you could set the attribute to be just "Fe,Mg,O,S,Zn,Sr,Y,Ba,Eu,Metals," .
Let me know what you think, and we can try taking it from there.
-Matt
On Tue, Mar 29, 2022 at 7:45 PM HyeonYong Kim gusdyd398@snu.ac.kr wrote:
Hi,
I'm writing this since I got a similar problem loading data. my output data is the halo catalogs from hop halo finder, and the simulation code is Gear(this is a chemo-dynamical tree SPH code based on Gadget)
When I try to load the file, there is an error like this " yt.load("halo_catalogs/snapshot_0565/snapshot_0565.0.h5") --> utf-8' codec can't decode byte 0x86 in position 216: invalid start byte "
I know that the cause of this error is the encoding type, but I don't know how to handle this in yt. I tried to load the file in HDFView and saved it to hdf5 format, but there is another error - 'Could not determine input format from ~'
Is there any way to load this file? I'll attach the google drive link to get this file. https://drive.google.com/file/d/1lWEfsPpBjsSqOoXNNAiP2E3-YGHAuM3K/view?usp=s...
Thanks, HyeonYong _______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org https://mail.python.org/mailman3/lists/yt-users.python.org/ Member address: matthewturk@gmail.com