dnarayanan / powderday

powderday dust radiative transfer
BSD 3-Clause "New" or "Revised" License
22 stars 16 forks source link

Gadget front end "add_field" deprecated as of yt 4.1 #207

Closed smlower closed 10 months ago

smlower commented 1 year ago

With yt > 4.1, add_field no longer accepts the particle_type arg. Many aspects of gadget front end break as a result:


  File "/home/s.lower/powderday/powderday/front_ends/gadget2pd.py", line 340, in gadget_field_add
    ds.add_field(('star','metals'), function=_starmetals_00, sampling_type='particle',units="code_metallicity", particle_type=True)
  File "/home/s.lower/yt/yt/data_objects/static_output.py", line 1777, in add_field
    self.field_info.add_field(
  File "/home/s.lower/yt/yt/fields/field_info_container.py", line 394, in add_field
    self[name] = DerivedField(
TypeError: __init__() got an unexpected keyword argument 'particle_type'
smlower commented 1 year ago

rolling back to yt commit c639403da51ac32ca0217aa8ff90ed17f07cc464 (version 4.0dev) does not give this error.

dnarayanan commented 10 months ago

i think we solve this in this commit

de05979869aa091234cf36f51c074cd7fc8a2159