@@ -55,49 +55,35 @@ def interactive_table(loaded_equations: EquationProcessingResponse, file_path: s
5555 # ---------------------------------------------------------------
5656 # 1) Define built-in templates and units directly inside the function
5757 # ---------------------------------------------------------------
58- IMAGING_TELESCOPE_template = {
59- "Resolution (panchromatic)" : 0 ,
60- "Ground sampling distance (panchromatic)" : 0 ,
61- "Resolution (multispectral)" : 0 ,
62- "Ground sampling distance (multispectral)" : 0 ,
63- "Altitude" : 0 ,
64- "Half field of view" : 0 ,
65- "Mirror aperture" : 0 ,
66- "F-number" : 0 ,
67- "Focal length" : 0 ,
68- "Pixel size (panchromatic)" : 0 ,
69- "Pixel size (multispectral)" : 0 ,
70- "Swath width" : 0 ,
71- }
7258
7359 IMAGING_TELESCOPE = {
74- "Resolution (panchromatic) " : 1.23529 ,
75- "Ground sampling distance (panchromatic) " : 0.61765 ,
76- "Resolution (multispectral) " : 1.81176 ,
77- "Ground sampling distance (multispectral) " : 0.90588 ,
60+ "Resolved Ground Detail, Panchromatic " : 1.23529 ,
61+ "Ground Sample Distance, Panchromatic " : 0.61765 ,
62+ "Resolved Ground Detail, Multispectral " : 1.81176 ,
63+ "Ground Sample Distance, Multispectral " : 0.90588 ,
7864 "Altitude" : 420000 ,
79- "Half field of view " : 0.017104227 ,
80- "Mirror aperture " : 0.85 ,
81- "F -number" : 6.0 ,
65+ "Horizontal Field of View " : 0.017104227 ,
66+ "Aperture diameter " : 0.85 ,
67+ "f -number" : 6.0 ,
8268 "Focal length" : 5.1 ,
83- "Pixel size (panchromatic) " : 7.5e-6 ,
84- "Pixel size ( multispectral) " : 11e-6 ,
85- "Swath width " : 14368.95 ,
69+ "Pixel pitch " : 7.5e-6 ,
70+ "Pixel pitch of the multispectral sensor " : 11e-6 ,
71+ "Swath Width " : 14368.95 ,
8672 }
8773
8874 IMAGING_TELESCOPE_UNITS = {
89- "Resolution (panchromatic) " : "m" ,
90- "Ground sampling distance (panchromatic) " : "m" ,
91- "Resolution (multispectral) " : "m" ,
92- "Ground sampling distance (multispectral) " : "m" ,
75+ "Resolved Ground Detail, Panchromatic " : "m" ,
76+ "Ground Sample Distance, Panchromatic " : "m" ,
77+ "Resolved Ground Detail, Multispectral " : "m" ,
78+ "Ground Sample Distance, Multispectral " : "m" ,
9379 "Altitude" : "m" ,
94- "Half field of view " : "rad" ,
95- "Mirror aperture " : "m" ,
96- "F -number" : "dimensionless" ,
80+ "Horizontal Field of View " : "rad" ,
81+ "Aperture diameter " : "m" ,
82+ "f -number" : "dimensionless" ,
9783 "Focal length" : "m" ,
98- "Pixel size (panchromatic) " : "m" ,
99- "Pixel size ( multispectral) " : "m" ,
100- "Swath width " : "m" ,
84+ "Pixel pitch " : "m" ,
85+ "Pixel pitch of the multispectral sensor " : "m" ,
86+ "Swath Width " : "m" ,
10187 }
10288
10389 PAYLOAD_1 = {
@@ -120,7 +106,6 @@ def interactive_table(loaded_equations: EquationProcessingResponse, file_path: s
120106 preset_options_dict = {
121107 "Select a template" : [],
122108 "IMAGING TELESCOPE" : list (IMAGING_TELESCOPE .keys ()),
123- "IMAGING TELESCOPE template" : list (IMAGING_TELESCOPE_template .keys ()),
124109 "PAYLOAD" : list (PAYLOAD_1 .keys ()),
125110 }
126111
@@ -272,11 +257,6 @@ def submit_values(_):
272257 result ["values" ] = updated_values
273258 requirements_result [0 ] = _requirements_from_table (result , variable_dict )
274259
275- # Display a confirmation message
276- with message_output :
277- message_output .clear_output ()
278- print ("Requirements submitted successfully!" )
279-
280260 return requirements_result [0 ]
281261
282262 # ---------------------------------------------------------------
@@ -406,9 +386,14 @@ def _create_variable_dict(equation_response: EquationProcessingResponse) -> dict
406386
407387 # Iterate through all equations and their symbols
408388 for equation in equation_response .equations :
409- for symbol in equation .latex_symbols :
389+
390+ wolfram_symbols = equation .wolfram_symbols
391+ latex_symbols = [equation .latex_symbols [i ].key for i in range (len (equation .latex_symbols ))]
392+ names = [equation .latex_symbols [i ].value for i in range (len (equation .latex_symbols ))]
393+
394+ for symbol , name in zip (wolfram_symbols , names ):
410395 # Only add if not already present (avoid duplicates)
411- if symbol . key not in variable_dict :
412- variable_dict [symbol . key ] = {"name" : symbol . value }
396+ if symbol not in variable_dict :
397+ variable_dict [symbol ] = {"name" : name }
413398
414399 return variable_dict
0 commit comments