Refactor sud JSON pot params under a nested 'pot' key
Top-level pot_mass/pot_material/L/Td/grain_mass/water_mass and their per-step overrides are now grouped under a 'pot' sub-object, matching the structure already applied to sud_0010.json's parent level. Updated all sude/*.json files and the parsing/consuming code in components/sud.py, tasks/sud.py, components/sud_forecast.py, and scripts/demos/sud/demo_sud.py. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T52JH848ojhXXHn1bAzdC3
This commit is contained in:
+10
-7
@@ -164,7 +164,8 @@ class SudTask(ATask):
|
||||
phase = ramp if ramping else hold
|
||||
|
||||
if step is not None:
|
||||
self.apply_plant_params(step.get('grain_mass', 0), step.get('water_mass', 0))
|
||||
pot = step.get('pot', {})
|
||||
self.apply_plant_params(pot.get('grain_mass', 0), pot.get('water_mass', 0))
|
||||
if ramping and step['temperature'] is not None:
|
||||
self.tc.set_theta_soll(step['temperature'])
|
||||
self.tc.set_heatrate_soll(ramp['rate'])
|
||||
@@ -383,12 +384,14 @@ class SudTask(ATask):
|
||||
doc = {
|
||||
'Name': self.sud.name,
|
||||
'Description': self.sud.description,
|
||||
'pot_mass': self.sud.pot_mass,
|
||||
'pot_material': self.sud.pot_material,
|
||||
'L': self.sud.L,
|
||||
'Td': self.sud.Td,
|
||||
'grain_mass': self.sud.grain_mass,
|
||||
'water_mass': self.sud.water_mass,
|
||||
'pot': {
|
||||
'mass': self.sud.pot_mass,
|
||||
'material': self.sud.pot_material,
|
||||
'L': self.sud.L,
|
||||
'Td': self.sud.Td,
|
||||
'grain_mass': self.sud.grain_mass,
|
||||
'water_mass': self.sud.water_mass,
|
||||
},
|
||||
'steps': schedule[index:],
|
||||
}
|
||||
start_theta = self.tc.get_theta_ist()
|
||||
|
||||
Reference in New Issue
Block a user