Dear Hao,
it doesn’t matter what the units of the workspace for the heat capacity is - the crystal field fitting function ignores this and always treats the data in units of Kelvin for the x-axis (and J/mol/K for y). So as long as your xye data has x in Kelvin it should be fine. If you have it in another unit you’ll have to use the ScaleX algorithm to convert it to Kelvin.
If you’ve manually loaded the file into a workspace with the name ws_cp then you need to use InputWorkspace=mtd['ws_cp'] because ws_cp is the name of the workspace and not a variable name (pointer to the workspace).
All the best,
Duc.