powderday icon indicating copy to clipboard operation
powderday copied to clipboard

dustsmoothed masses not general

Open dnarayanan opened this issue 4 years ago • 0 comments

this is pretty minor, but in (e.g. gadget2pd there's some inefficiencies that look like this:

        if yt.__version__ == '4.0.dev0':
            return (data.ds.parameters['octree'][('PartType0','Dust_Masses')])

        else:
            return (data.ds.arr(data[("deposit", "PartType0_sum_Dust_Masses")].value, 'code_mass'))


    def _li_ml_dustsmoothedmasses(field,data):
        if yt.__version__ == '4.0.dev0':
            return (data.ds.parameters['octree'][('PartType0', 'li_ml_dustmass')])
        else:
            return (data.ds.arr(data[("deposit", "PartType0_sum_li_ml_dustmass")].value, 'code_mass'))

i.e. the dustsmoothedmasses are either in this situation only good for manual or li_ml, and not generalized. we should just generalize these to be dustsmoothedmasses and encapsulate whatever choice we've made. this is unnecessarily clunky

dnarayanan avatar Apr 06 '20 15:04 dnarayanan