pytplot.derive calls xarray's DataArray.differentiate function, but doesn't pass anything in the datetime_unit parameter. It seems to assume units of seconds, but the tplot variable will either be a Python datatime object (resolution in seconds) or a numpy datetime64 object (nanoseconds). So the results are off by a large factor. deriv_data seems to do the right thing (by using get_data to convert back to seconds), so maybe pytplot.derive should be retired.
pytplot.derive calls xarray's DataArray.differentiate function, but doesn't pass anything in the datetime_unit parameter. It seems to assume units of seconds, but the tplot variable will either be a Python datatime object (resolution in seconds) or a numpy datetime64 object (nanoseconds). So the results are off by a large factor. deriv_data seems to do the right thing (by using get_data to convert back to seconds), so maybe pytplot.derive should be retired.