can yt load file non-recursively?
Dear yt-users, I have a tiny question about loading files. I understand when yt load files, it will load all the files in the directory. For example: if I do ds=yt.load('snap_103.0.hdf5’), then ds.field_list , yt would open all the files: snap_103.0.hdf5* snap_103.16.hdf5* snap_103.22.hdf5* snap_103.29.hdf5* snap_103.6.hdf5* snap_103.10.hdf5* snap_103.17.hdf5* snap_103.23.hdf5* snap_103.2.hdf5* snap_103.7.hdf5* snap_103.11.hdf5* snap_103.18.hdf5* snap_103.24.hdf5* snap_103.30.hdf5* snap_103.8.hdf5* snap_103.12.hdf5* snap_103.19.hdf5* snap_103.25.hdf5* snap_103.31.hdf5* snap_103.9.hdf5* snap_103.13.hdf5* snap_103.1.hdf5* snap_103.26.hdf5* snap_103.3.hdf5* snap_103.14.hdf5* snap_103.20.hdf5* snap_103.27.hdf5* snap_103.4.hdf5* snap_103.15.hdf5* snap_103.21.hdf5* snap_103.28.hdf5* snap_103.5.hdf5* However, if our data only has one file :snap_103.hdf5*, then if I do ds=yt.load('snap_103.hdf5’), then ds.field_list, yt would still try to open all the files from snap_103.0.hdf5, however there is no snap_103.0.hdf5. It would report error: IOError: Unable to open file (Unable to open file: name = '/lustre/projects/p071_swin/yqin/smaug/ref_eff_l010n0128/data/snapshot_102/snap_102.0.hdf5', errno = 2, error message = 'no such file or directory', flags = 0, o_flags = 0) Is there an argument saying I don’t want to do loading recursively? I can make a link named snap_103.0.hdf5 to snap_103.hdf5. But it’s kind of inconvenient. Cheers, -- Yuxiang Qin PhD Student School of Physics The University of Melbourne VIC, Australia, 3010 _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi, I got two more question about loading files. I don’t think I can find the answer on yt website, so here I am. First thing is when I try to load in snapshot files (my data is a OWLS data), it always tells me some fields already exists. What is that meaning? it also tell s override it by setting force_override=True. What thing will I override? I put force_override=True to ds.load(), it doesn’t recognise it. So where should I put it? P001 yt : [WARNING ] 2015-01-20 16:02:43,268 Field ('gas', 'C_density') already exists. To override use force_override=True. P003 yt : [WARNING ] 2015-01-20 16:02:43,268 Field ('gas', 'Fe_number_density') already exists. To override use force_override=True. P003 yt : [WARNING ] 2015-01-20 16:02:43,268 Field ('deposit', 'PartType0_smoothed_Fe_density') already exists. To override use force_override=True. P001 yt : [WARNING ] 2015-01-20 16:02:43,268 Field ('deposit', 'PartType0_smoothed_C_mass') already exists. To override use force_override=True. P001 yt : [WARNING ] 2015-01-20 16:02:43,269 Field ('gas', 'C_mass') already exists. To override use force_override=True. P001 yt : [WARNING ] 2015-01-20 16:02:43,269 Field ('deposit', 'PartType0_smoothed_N_number_density') already exists. To override use force_override=True. P003 yt : [WARNING ] 2015-01-20 16:02:43,270 Field ('gas', 'Fe_density') already exists. To override use force_override=True. P003 yt : [WARNING ] 2015-01-20 16:02:43,270 Field ('deposit', 'PartType0_smoothed_Fe_mass') already exists. To override use force_override=True. P001 yt : [WARNING ] 2015-01-20 16:02:43,270 Field ('gas', 'N_number_density') already exists. To override use force_override=True. Ps. It’s not about parallel computation. When I run the script with one process, it also gives me those warnings. Second thing is when I try to load subhalo files, it cannot load in PartTypeN data. ds.field_list and ds.derived_field_list don’t show those PartTypeN fields. I think those fields are added by the people who run the simulation, not from original OWLS data. So how to load in those fields? Ps. Actually, I have question three again about the parallel computation, but I am eager to find out the answers to these two. So I post my question now :< Thanks a lot! Cheers, Yuxiang
On 21 Jan 2015, at 11:29, Yuxiang Qin <yuxiangq@student.unimelb.edu.au> wrote:
Dear yt-users,
I have a tiny question about loading files.
I understand when yt load files, it will load all the files in the directory. For example: if I do ds=yt.load('snap_103.0.hdf5’), then ds.field_list , yt would open all the files:
snap_103.0.hdf5* snap_103.16.hdf5* snap_103.22.hdf5* snap_103.29.hdf5* snap_103.6.hdf5* snap_103.10.hdf5* snap_103.17.hdf5* snap_103.23.hdf5* snap_103.2.hdf5* snap_103.7.hdf5* snap_103.11.hdf5* snap_103.18.hdf5* snap_103.24.hdf5* snap_103.30.hdf5* snap_103.8.hdf5* snap_103.12.hdf5* snap_103.19.hdf5* snap_103.25.hdf5* snap_103.31.hdf5* snap_103.9.hdf5* snap_103.13.hdf5* snap_103.1.hdf5* snap_103.26.hdf5* snap_103.3.hdf5* snap_103.14.hdf5* snap_103.20.hdf5* snap_103.27.hdf5* snap_103.4.hdf5* snap_103.15.hdf5* snap_103.21.hdf5* snap_103.28.hdf5* snap_103.5.hdf5*
However, if our data only has one file :snap_103.hdf5*, then if I do ds=yt.load('snap_103.hdf5’), then ds.field_list, yt would still try to open all the files from snap_103.0.hdf5, however there is no snap_103.0.hdf5. It would report error:
IOError: Unable to open file (Unable to open file: name = '/lustre/projects/p071_swin/yqin/smaug/ref_eff_l010n0128/data/snapshot_102/snap_102.0.hdf5', errno = 2, error message = 'no such file or directory', flags = 0, o_flags = 0)
Is there an argument saying I don’t want to do loading recursively? I can make a link named snap_103.0.hdf5 to snap_103.hdf5. But it’s kind of inconvenient.
Cheers, -- Yuxiang Qin PhD Student School of Physics The University of Melbourne VIC, Australia, 3010
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
I can answer the first question. If you try to add a field that has already been defined, yt will warn you about it and use the original field definition. If you really want to redefine a field, you have to pass in force_override=True to the add_field function. This was a new addition in yt-3.2. Previously, yt would still use the original definition, but it wouldn't warn the user that it was doing so. I think that maybe these fields are getting added redundantly in the OWLS frontend. I can help try to track that down, but in the meantime it's probably fine to ignore these warnings. On Tue, Jan 20, 2015 at 10:20 PM, Yuxiang Qin < yuxiangq@student.unimelb.edu.au> wrote:
Hi,
I got two more question about loading files. I don’t think I can find the answer on yt website, so here I am.
First thing is when I try to load in snapshot files (my data is a OWLS data), it always tells me some fields already exists. What is that meaning? it also tell s override it by setting force_override=True. What thing will I override? I put force_override=True to ds.load(), it doesn’t recognise it. So where should I put it?
P001 yt : [WARNING ] 2015-01-20 16:02:43,268 Field ('gas', 'C_density') already exists. To override use force_override=True.
P003 yt : [WARNING ] 2015-01-20 16:02:43,268 Field ('gas', 'Fe_number_density') already exists. To override use force_override=True.
P003 yt : [WARNING ] 2015-01-20 16:02:43,268 Field ('deposit', 'PartType0_smoothed_Fe_density') already exists. To override use force_override=True. P001 yt : [WARNING ] 2015-01-20 16:02:43,268 Field ('deposit', 'PartType0_smoothed_C_mass') already exists. To override use force_override=True. P001 yt : [WARNING ] 2015-01-20 16:02:43,269 Field ('gas', 'C_mass') already exists. To override use force_override=True.
P001 yt : [WARNING ] 2015-01-20 16:02:43,269 Field ('deposit', 'PartType0_smoothed_N_number_density') already exists. To override use force_override=True. P003 yt : [WARNING ] 2015-01-20 16:02:43,270 Field ('gas', 'Fe_density') already exists. To override use force_override=True.
P003 yt : [WARNING ] 2015-01-20 16:02:43,270 Field ('deposit', 'PartType0_smoothed_Fe_mass') already exists. To override use force_override=True. P001 yt : [WARNING ] 2015-01-20 16:02:43,270 Field ('gas', 'N_number_density') already exists. To override use force_override=True.
Ps. It’s not about parallel computation. When I run the script with one process, it also gives me those warnings.
Second thing is when I try to load subhalo files, it cannot load in PartTypeN data. ds.field_list and ds.derived_field_list don’t show those PartTypeN fields. I think those fields are added by the people who run the simulation, not from original OWLS data. So how to load in those fields?
Ps. Actually, I have question three again about the parallel computation, but I am eager to find out the answers to these two. So I post my question now :<
Thanks a lot!
Cheers, Yuxiang
On 21 Jan 2015, at 11:29, Yuxiang Qin <yuxiangq@student.unimelb.edu.au> wrote:
Dear yt-users,
I have a tiny question about loading files.
I understand when yt load files, it will load all the files in the directory. For example: if I do ds=yt.load('snap_103.0.hdf5’), then ds.field_list , yt would open all the files:
snap_103.0.hdf5* snap_103.16.hdf5* snap_103.22.hdf5* snap_103.29.hdf5* snap_103.6.hdf5* snap_103.10.hdf5* snap_103.17.hdf5* snap_103.23.hdf5* snap_103.2.hdf5* snap_103.7.hdf5* snap_103.11.hdf5* snap_103.18.hdf5* snap_103.24.hdf5* snap_103.30.hdf5* snap_103.8.hdf5* snap_103.12.hdf5* snap_103.19.hdf5* snap_103.25.hdf5* snap_103.31.hdf5* snap_103.9.hdf5* snap_103.13.hdf5* snap_103.1.hdf5* snap_103.26.hdf5* snap_103.3.hdf5*
snap_103.14.hdf5* snap_103.20.hdf5* snap_103.27.hdf5* snap_103.4.hdf5*
snap_103.15.hdf5* snap_103.21.hdf5* snap_103.28.hdf5* snap_103.5.hdf5*
However, if our data only has one file :snap_103.hdf5*, then if I do ds=yt.load('snap_103.hdf5’), then ds.field_list, yt would still try to open all the files from snap_103.0.hdf5, however there is no snap_103.0.hdf5. It would report error:
IOError: Unable to open file (Unable to open file: name = '/lustre/projects/p071_swin/yqin/smaug/ref_eff_l010n0128/data/snapshot_102/snap_102.0.hdf5', errno = 2, error message = 'no such file or directory', flags = 0, o_flags = 0)
Is there an argument saying I don’t want to do loading recursively? I can make a link named snap_103.0.hdf5 to snap_103.hdf5. But it’s kind of inconvenient.
Cheers, -- Yuxiang Qin PhD Student School of Physics The University of Melbourne VIC, Australia, 3010
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi Yuxiang, What simulation code produced these files? Judging by the naming, I'd have to guess some flavor of gadget, but it's not clear based on your e-mail. -Nathan On Tue, Jan 20, 2015 at 4:29 PM, Yuxiang Qin < yuxiangq@student.unimelb.edu.au> wrote:
Dear yt-users,
I have a tiny question about loading files.
I understand when yt load files, it will load all the files in the directory. For example: if I do ds=yt.load('snap_103.0.hdf5’), then ds.field_list , yt would open all the files:
snap_103.0.hdf5* snap_103.16.hdf5* snap_103.22.hdf5* snap_103.29.hdf5* snap_103.6.hdf5* snap_103.10.hdf5* snap_103.17.hdf5* snap_103.23.hdf5* snap_103.2.hdf5* snap_103.7.hdf5* snap_103.11.hdf5* snap_103.18.hdf5* snap_103.24.hdf5* snap_103.30.hdf5* snap_103.8.hdf5* snap_103.12.hdf5* snap_103.19.hdf5* snap_103.25.hdf5* snap_103.31.hdf5* snap_103.9.hdf5* snap_103.13.hdf5* snap_103.1.hdf5* snap_103.26.hdf5* snap_103.3.hdf5*
snap_103.14.hdf5* snap_103.20.hdf5* snap_103.27.hdf5* snap_103.4.hdf5*
snap_103.15.hdf5* snap_103.21.hdf5* snap_103.28.hdf5* snap_103.5.hdf5*
However, if our data only has one file :snap_103.hdf5*, then if I do ds=yt.load('snap_103.hdf5’), then ds.field_list, yt would still try to open all the files from snap_103.0.hdf5, however there is no snap_103.0.hdf5. It would report error:
IOError: Unable to open file (Unable to open file: name = '/lustre/projects/p071_swin/yqin/smaug/ref_eff_l010n0128/data/snapshot_102/snap_102.0.hdf5', errno = 2, error message = 'no such file or directory', flags = 0, o_flags = 0)
Is there an argument saying I don’t want to do loading recursively? I can make a link named snap_103.0.hdf5 to snap_103.hdf5. But it’s kind of inconvenient.
Cheers, -- Yuxiang Qin PhD Student School of Physics The University of Melbourne VIC, Australia, 3010
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi, Thanks for your help. Nathan, I am using OWLS, a Gadget format data. Andrew, what do you mean by ‘add a field that has already been defined’? I am not defining a new field. Does it mean there is already a new field in my data? If so, why yt says it’s a new field since it’s already there? I am kind of confused about it. Cheers, Yuxiang
On 22 Jan 2015, at 09:43, Nathan Goldbaum <nathan12343@gmail.com> wrote:
Hi Yuxiang,
What simulation code produced these files? Judging by the naming, I'd have to guess some flavor of gadget, but it's not clear based on your e-mail.
-Nathan
On Tue, Jan 20, 2015 at 4:29 PM, Yuxiang Qin <yuxiangq@student.unimelb.edu.au <mailto:yuxiangq@student.unimelb.edu.au>> wrote: Dear yt-users,
I have a tiny question about loading files.
I understand when yt load files, it will load all the files in the directory. For example: if I do ds=yt.load('snap_103.0.hdf5’), then ds.field_list , yt would open all the files:
snap_103.0.hdf5* snap_103.16.hdf5* snap_103.22.hdf5* snap_103.29.hdf5* snap_103.6.hdf5* snap_103.10.hdf5* snap_103.17.hdf5* snap_103.23.hdf5* snap_103.2.hdf5* snap_103.7.hdf5* snap_103.11.hdf5* snap_103.18.hdf5* snap_103.24.hdf5* snap_103.30.hdf5* snap_103.8.hdf5* snap_103.12.hdf5* snap_103.19.hdf5* snap_103.25.hdf5* snap_103.31.hdf5* snap_103.9.hdf5* snap_103.13.hdf5* snap_103.1.hdf5* snap_103.26.hdf5* snap_103.3.hdf5* snap_103.14.hdf5* snap_103.20.hdf5* snap_103.27.hdf5* snap_103.4.hdf5* snap_103.15.hdf5* snap_103.21.hdf5* snap_103.28.hdf5* snap_103.5.hdf5*
However, if our data only has one file :snap_103.hdf5*, then if I do ds=yt.load('snap_103.hdf5’), then ds.field_list, yt would still try to open all the files from snap_103.0.hdf5, however there is no snap_103.0.hdf5. It would report error:
IOError: Unable to open file (Unable to open file: name = '/lustre/projects/p071_swin/yqin/smaug/ref_eff_l010n0128/data/snapshot_102/snap_102.0.hdf5', errno = 2, error message = 'no such file or directory', flags = 0, o_flags = 0)
Is there an argument saying I don’t want to do loading recursively? I can make a link named snap_103.0.hdf5 to snap_103.hdf5. But it’s kind of inconvenient.
Cheers, -- Yuxiang Qin PhD Student School of Physics The University of Melbourne VIC, Australia, 3010
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org <mailto:yt-users@lists.spacepope.org> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org <http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org>
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi Yuxiang, There is a standard list of fields that yt automatically defines whenever you load an OWLS dataset (you can see the list in yt/frontends/owls/fields.py). You don't need to explicitly define any new fields yourself for this to happen - this all takes place under the hood. I think that the code that does this is adding all the fields twice for some reason. This is something that needs to get fixed in the OWLS frontend in yt's source code, not anything you are doing in your scripts. -Andrew On Wed, Jan 21, 2015 at 3:30 PM, Yuxiang Qin < yuxiangq@student.unimelb.edu.au> wrote:
Hi,
Thanks for your help.
Nathan, I am using OWLS, a Gadget format data.
Andrew, what do you mean by ‘add a field that has already been defined’? I am not defining a new field. Does it mean there is already a new field in my data? If so, why yt says it’s a new field since it’s already there? I am kind of confused about it.
Cheers, Yuxiang
On 22 Jan 2015, at 09:43, Nathan Goldbaum <nathan12343@gmail.com> wrote:
Hi Yuxiang,
What simulation code produced these files? Judging by the naming, I'd have to guess some flavor of gadget, but it's not clear based on your e-mail.
-Nathan
On Tue, Jan 20, 2015 at 4:29 PM, Yuxiang Qin < yuxiangq@student.unimelb.edu.au> wrote:
Dear yt-users,
I have a tiny question about loading files.
I understand when yt load files, it will load all the files in the directory. For example: if I do ds=yt.load('snap_103.0.hdf5’), then ds.field_list , yt would open all the files:
snap_103.0.hdf5* snap_103.16.hdf5* snap_103.22.hdf5* snap_103.29.hdf5* snap_103.6.hdf5* snap_103.10.hdf5* snap_103.17.hdf5* snap_103.23.hdf5* snap_103.2.hdf5* snap_103.7.hdf5* snap_103.11.hdf5* snap_103.18.hdf5* snap_103.24.hdf5* snap_103.30.hdf5* snap_103.8.hdf5* snap_103.12.hdf5* snap_103.19.hdf5* snap_103.25.hdf5* snap_103.31.hdf5* snap_103.9.hdf5* snap_103.13.hdf5* snap_103.1.hdf5* snap_103.26.hdf5* snap_103.3.hdf5*
snap_103.14.hdf5* snap_103.20.hdf5* snap_103.27.hdf5* snap_103.4.hdf5*
snap_103.15.hdf5* snap_103.21.hdf5* snap_103.28.hdf5* snap_103.5.hdf5*
However, if our data only has one file :snap_103.hdf5*, then if I do ds=yt.load('snap_103.hdf5’), then ds.field_list, yt would still try to open all the files from snap_103.0.hdf5, however there is no snap_103.0.hdf5. It would report error:
IOError: Unable to open file (Unable to open file: name = '/lustre/projects/p071_swin/yqin/smaug/ref_eff_l010n0128/data/snapshot_102/snap_102.0.hdf5', errno = 2, error message = 'no such file or directory', flags = 0, o_flags = 0)
Is there an argument saying I don’t want to do loading recursively? I can make a link named snap_103.0.hdf5 to snap_103.hdf5. But it’s kind of inconvenient.
Cheers, -- Yuxiang Qin PhD Student School of Physics The University of Melbourne VIC, Australia, 3010
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi Andrew, I had a look of those files and I think I get what you mean. By the way, about my second question, ‘cannot load in PartTypeN fields’, I think probably it’s because there is no definition of those fields in yt’s source code. Cheers, Yuxiang
On 22 Jan 2015, at 10:42, Andrew Myers <atmyers2@gmail.com> wrote:
Hi Yuxiang,
There is a standard list of fields that yt automatically defines whenever you load an OWLS dataset (you can see the list in yt/frontends/owls/fields.py). You don't need to explicitly define any new fields yourself for this to happen - this all takes place under the hood. I think that the code that does this is adding all the fields twice for some reason. This is something that needs to get fixed in the OWLS frontend in yt's source code, not anything you are doing in your scripts.
-Andrew
On Wed, Jan 21, 2015 at 3:30 PM, Yuxiang Qin <yuxiangq@student.unimelb.edu.au <mailto:yuxiangq@student.unimelb.edu.au>> wrote: Hi,
Thanks for your help.
Nathan, I am using OWLS, a Gadget format data.
Andrew, what do you mean by ‘add a field that has already been defined’? I am not defining a new field. Does it mean there is already a new field in my data? If so, why yt says it’s a new field since it’s already there? I am kind of confused about it.
Cheers, Yuxiang
On 22 Jan 2015, at 09:43, Nathan Goldbaum <nathan12343@gmail.com <mailto:nathan12343@gmail.com>> wrote:
Hi Yuxiang,
What simulation code produced these files? Judging by the naming, I'd have to guess some flavor of gadget, but it's not clear based on your e-mail.
-Nathan
On Tue, Jan 20, 2015 at 4:29 PM, Yuxiang Qin <yuxiangq@student.unimelb.edu.au <mailto:yuxiangq@student.unimelb.edu.au>> wrote: Dear yt-users,
I have a tiny question about loading files.
I understand when yt load files, it will load all the files in the directory. For example: if I do ds=yt.load('snap_103.0.hdf5’), then ds.field_list , yt would open all the files:
snap_103.0.hdf5* snap_103.16.hdf5* snap_103.22.hdf5* snap_103.29.hdf5* snap_103.6.hdf5* snap_103.10.hdf5* snap_103.17.hdf5* snap_103.23.hdf5* snap_103.2.hdf5* snap_103.7.hdf5* snap_103.11.hdf5* snap_103.18.hdf5* snap_103.24.hdf5* snap_103.30.hdf5* snap_103.8.hdf5* snap_103.12.hdf5* snap_103.19.hdf5* snap_103.25.hdf5* snap_103.31.hdf5* snap_103.9.hdf5* snap_103.13.hdf5* snap_103.1.hdf5* snap_103.26.hdf5* snap_103.3.hdf5* snap_103.14.hdf5* snap_103.20.hdf5* snap_103.27.hdf5* snap_103.4.hdf5* snap_103.15.hdf5* snap_103.21.hdf5* snap_103.28.hdf5* snap_103.5.hdf5*
However, if our data only has one file :snap_103.hdf5*, then if I do ds=yt.load('snap_103.hdf5’), then ds.field_list, yt would still try to open all the files from snap_103.0.hdf5, however there is no snap_103.0.hdf5. It would report error:
IOError: Unable to open file (Unable to open file: name = '/lustre/projects/p071_swin/yqin/smaug/ref_eff_l010n0128/data/snapshot_102/snap_102.0.hdf5', errno = 2, error message = 'no such file or directory', flags = 0, o_flags = 0)
Is there an argument saying I don’t want to do loading recursively? I can make a link named snap_103.0.hdf5 to snap_103.hdf5. But it’s kind of inconvenient.
Cheers, -- Yuxiang Qin PhD Student School of Physics The University of Melbourne VIC, Australia, 3010
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org <mailto:yt-users@lists.spacepope.org> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org <http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org>
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org <mailto:yt-users@lists.spacepope.org> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org <http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org>
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org <mailto:yt-users@lists.spacepope.org> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org <http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org>
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi Yuxiang, Are you running anaconda python? One thing I've noticed this morning for the first time is that when I run yt installed via anaconda on gadget data sets (albeit not owls) I get similar warnings - i.e.: yt : [WARNING ] 2015-01-22 10:44:54,090 Field ('deposit', 'PartType0_smoothed_Ne_fraction') already exists. To override use force_override=True. whereas I didn't' receive them when running yt installed via the install script (and using the python that ships with yt). Not a solution, just another symptom. -d On Wed, Jan 21, 2015 at 7:06 PM, Yuxiang Qin < yuxiangq@student.unimelb.edu.au> wrote:
Hi Andrew,
I had a look of those files and I think I get what you mean. By the way, about my second question, ‘cannot load in PartTypeN fields’, I think probably it’s because there is no definition of those fields in yt’s source code.
Cheers, Yuxiang
On 22 Jan 2015, at 10:42, Andrew Myers <atmyers2@gmail.com> wrote:
Hi Yuxiang,
There is a standard list of fields that yt automatically defines whenever you load an OWLS dataset (you can see the list in yt/frontends/owls/fields.py). You don't need to explicitly define any new fields yourself for this to happen - this all takes place under the hood. I think that the code that does this is adding all the fields twice for some reason. This is something that needs to get fixed in the OWLS frontend in yt's source code, not anything you are doing in your scripts.
-Andrew
On Wed, Jan 21, 2015 at 3:30 PM, Yuxiang Qin < yuxiangq@student.unimelb.edu.au> wrote:
Hi,
Thanks for your help.
Nathan, I am using OWLS, a Gadget format data.
Andrew, what do you mean by ‘add a field that has already been defined’? I am not defining a new field. Does it mean there is already a new field in my data? If so, why yt says it’s a new field since it’s already there? I am kind of confused about it.
Cheers, Yuxiang
On 22 Jan 2015, at 09:43, Nathan Goldbaum <nathan12343@gmail.com> wrote:
Hi Yuxiang,
What simulation code produced these files? Judging by the naming, I'd have to guess some flavor of gadget, but it's not clear based on your e-mail.
-Nathan
On Tue, Jan 20, 2015 at 4:29 PM, Yuxiang Qin < yuxiangq@student.unimelb.edu.au> wrote:
Dear yt-users,
I have a tiny question about loading files.
I understand when yt load files, it will load all the files in the directory. For example: if I do ds=yt.load('snap_103.0.hdf5’), then ds.field_list , yt would open all the files:
snap_103.0.hdf5* snap_103.16.hdf5* snap_103.22.hdf5* snap_103.29.hdf5* snap_103.6.hdf5* snap_103.10.hdf5* snap_103.17.hdf5* snap_103.23.hdf5* snap_103.2.hdf5* snap_103.7.hdf5* snap_103.11.hdf5* snap_103.18.hdf5* snap_103.24.hdf5* snap_103.30.hdf5* snap_103.8.hdf5* snap_103.12.hdf5* snap_103.19.hdf5* snap_103.25.hdf5* snap_103.31.hdf5* snap_103.9.hdf5* snap_103.13.hdf5* snap_103.1.hdf5* snap_103.26.hdf5* snap_103.3.hdf5*
snap_103.14.hdf5* snap_103.20.hdf5* snap_103.27.hdf5* snap_103.4.hdf5*
snap_103.15.hdf5* snap_103.21.hdf5* snap_103.28.hdf5* snap_103.5.hdf5*
However, if our data only has one file :snap_103.hdf5*, then if I do ds=yt.load('snap_103.hdf5’), then ds.field_list, yt would still try to open all the files from snap_103.0.hdf5, however there is no snap_103.0.hdf5. It would report error:
IOError: Unable to open file (Unable to open file: name = '/lustre/projects/p071_swin/yqin/smaug/ref_eff_l010n0128/data/snapshot_102/snap_102.0.hdf5', errno = 2, error message = 'no such file or directory', flags = 0, o_flags = 0)
Is there an argument saying I don’t want to do loading recursively? I can make a link named snap_103.0.hdf5 to snap_103.hdf5. But it’s kind of inconvenient.
Cheers, -- Yuxiang Qin PhD Student School of Physics The University of Melbourne VIC, Australia, 3010
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (4)
-
Andrew Myers
-
Desika Narayanan
-
Nathan Goldbaum
-
Yuxiang Qin