For hybrid undulators, states cannot be saved because they include a Material object (for the poles) which cannot be serialized. This issue arose when trying to use saved states to avoid the necessity of repeating a solve() execution, as pointed out by @Gabrielrezende-asc.
from imaids.models import HybridPlanar
und = HybridPlanar()
und.save_state('saved_state.json')
Results in:
TypeError: Object of type VanadiumPermendur is not JSON serializable
For hybrid undulators, states cannot be saved because they include a Material object (for the poles) which cannot be serialized. This issue arose when trying to use saved states to avoid the necessity of repeating a solve() execution, as pointed out by @Gabrielrezende-asc.
Results in: