def update_level_z(self, irradiation, level, z):
    p = self.get_level_path(irradiation, level)
    obj = dvc_load(p)
    try:
        add = (obj['z'] != z)
        obj['z'] = z
    except TypeError:
        obj = {'z': z, 'positions': obj}
        add = True
    dvc_dump(obj, p)
    if add:
        self.add(p, commit=False)
def update_level_z(self, irradiation, level, z):
    p = self.get_level_path(irradiation, level)
    obj = dvc_load(p)
    try:
        add = (obj['z'] != z)
        obj['z'] = z
    except TypeError:
        obj = {'z': z, 'positions': obj}
        add = True
    dvc_dump(obj, p)
    if add:
        self.add(p, commit=False)